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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<PurchaseSubscription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyApp.ServiceModel">
  <AddressCity>String</AddressCity>
  <AddressCountry>String</AddressCountry>
  <AddressLine1>String</AddressLine1>
  <AddressLine2>String</AddressLine2>
  <AddressState>String</AddressState>
  <AddressZip>String</AddressZip>
  <AgreeTerms>false</AgreeTerms>
  <CardNumber>String</CardNumber>
  <Code>String</Code>
  <Company>String</Company>
  <Coupon>String</Coupon>
  <Cvc>String</Cvc>
  <Email>String</Email>
  <ExpMonth>0</ExpMonth>
  <ExpYear>0</ExpYear>
  <FirstName>String</FirstName>
  <IsNonProfit>false</IsNonProfit>
  <IsSmallCompany>false</IsSmallCompany>
  <LastName>String</LastName>
  <LicenseAddress>String</LicenseAddress>
  <LicenseEmail>String</LicenseEmail>
  <LicenseName>String</LicenseName>
  <Notes>String</Notes>
  <Password>String</Password>
  <PhoneNumber>String</PhoneNumber>
  <Quantity>0</Quantity>
  <RenewalRef>String</RenewalRef>
  <SkuId>0</SkuId>
  <UpgradeRef>String</UpgradeRef>
  <UserAuthId>String</UserAuthId>
</PurchaseSubscription>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Subscriptions xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MyApp.ServiceModel">
  <Activated>false</Activated>
  <PurchasedOrderId>0</PurchasedOrderId>
  <Section>String</Section>
  <Success>false</Success>
</Subscriptions>