ServiceStack Home (Live)

<back to all web services

Support

Requires Authentication
The following routes are available for this service:
All Verbs/account/support
All Verbs/Support
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 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; }
    }

    public partial class Support
    {
        public virtual string Section { get; set; }
    }

    public partial class SupportContact
    {
        public virtual int Id { get; set; }
        public virtual int CustomerId { get; set; }
        public virtual string Name { get; set; }
        public virtual string Email { get; set; }
        public virtual string GitHub { get; set; }
    }

    public partial class SupportResponse
    {
        public virtual Subscription ActiveSubscription { get; set; }
        public virtual string Section { get; set; }
        public virtual int MaxQuantity { get; set; }
        public virtual int SupportQuantity { get; set; }
        public virtual string SkuType { get; set; }
        public virtual List<SupportContact> SupportContacts { get; set; }
        public virtual ResponseStatus ResponseStatus { 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# Support 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 /account/support HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

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

{
	activeSubscription: 
	{
		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
	},
	section: String,
	maxQuantity: 0,
	supportQuantity: 0,
	skuType: String,
	supportContacts: 
	[
		{
			id: 0,
			customerId: 0,
			name: String,
			email: String,
			gitHub: String
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}