ServiceStack Home (Live)

<back to all web services

AdminUncancelSubscription

Admin
Requires Authentication
Required role:Admin
The following routes are available for this service:
All Verbs/AdminUncancelSubscription
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using MyApp.ServiceInterface;
using MyApp.ServiceModel;

namespace MyApp.ServiceInterface
{
    [ValidateRequest("IsAdmin")]
    public partial class AdminUncancelSubscription
        : IPost
    {
        [Validate("NotEmpty")]
        public virtual string LicenseRef { get; set; }
    }

}

namespace MyApp.ServiceModel
{
    public enum SkuType
    {
        Product,
        PerDev,
        PerCore,
        Site,
        Support,
        Training,
        Register,
        Payment,
    }

    public partial class Subscription
    {
        public virtual int Id { get; set; }
        public virtual int CustomerId { get; set; }
        public virtual string Email { get; set; }
        public virtual int SkuId { get; set; }
        public virtual string SkuName { get; set; }
        public virtual SkuType SkuType { get; set; }
        public virtual string Code { get; set; }
        public virtual int Quantity { get; set; }
        public virtual int SupportQuantity { get; set; }
        public virtual int Total { get; set; }
        public virtual bool IsPlan { get; set; }
        public virtual bool IsRenewal { get; set; }
        public virtual int SubscriptionDurationDays { get; set; }
        public virtual DateTime? RenewalDate { get; set; }
        public virtual string LicenseRef { get; set; }
        public virtual string LicenseName { get; set; }
        public virtual string LicenseAddress { get; set; }
        public virtual LicenseType LicenseType { get; set; }
        public virtual DateTime ExpiryDate { get; set; }
        public virtual LicenseKey LicenseKey { get; set; }
        public virtual string LicenseKeyText { get; set; }
        public virtual DateTime CreatedDate { get; set; }
        public virtual DateTime ModifiedDate { get; set; }
        public virtual DateTime? CancelledDate { get; set; }
        public virtual string StripeSubscriptionId { get; set; }
        public virtual int? EmailId { get; set; }
        public virtual int? EmailRenewalId { get; set; }
        public virtual int? EmailExpiredId { get; set; }
        public virtual int? RenewalSubscriptionId { get; set; }
        public virtual string ExternalRef { get; set; }
        public virtual string Notes { get; set; }
        public virtual string Error { get; set; }
    }

}

namespace ServiceStack
{
    public partial class LicenseKey
    {
        public virtual string Ref { get; set; }
        public virtual string Name { get; set; }
        public virtual LicenseType Type { get; set; }
        public virtual long Meta { get; set; }
        public virtual string Hash { get; set; }
        public virtual string Halg { get; set; }
        public virtual DateTime Expiry { get; set; }
    }

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

}

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

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

{
	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
}