GET | /voss/tiers/{TierId} | gets voss tiers |
---|
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
class ProductGroupTypeEnum(str, Enum):
OPTIONAL = 'Optional'
INCLUDED = 'Included'
class TypeEnum(str, Enum):
AT_SUBSCRIPTION_BILLING_PERIOD_END = 'AtSubscriptionBillingPeriodEnd'
AT_BINDING_PERIOD_END = 'AtBindingPeriodEnd'
IMMEDIATELY = 'Immediately'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ProductGroupTagDto:
type: Optional[TypeEnum] = None
tag: Optional[str] = None
class ProductTypeEnum(str, Enum):
MAIN = 'Main'
ADDON = 'Addon'
LICENSE = 'License'
USAGE = 'Usage'
class StatusEnum(str, Enum):
ACTIVE = 'Active'
TERMINATED = 'Terminated'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TierProductDto:
product_type: Optional[ProductTypeEnum] = None
status: Optional[StatusEnum] = None
id: Optional[str] = None
name: Optional[str] = None
external_id: Optional[str] = None
article_number: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TierProductGroupDto:
product_group_type: Optional[ProductGroupTypeEnum] = None
id: Optional[str] = None
name: Optional[str] = None
external_id: Optional[str] = None
tags: Optional[List[ProductGroupTagDto]] = None
products: Optional[List[TierProductDto]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TierResult:
id: Optional[str] = None
version_id: Optional[str] = None
name: Optional[str] = None
external_id: Optional[str] = None
rank: int = 0
product_groups: Optional[List[TierProductGroupDto]] = None
# @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetVossTier:
# @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
tier_id: Optional[str] = None
"""
The company id, if empty will use the company id for the user you are logged in with.
"""
package_id: Optional[str] = None
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.
GET /voss/tiers/{TierId} HTTP/1.1 Host: testapi.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"name":"String","externalId":"String","rank":0,"productGroups":[{}]}