""" Options:
Date: 2025-12-15 18:40:23
Version: 6.50
Tip: To override a DTO option, remove "#" prefix before updating
BaseUrl: https://www.clubready.com/api
#GlobalNamespace:
#AddServiceStackTypes: True
#AddResponseStatus: False
#AddImplicitVersion:
#AddDescriptionAsComments: True
IncludeTypes: AddPaymentAccount.*
#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 IApiDtoBase:
api_key: Optional[str] = None
store_id: Optional[int] = None
chain_id: Optional[int] = None
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(IApiDtoBase):
api_key: Optional[str] = None
store_id: Optional[int] = None
chain_id: Optional[int] = None
class AcctType(IntEnum):
UNINITIALIZED = 0
VISA = 1
MC = 2
DISC = 3
AMEX = 4
DINERS = 5
JCB = 6
EN_ROUTE = 7
PAY_PAL = 8
BILL_ME = 9
PC = 11
PS = 12
BC = 13
BS = 14
BECS = 15
BACS = 16
MAESTRO = 20
SOLO = 21
VISA_ELECTRON = 22
CIBC = 23
ROYAL_BANK_CA = 24
TD_CA_TRUST = 25
SCOTIA = 26
BMO = 27
HSBC_CA = 28
UNION_PAY = 29
INTER_PAYMENT = 30
LASER = 31
UNKNOWN_CREDIT = 40
TRANS_ARMOR = 41
FACTOR4 = 42
X_PASS = 43
CONNECTED_ACCOUNT = 44
UNKNOWN_BANK = 45
ERROR = -1
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddPaymentProfileRequest(ApiDtoBase):
user_id: int = 0
acct_token: Optional[str] = None
last4: Optional[str] = None
exp_month: Optional[int] = None
exp_year: Optional[int] = None
acct_type: Optional[AcctType] = None
bnk_route: Optional[int] = None
first_name: Optional[str] = None
middle_name: Optional[str] = None
last_name: Optional[str] = None
address1: Optional[str] = None
address2: Optional[str] = None
city: Optional[str] = None
state: Optional[str] = None
postal_code: Optional[str] = None
country_code: Optional[str] = None
urbanization: Optional[str] = None
do_not_update_payment_type_preference: bool = False
is_temp: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddPaymentProfileResponse:
success: Optional[str] = None
message: Optional[str] = None
# @Route("/sales/member/{MemberId}/payment/profile", "POST")
# @ApiResponse(Description="", ResponseType=typeof(AddPaymentProfileResponse), StatusCode=200)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AddPaymentAccount(AddPaymentProfileRequest, IReturn[AddPaymentProfileResponse], IRestrictedApiRequest):
# @ApiMember(Description="IP address of the end user", Name="X-Forwarded-For", ParameterType="header")
x_forwarded_for: Optional[str] = None
"""
IP address of the end user
"""
# @ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")
api_key: Optional[str] = None
"""
Api Authentication Key
"""
# @ApiMember(Description="Id of the store for the user", IsRequired=true, ParameterType="query")
store_id: Optional[int] = None
"""
Id of the store for the user
"""
# @ApiMember(Description="Member Id of the user to update their Payment Profile", IsRequired=true, ParameterType="path")
member_id: int = 0
"""
Member Id of the user to update their Payment Profile
"""
# @ApiMember(Description="The AcctToken provided by creating a Payment Profile with the Vault Api", IsRequired=true)
acct_token: Optional[str] = None
"""
The AcctToken provided by creating a Payment Profile with the Vault Api
"""
# @ApiMember(Description="Last 4 digits of the Payment Profile")
last4: Optional[str] = None
"""
Last 4 digits of the Payment Profile
"""
# @ApiMember(Description="2 digit expiration month \n**Required for Credit Card**")
exp_month: Optional[int] = None
"""
2 digit expiration month **Required for Credit Card**
"""
# @ApiMember(Description="2 digit expiration year \n**Required for Credit Card**")
exp_year: Optional[int] = None
"""
2 digit expiration year **Required for Credit Card**
"""
# @ApiMember(Description="\r\nThe Account Type of the Payment Profile \r\n**Required when adding Gift Card**\r\n
You may use the Text or the Numerical value.
\r\n| Text | Numerical | Account Type |
| VISA | 1 | Visa |
| MC | 2 | MasterCard |
| Disc | 3 | Discover |
| Amex | 4 | American Express |
| PC | 11 | Personal Checking |
| PS | 12 | Personal Savings |
| BC | 13 | Business Checking |
| Factor4 | 42 | Factor4 Gift Card |
You may use the Text or the Numerical value.
| Text | Numerical | Account Type |
| VISA | 1 | Visa |
| MC | 2 | MasterCard |
| Disc | 3 | Discover |
| Amex | 4 | American Express |
| PC | 11 | Personal Checking |
| PS | 12 | Personal Savings |
| BC | 13 | Business Checking |
| Factor4 | 42 | Factor4 Gift Card |