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
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Support:
    section: Optional[str] = None


class SkuType(str, Enum):
    PRODUCT = 'Product'
    PER_DEV = 'PerDev'
    PER_CORE = 'PerCore'
    SITE = 'Site'
    SUPPORT = 'Support'
    TRAINING = 'Training'
    REGISTER = 'Register'
    PAYMENT = 'Payment'


class LicenseType(str, Enum):
    FREE = 'Free'
    FREE_INDIVIDUAL = 'FreeIndividual'
    FREE_OPEN_SOURCE = 'FreeOpenSource'
    INDIE = 'Indie'
    BUSINESS = 'Business'
    ENTERPRISE = 'Enterprise'
    TEXT_INDIE = 'TextIndie'
    TEXT_BUSINESS = 'TextBusiness'
    ORM_LITE_INDIE = 'OrmLiteIndie'
    ORM_LITE_BUSINESS = 'OrmLiteBusiness'
    REDIS_INDIE = 'RedisIndie'
    REDIS_BUSINESS = 'RedisBusiness'
    AWS_INDIE = 'AwsIndie'
    AWS_BUSINESS = 'AwsBusiness'
    TRIAL = 'Trial'
    SITE = 'Site'
    TEXT_SITE = 'TextSite'
    REDIS_SITE = 'RedisSite'
    ORM_LITE_SITE = 'OrmLiteSite'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LicenseKey:
    ref: Optional[str] = None
    name: Optional[str] = None
    type: Optional[LicenseType] = None
    meta: int = 0
    hash: Optional[str] = None
    halg: Optional[str] = None
    expiry: datetime.datetime = datetime.datetime(1, 1, 1)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Subscription:
    id: int = 0
    customer_id: int = 0
    email: Optional[str] = None
    sku_id: int = 0
    sku_name: Optional[str] = None
    sku_type: Optional[SkuType] = None
    code: Optional[str] = None
    quantity: int = 0
    support_quantity: int = 0
    total: int = 0
    is_plan: bool = False
    is_renewal: bool = False
    subscription_duration_days: int = 0
    renewal_date: Optional[datetime.datetime] = None
    license_ref: Optional[str] = None
    license_name: Optional[str] = None
    license_address: Optional[str] = None
    license_type: Optional[LicenseType] = None
    expiry_date: datetime.datetime = datetime.datetime(1, 1, 1)
    license_key: Optional[LicenseKey] = None
    license_key_text: Optional[str] = None
    created_date: datetime.datetime = datetime.datetime(1, 1, 1)
    modified_date: datetime.datetime = datetime.datetime(1, 1, 1)
    cancelled_date: Optional[datetime.datetime] = None
    stripe_subscription_id: Optional[str] = None
    email_id: Optional[int] = None
    email_renewal_id: Optional[int] = None
    email_expired_id: Optional[int] = None
    renewal_subscription_id: Optional[int] = None
    external_ref: Optional[str] = None
    notes: Optional[str] = None
    error: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SupportContact:
    id: int = 0
    customer_id: int = 0
    name: Optional[str] = None
    email: Optional[str] = None
    git_hub: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SupportResponse:
    active_subscription: Optional[Subscription] = None
    section: Optional[str] = None
    max_quantity: int = 0
    support_quantity: int = 0
    sku_type: Optional[str] = None
    support_contacts: Optional[List[SupportContact]] = None
    response_status: Optional[ResponseStatus] = None

Python Support DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
Content-Length: length

{"section":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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":"\/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"},"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"}}}