BusinessApi

<back to all web services

GetSubscriptionRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
GET/subscription/get
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

# module BusinessApi


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubscriptionDetailsFreeUntil:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubscriptionDetailsInvoice:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubscriptionDetailsStripe:
    stripe_x: Optional[str] = None
    card_expires_at_month: int = 0
    card_expires_at_year: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubscriptionDetailsFreeOnClaim:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubscriptionDetailsUnion:
    free_until: Optional[SubscriptionDetailsFreeUntil] = None
    invoice: Optional[SubscriptionDetailsInvoice] = None
    stripe: Optional[SubscriptionDetailsStripe] = None
    free_on_claim: Optional[SubscriptionDetailsFreeOnClaim] = None


Python GetSubscriptionRequest DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /subscription/get HTTP/1.1 
Host: business-api.brovs.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"subscription":[{"id":0,"businessId":0,"subscriptionPlanId":0,"subscriptionDetails":{"freeUntil":{},"invoice":{},"stripe":{"stripeX":"String","cardExpiresAtMonth":0,"cardExpiresAtYear":0},"freeOnClaim":{}}}]}