ServiceStack Home (Live)

<back to all web services

PurchaseSubscription

The following routes are available for this service:
POST/PurchaseSubscription

export class Subscriptions
{
    public section: string;
    public success: boolean;
    public activated: boolean;
    public purchasedOrderId?: number;

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

export class PurchaseSubscription implements ICardInfo, IAddress
{
    public code: string;
    public coupon: string;
    public renewalRef: string;
    public upgradeRef: string;
    public quantity: number;
    public userAuthId: string;
    public skuId: number;
    public isSmallCompany?: boolean;
    public isNonProfit?: boolean;
    public agreeTerms: boolean;
    public firstName: string;
    public lastName: string;
    public email: string;
    public password: string;
    public company: string;
    public phoneNumber: string;
    public addressLine1: string;
    public addressLine2: string;
    public addressCity: string;
    public addressZip: string;
    public addressState: string;
    public addressCountry: string;
    public licenseName: string;
    public licenseEmail: string;
    public licenseAddress: string;
    public cardNumber: string;
    public cvc: string;
    public expMonth: number;
    public expYear: number;
    public notes: string;

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

TypeScript PurchaseSubscription 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 /PurchaseSubscription HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	code: String,
	coupon: String,
	renewalRef: String,
	upgradeRef: String,
	quantity: 0,
	userAuthId: String,
	skuId: 0,
	isSmallCompany: False,
	isNonProfit: False,
	agreeTerms: False,
	firstName: String,
	lastName: String,
	email: String,
	password: String,
	company: String,
	phoneNumber: String,
	addressLine1: String,
	addressLine2: String,
	addressCity: String,
	addressZip: String,
	addressState: String,
	addressCountry: String,
	licenseName: String,
	licenseEmail: String,
	licenseAddress: String,
	cardNumber: String,
	cvc: String,
	expMonth: 0,
	expYear: 0,
	notes: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	section: String,
	success: False,
	activated: False,
	purchasedOrderId: 0
}