ServiceStack Home (Live)

<back to all web services

PurchaseSubscription

The following routes are available for this service:
POST/PurchaseSubscription
"use strict";
export class Subscriptions {
    /** @param {{section?:string,success?:boolean,activated?:boolean,purchasedOrderId?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    section;
    /** @type {boolean} */
    success;
    /** @type {boolean} */
    activated;
    /** @type {?number} */
    purchasedOrderId;
}
export class PurchaseSubscription {
    /** @param {{code?:string,coupon?:string,renewalRef?:string,upgradeRef?:string,quantity?:number,userAuthId?:string,skuId?:number,isSmallCompany?:boolean,isNonProfit?:boolean,agreeTerms?:boolean,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?:number,expYear?:number,notes?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    code;
    /** @type {string} */
    coupon;
    /** @type {string} */
    renewalRef;
    /** @type {string} */
    upgradeRef;
    /** @type {number} */
    quantity;
    /** @type {string} */
    userAuthId;
    /** @type {number} */
    skuId;
    /** @type {?boolean} */
    isSmallCompany;
    /** @type {?boolean} */
    isNonProfit;
    /** @type {boolean} */
    agreeTerms;
    /** @type {string} */
    firstName;
    /** @type {string} */
    lastName;
    /** @type {string} */
    email;
    /** @type {string} */
    password;
    /** @type {string} */
    company;
    /** @type {string} */
    phoneNumber;
    /** @type {string} */
    addressLine1;
    /** @type {string} */
    addressLine2;
    /** @type {string} */
    addressCity;
    /** @type {string} */
    addressZip;
    /** @type {string} */
    addressState;
    /** @type {string} */
    addressCountry;
    /** @type {string} */
    licenseName;
    /** @type {string} */
    licenseEmail;
    /** @type {string} */
    licenseAddress;
    /** @type {string} */
    cardNumber;
    /** @type {string} */
    cvc;
    /** @type {number} */
    expMonth;
    /** @type {number} */
    expYear;
    /** @type {string} */
    notes;
}

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