| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /OrderOwnerCards/upgrade/quote | Side-effect-free price of an owner-card upgrade: the exact delta POST /OrderOwnerCards/upgrade will charge |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class OwnerCardsUpgradeQuoteRequest
{
public String buyerPhone = null;
public Integer sourceOwnerCardId = null;
public Integer targetOwnerCardTypeId = null;
public ArrayList<OrderTender> tenders = null;
public String getBuyerPhone() { return buyerPhone; }
public OwnerCardsUpgradeQuoteRequest setBuyerPhone(String value) { this.buyerPhone = value; return this; }
public Integer getSourceOwnerCardId() { return sourceOwnerCardId; }
public OwnerCardsUpgradeQuoteRequest setSourceOwnerCardId(Integer value) { this.sourceOwnerCardId = value; return this; }
public Integer getTargetOwnerCardTypeId() { return targetOwnerCardTypeId; }
public OwnerCardsUpgradeQuoteRequest setTargetOwnerCardTypeId(Integer value) { this.targetOwnerCardTypeId = value; return this; }
public ArrayList<OrderTender> getTenders() { return tenders; }
public OwnerCardsUpgradeQuoteRequest setTenders(ArrayList<OrderTender> value) { this.tenders = value; return this; }
}
public static class OrderTender
{
public String kind = null;
public String code = null;
public Integer amountMinor = null;
public String idempotencyKey = null;
public Integer holdId = null;
public Integer appliedMinor = null;
public String getKind() { return kind; }
public OrderTender setKind(String value) { this.kind = value; return this; }
public String getCode() { return code; }
public OrderTender setCode(String value) { this.code = value; return this; }
public Integer getAmountMinor() { return amountMinor; }
public OrderTender setAmountMinor(Integer value) { this.amountMinor = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public OrderTender setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public Integer getHoldId() { return holdId; }
public OrderTender setHoldId(Integer value) { this.holdId = value; return this; }
public Integer getAppliedMinor() { return appliedMinor; }
public OrderTender setAppliedMinor(Integer value) { this.appliedMinor = value; return this; }
}
public static class OwnerCardsUpgradeQuoteResult extends OwnerCardUpgradeResultBase
{
public Integer sourceOwnerCardId = null;
public Integer sourceOwnerCardTypeId = null;
public String sourceTypeName = null;
public Integer targetOwnerCardTypeId = null;
public String targetTypeName = null;
public Integer pricePaidOriginal = null;
public Integer targetPrice = null;
public Integer priceTotal = null;
public Integer discountAmount = null;
public Integer giftCardAmount = null;
public Integer donationAmount = null;
public Integer transactionFee = null;
public Integer chargedAmount = null;
public Integer chargedAmountMinor = null;
public Boolean fullyCovered = null;
public Date validFromUTC = null;
public Date validToUTC = null;
public Integer getSourceOwnerCardId() { return sourceOwnerCardId; }
public OwnerCardsUpgradeQuoteResult setSourceOwnerCardId(Integer value) { this.sourceOwnerCardId = value; return this; }
public Integer getSourceOwnerCardTypeId() { return sourceOwnerCardTypeId; }
public OwnerCardsUpgradeQuoteResult setSourceOwnerCardTypeId(Integer value) { this.sourceOwnerCardTypeId = value; return this; }
public String getSourceTypeName() { return sourceTypeName; }
public OwnerCardsUpgradeQuoteResult setSourceTypeName(String value) { this.sourceTypeName = value; return this; }
public Integer getTargetOwnerCardTypeId() { return targetOwnerCardTypeId; }
public OwnerCardsUpgradeQuoteResult setTargetOwnerCardTypeId(Integer value) { this.targetOwnerCardTypeId = value; return this; }
public String getTargetTypeName() { return targetTypeName; }
public OwnerCardsUpgradeQuoteResult setTargetTypeName(String value) { this.targetTypeName = value; return this; }
public Integer getPricePaidOriginal() { return pricePaidOriginal; }
public OwnerCardsUpgradeQuoteResult setPricePaidOriginal(Integer value) { this.pricePaidOriginal = value; return this; }
public Integer getTargetPrice() { return targetPrice; }
public OwnerCardsUpgradeQuoteResult setTargetPrice(Integer value) { this.targetPrice = value; return this; }
public Integer getPriceTotal() { return priceTotal; }
public OwnerCardsUpgradeQuoteResult setPriceTotal(Integer value) { this.priceTotal = value; return this; }
public Integer getDiscountAmount() { return discountAmount; }
public OwnerCardsUpgradeQuoteResult setDiscountAmount(Integer value) { this.discountAmount = value; return this; }
public Integer getGiftCardAmount() { return giftCardAmount; }
public OwnerCardsUpgradeQuoteResult setGiftCardAmount(Integer value) { this.giftCardAmount = value; return this; }
public Integer getDonationAmount() { return donationAmount; }
public OwnerCardsUpgradeQuoteResult setDonationAmount(Integer value) { this.donationAmount = value; return this; }
public Integer getTransactionFee() { return transactionFee; }
public OwnerCardsUpgradeQuoteResult setTransactionFee(Integer value) { this.transactionFee = value; return this; }
public Integer getChargedAmount() { return chargedAmount; }
public OwnerCardsUpgradeQuoteResult setChargedAmount(Integer value) { this.chargedAmount = value; return this; }
public Integer getChargedAmountMinor() { return chargedAmountMinor; }
public OwnerCardsUpgradeQuoteResult setChargedAmountMinor(Integer value) { this.chargedAmountMinor = value; return this; }
public Boolean isFullyCovered() { return fullyCovered; }
public OwnerCardsUpgradeQuoteResult setFullyCovered(Boolean value) { this.fullyCovered = value; return this; }
public Date getValidFromUTC() { return validFromUTC; }
public OwnerCardsUpgradeQuoteResult setValidFromUTC(Date value) { this.validFromUTC = value; return this; }
public Date getValidToUTC() { return validToUTC; }
public OwnerCardsUpgradeQuoteResult setValidToUTC(Date value) { this.validToUTC = value; return this; }
}
public static class OwnerCardUpgradeResultBase
{
public Integer statusCode = null;
public String message = null;
public String reason = null;
public Integer getStatusCode() { return statusCode; }
public OwnerCardUpgradeResultBase setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public OwnerCardUpgradeResultBase setMessage(String value) { this.message = value; return this; }
public String getReason() { return reason; }
public OwnerCardUpgradeResultBase setReason(String value) { this.reason = value; return this; }
}
}
Java OwnerCardsUpgradeQuoteRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /OrderOwnerCards/upgrade/quote HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OwnerCardsUpgradeQuoteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BuyerPhone>String</BuyerPhone>
<SourceOwnerCardId>0</SourceOwnerCardId>
<TargetOwnerCardTypeId>0</TargetOwnerCardTypeId>
<Tenders>
<OrderTender>
<AmountMinor>0</AmountMinor>
<AppliedMinor>0</AppliedMinor>
<Code>String</Code>
<HoldId>0</HoldId>
<IdempotencyKey>String</IdempotencyKey>
<Kind>String</Kind>
</OrderTender>
</Tenders>
</OwnerCardsUpgradeQuoteRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <OwnerCardsUpgradeQuoteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Message>String</Message> <Reason>String</Reason> <StatusCode>0</StatusCode> <ChargedAmount>0</ChargedAmount> <ChargedAmountMinor>0</ChargedAmountMinor> <DiscountAmount>0</DiscountAmount> <DonationAmount>0</DonationAmount> <FullyCovered>false</FullyCovered> <GiftCardAmount>0</GiftCardAmount> <PricePaidOriginal>0</PricePaidOriginal> <PriceTotal>0</PriceTotal> <SourceOwnerCardId>0</SourceOwnerCardId> <SourceOwnerCardTypeId>0</SourceOwnerCardTypeId> <SourceTypeName>String</SourceTypeName> <TargetOwnerCardTypeId>0</TargetOwnerCardTypeId> <TargetPrice>0</TargetPrice> <TargetTypeName>String</TargetTypeName> <TransactionFee>0</TransactionFee> <ValidFromUTC>0001-01-01T00:00:00</ValidFromUTC> <ValidToUTC>0001-01-01T00:00:00</ValidToUTC> </OwnerCardsUpgradeQuoteResult>