All Verbs | /renew | ||
---|---|---|---|
All Verbs | /Renew |
export enum SkuType
{
Product = 'Product',
PerDev = 'PerDev',
PerCore = 'PerCore',
Site = 'Site',
Support = 'Support',
Training = 'Training',
Register = 'Register',
Payment = 'Payment',
}
export enum LicenseType
{
Free = 'Free',
FreeIndividual = 'FreeIndividual',
FreeOpenSource = 'FreeOpenSource',
Indie = 'Indie',
Business = 'Business',
Enterprise = 'Enterprise',
TextIndie = 'TextIndie',
TextBusiness = 'TextBusiness',
OrmLiteIndie = 'OrmLiteIndie',
OrmLiteBusiness = 'OrmLiteBusiness',
RedisIndie = 'RedisIndie',
RedisBusiness = 'RedisBusiness',
AwsIndie = 'AwsIndie',
AwsBusiness = 'AwsBusiness',
Trial = 'Trial',
Site = 'Site',
TextSite = 'TextSite',
RedisSite = 'RedisSite',
OrmLiteSite = 'OrmLiteSite',
}
export class LicenseKey
{
public ref: string;
public name: string;
public type: LicenseType;
public meta: number;
public hash: string;
public halg: string;
public expiry: string;
public constructor(init?: Partial<LicenseKey>) { (Object as any).assign(this, init); }
}
export class Subscription
{
public id: number;
public customerId: number;
public email: string;
public skuId: number;
public skuName: string;
public skuType: SkuType;
public code: string;
public quantity: number;
public supportQuantity: number;
public total: number;
public isPlan: boolean;
public isRenewal: boolean;
public subscriptionDurationDays: number;
public renewalDate?: string;
public licenseRef: string;
public licenseName: string;
public licenseAddress: string;
public licenseType: LicenseType;
public expiryDate: string;
public licenseKey: LicenseKey;
public licenseKeyText: string;
public createdDate: string;
public modifiedDate: string;
public cancelledDate?: string;
public stripeSubscriptionId: string;
public emailId?: number;
public emailRenewalId?: number;
public emailExpiredId?: number;
public renewalSubscriptionId?: number;
public externalRef: string;
public notes: string;
public error: string;
public constructor(init?: Partial<Subscription>) { (Object as any).assign(this, init); }
}
export class RenewResponse
{
public subscriptions: Subscription[];
public responseStatus: ResponseStatus;
public constructor(init?: Partial<RenewResponse>) { (Object as any).assign(this, init); }
}
export class Renew implements IGet
{
public licenseRef: string;
public licenseKey: string;
public error: string;
public constructor(init?: Partial<Renew>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"licenseRef":"String","licenseKey":"String","error":"String"}
HTTP/1.1 200 OK Content-Type: application/json 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":"\/Date(-62135596800000-0000)\/","licenseRef":"String","licenseName":"String","licenseAddress":"String","licenseType":"Free","expiryDate":"\/Date(-62135596800000-0000)\/","licenseKey":{"ref":"String","name":"String","type":"Free","meta":0,"hash":"String","halg":"String","expiry":"\/Date(-62135596800000-0000)\/"},"licenseKeyText":"String","createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","cancelledDate":"\/Date(-62135596800000-0000)\/","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"}}}