ServiceStack Home (Live)

<back to all web services

PurchaseSubscription

The following routes are available for this service:
POST/PurchaseSubscription
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class PurchaseSubscription : ICardInfo, IAddress
{
    open var code:String? = null
    open var coupon:String? = null
    open var renewalRef:String? = null
    open var upgradeRef:String? = null
    open var quantity:Int? = null
    open var userAuthId:String? = null
    open var skuId:Int? = null
    open var isSmallCompany:Boolean? = null
    open var isNonProfit:Boolean? = null
    open var agreeTerms:Boolean? = null
    open var firstName:String? = null
    open var lastName:String? = null
    open var email:String? = null
    open var password:String? = null
    open var company:String? = null
    open var phoneNumber:String? = null
    override var addressLine1:String? = null
    override var addressLine2:String? = null
    override var addressCity:String? = null
    override var addressZip:String? = null
    override var addressState:String? = null
    override var addressCountry:String? = null
    open var licenseName:String? = null
    open var licenseEmail:String? = null
    open var licenseAddress:String? = null
    override var cardNumber:String? = null
    override var cvc:String? = null
    override var expMonth:Int? = null
    override var expYear:Int? = null
    open var notes:String? = null
}

open class Subscriptions
{
    open var section:String? = null
    open var success:Boolean? = null
    open var activated:Boolean? = null
    open var purchasedOrderId:Int? = null
}

Kotlin 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>