ServiceStack Home (Live)

<back to all web services

PurchaseSubscription

The following routes are available for this service:
POST/PurchaseSubscription
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using MyApp.ServiceModel;

namespace MyApp.ServiceModel
{
    public partial class PurchaseSubscription
        : ICardInfo, IAddress
    {
        public virtual string Code { get; set; }
        public virtual string Coupon { get; set; }
        public virtual string RenewalRef { get; set; }
        public virtual string UpgradeRef { get; set; }
        public virtual int Quantity { get; set; }
        public virtual string UserAuthId { get; set; }
        public virtual int SkuId { get; set; }
        public virtual bool? IsSmallCompany { get; set; }
        public virtual bool? IsNonProfit { get; set; }
        public virtual bool AgreeTerms { get; set; }
        public virtual string FirstName { get; set; }
        public virtual string LastName { get; set; }
        public virtual string Email { get; set; }
        public virtual string Password { get; set; }
        public virtual string Company { get; set; }
        public virtual string PhoneNumber { get; set; }
        public virtual string AddressLine1 { get; set; }
        public virtual string AddressLine2 { get; set; }
        public virtual string AddressCity { get; set; }
        public virtual string AddressZip { get; set; }
        public virtual string AddressState { get; set; }
        public virtual string AddressCountry { get; set; }
        public virtual string LicenseName { get; set; }
        public virtual string LicenseEmail { get; set; }
        public virtual string LicenseAddress { get; set; }
        public virtual string CardNumber { get; set; }
        public virtual string Cvc { get; set; }
        public virtual int ExpMonth { get; set; }
        public virtual int ExpYear { get; set; }
        public virtual string Notes { get; set; }
    }

    public partial class Subscriptions
    {
        public virtual string Section { get; set; }
        public virtual bool Success { get; set; }
        public virtual bool Activated { get; set; }
        public virtual int? PurchasedOrderId { get; set; }
    }

}

C# 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
}