ServiceStack Home (Live)

<back to all web services

Renew

The following routes are available for this service:
All Verbs/renew
All Verbs/Renew
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class Renew : IGet
{
    open var licenseRef:String? = null
    open var licenseKey:String? = null
    open var error:String? = null
}

open class RenewResponse
{
    open var subscriptions:ArrayList<Subscription>? = null
    open var responseStatus:ResponseStatus? = null
}

open class Subscription
{
    open var id:Int? = null
    open var customerId:Int? = null
    open var email:String? = null
    open var skuId:Int? = null
    open var skuName:String? = null
    open var skuType:SkuType? = null
    open var code:String? = null
    open var quantity:Int? = null
    open var supportQuantity:Int? = null
    open var total:Int? = null
    open var isPlan:Boolean? = null
    open var isRenewal:Boolean? = null
    open var subscriptionDurationDays:Int? = null
    open var renewalDate:Date? = null
    open var licenseRef:String? = null
    open var licenseName:String? = null
    open var licenseAddress:String? = null
    open var licenseType:LicenseType? = null
    open var expiryDate:Date? = null
    open var licenseKey:LicenseKey? = null
    open var licenseKeyText:String? = null
    open var createdDate:Date? = null
    open var modifiedDate:Date? = null
    open var cancelledDate:Date? = null
    open var stripeSubscriptionId:String? = null
    open var emailId:Int? = null
    open var emailRenewalId:Int? = null
    open var emailExpiredId:Int? = null
    open var renewalSubscriptionId:Int? = null
    open var externalRef:String? = null
    open var notes:String? = null
    open var error:String? = null
}

enum class SkuType
{
    Product,
    PerDev,
    PerCore,
    Site,
    Support,
    Training,
    Register,
    Payment,
}

enum class LicenseType
{
    Free,
    FreeIndividual,
    FreeOpenSource,
    Indie,
    Business,
    Enterprise,
    TextIndie,
    TextBusiness,
    OrmLiteIndie,
    OrmLiteBusiness,
    RedisIndie,
    RedisBusiness,
    AwsIndie,
    AwsBusiness,
    Trial,
    Site,
    TextSite,
    RedisSite,
    OrmLiteSite,
}

open class LicenseKey
{
    open var ref:String? = null
    open var name:String? = null
    @SerializedName("type") open var Type:LicenseType? = null
    open var meta:Long? = null
    open var hash:String? = null
    open var halg:String? = null
    open var expiry:Date? = null
}

Kotlin Renew 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 /renew HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	licenseRef: String,
	licenseKey: String,
	error: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	subscriptions: 
	[
		{
			id: 0,
			customerId: 0,
			email: String,
			skuId: 0,
			skuName: String,
			skuType: Product,
			code: String,
			quantity: 0,
			supportQuantity: 0,
			total: 0,
			isPlan: False,
			isRenewal: False,
			subscriptionDurationDays: 0,
			renewalDate: 0001-01-01,
			licenseRef: String,
			licenseName: String,
			licenseAddress: String,
			licenseType: Free,
			expiryDate: 0001-01-01,
			licenseKey: 
			{
				ref: String,
				name: String,
				type: Free,
				meta: 0,
				hash: String,
				halg: String,
				expiry: 0001-01-01
			},
			licenseKeyText: String,
			createdDate: 0001-01-01,
			modifiedDate: 0001-01-01,
			cancelledDate: 0001-01-01,
			stripeSubscriptionId: String,
			emailId: 0,
			emailRenewalId: 0,
			emailExpiredId: 0,
			renewalSubscriptionId: 0,
			externalRef: String,
			notes: String,
			error: String
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}