TicketUserServices

<back to all web services

OwnerCardsUpgradeQuoteRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:ReadData
The following routes are available for this service:
POST/OrderOwnerCards/upgrade/quoteSide-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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	buyerPhone: String,
	sourceOwnerCardId: 0,
	targetOwnerCardTypeId: 0,
	tenders: 
	[
		{
			kind: String,
			code: String,
			amountMinor: 0,
			idempotencyKey: String,
			holdId: 0,
			appliedMinor: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	sourceOwnerCardId: 0,
	sourceOwnerCardTypeId: 0,
	sourceTypeName: String,
	targetOwnerCardTypeId: 0,
	targetTypeName: String,
	pricePaidOriginal: 0,
	targetPrice: 0,
	priceTotal: 0,
	discountAmount: 0,
	giftCardAmount: 0,
	donationAmount: 0,
	transactionFee: 0,
	chargedAmount: 0,
	chargedAmountMinor: 0,
	fullyCovered: False,
	validFromUTC: 0001-01-01,
	validToUTC: 0001-01-01,
	statusCode: 0,
	message: String,
	reason: String
}