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

export class OwnerCardUpgradeResultBase
{
    public statusCode?: number;
    public message?: string;
    public reason?: string;

    public constructor(init?: Partial<OwnerCardUpgradeResultBase>) { (Object as any).assign(this, init); }
}

export class OwnerCardsUpgradeQuoteResult extends OwnerCardUpgradeResultBase
{
    public sourceOwnerCardId?: number;
    public sourceOwnerCardTypeId?: number;
    public sourceTypeName?: string;
    public targetOwnerCardTypeId?: number;
    public targetTypeName?: string;
    public pricePaidOriginal?: number;
    public targetPrice?: number;
    public priceTotal?: number;
    public discountAmount?: number;
    public giftCardAmount?: number;
    public donationAmount?: number;
    public transactionFee?: number;
    public chargedAmount?: number;
    public chargedAmountMinor?: number;
    public fullyCovered?: boolean;
    public validFromUTC?: string;
    public validToUTC?: string;

    public constructor(init?: Partial<OwnerCardsUpgradeQuoteResult>) { super(init); (Object as any).assign(this, init); }
}

export class OrderTender
{
    public kind?: string;
    public code?: string;
    public amountMinor?: number;
    public idempotencyKey?: string;
    public holdId?: number;
    public appliedMinor?: number;

    public constructor(init?: Partial<OrderTender>) { (Object as any).assign(this, init); }
}

export class OwnerCardsUpgradeQuoteRequest
{
    public buyerPhone?: string;
    public sourceOwnerCardId?: number;
    public targetOwnerCardTypeId?: number;
    public tenders?: OrderTender[];

    public constructor(init?: Partial<OwnerCardsUpgradeQuoteRequest>) { (Object as any).assign(this, init); }
}

TypeScript 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
}