POST | /PurchaseSubscription |
---|
namespace MyApp.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type Subscriptions() =
member val Section:String = null with get,set
member val Success:Boolean = new Boolean() with get,set
member val Activated:Boolean = new Boolean() with get,set
member val PurchasedOrderId:Nullable<Int32> = new Nullable<Int32>() with get,set
[<AllowNullLiteral>]
type PurchaseSubscription() =
member val Code:String = null with get,set
member val Coupon:String = null with get,set
member val RenewalRef:String = null with get,set
member val UpgradeRef:String = null with get,set
member val Quantity:Int32 = new Int32() with get,set
member val UserAuthId:String = null with get,set
member val SkuId:Int32 = new Int32() with get,set
member val IsSmallCompany:Nullable<Boolean> = new Nullable<Boolean>() with get,set
member val IsNonProfit:Nullable<Boolean> = new Nullable<Boolean>() with get,set
member val AgreeTerms:Boolean = new Boolean() with get,set
member val FirstName:String = null with get,set
member val LastName:String = null with get,set
member val Email:String = null with get,set
member val Password:String = null with get,set
member val Company:String = null with get,set
member val PhoneNumber:String = null with get,set
member val AddressLine1:String = null with get,set
member val AddressLine2:String = null with get,set
member val AddressCity:String = null with get,set
member val AddressZip:String = null with get,set
member val AddressState:String = null with get,set
member val AddressCountry:String = null with get,set
member val LicenseName:String = null with get,set
member val LicenseEmail:String = null with get,set
member val LicenseAddress:String = null with get,set
member val CardNumber:String = null with get,set
member val Cvc:String = null with get,set
member val ExpMonth:Int32 = new Int32() with get,set
member val ExpYear:Int32 = new Int32() with get,set
member val Notes:String = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>