""" Options: Date: 2024-11-24 13:58:42 Version: 6.50 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://clubready.com/api/current #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: WalletTokenCreateEndpoint.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ 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 RestrictedResourceType(str, Enum): STORE = 'Store' CHAIN = 'Chain' USER = 'User' UNDEFINED = 'Undefined' class IRestrictedApiRequest(IApiKeyEndpoint): restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None class IApiKeyEndpoint: api_key: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ApiDtoBase: api_key: Optional[str] = None store_id: Optional[int] = None chain_id: Optional[int] = None class OwnerType(IntEnum): UNKNOWN = 0 USER = 1 CONV_USER = 2 TEMP_CART = 3 TEMP_AGMT = 4 STORE = 5 CHAIN = 6 DIVISION = 7 DISTRICT = 8 ADMIN_TYPE = 9 TEMP_ST_USER = 10 VAULT_API = 11 COMPANY = 12 BACK_OFFICE_STORE = 13 ORG_USER = 14 CART_ITEM = 15 TESTING = 99 SYSTEM = 100 ERROR = -1 class WalletPage(str, Enum): UNINITIALIZED = 'Uninitialized' MANAGE = 'Manage' ADD = 'Add' ADD_CARD = 'AddCard' ADD_BANK = 'AddBank' ADD_MINI = 'AddMini' ADD_CARD_MINI = 'AddCardMini' ADD_BANK_MINI = 'AddBankMini' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class WalletTokenCreateRequestDto(ApiDtoBase): owner_id: int = 0 owner_type: Optional[OwnerType] = None creator_id: int = 0 page: Optional[WalletPage] = None theme: Optional[str] = None allow_delete_profile: Optional[bool] = None allow_disable_profile: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ApiResponseBase: success: bool = False message: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class WalletTokenCreateResponseDto(ApiResponseBase): wallet_token: Optional[str] = None wallet_origin: Optional[str] = None wallet_url: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class WalletTokenCreateResponse(WalletTokenCreateResponseDto): success: bool = False message: Optional[str] = None wallet_token: Optional[str] = None wallet_origin: Optional[str] = None wallet_url: Optional[str] = None # @Route("/sales/wallet/wallettokencreate", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class WalletTokenCreateEndpoint(WalletTokenCreateRequestDto, IReturn[WalletTokenCreateResponse], IRestrictedApiRequest): # @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query") api_key: Optional[str] = None """ Api Key - grants access to resources """ # @ApiMember(DataType="integer", Description="ID # of the owner to create the URL for", IsRequired=true, Name="OwnerId", ParameterType="query") owner_id: int = 0 """ ID # of the owner to create the URL for """ # @ApiMember(Description="Type of owner to create the URL for", IsRequired=true, Name="OwnerType", ParameterType="query") owner_type: Optional[OwnerType] = None """ Type of owner to create the URL for """ # @ApiMember(Description="Person creating the profile. Can be same as OwnerId.", IsRequired=true, Name="CreatorId", ParameterType="query") creator_id: int = 0 """ Person creating the profile. Can be same as OwnerId. """ # @ApiMember(Description="Page to display when calling the Payment Profile iFrame", IsRequired=true, Name="Page", ParameterType="query") page: Optional[WalletPage] = None """ Page to display when calling the Payment Profile iFrame """ # @ApiMember(Description="CSS Theme", ParameterType="query") theme: Optional[str] = None """ CSS Theme """ restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None # @ApiMember(Description="Allows for a payment profile to be deleted", Name="AllowDeleteProfile", ParameterType="query") allow_delete_profile: Optional[bool] = None """ Allows for a payment profile to be deleted """ # @ApiMember(Description="Allows for a payment profile to be disabled", Name="AllowDisableProfile", ParameterType="query") allow_disable_profile: Optional[bool] = None """ Allows for a payment profile to be disabled """