""" Options: Date: 2024-05-17 04:12:10 Version: 6.50 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://www.clubready.com/api/current #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 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 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 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="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\r\n
\r\nCommon Values\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
TextNumericalAccount Type
VISA1Visa
MC2MasterCard
Disc3Discover
Amex4American Express
PC11Personal Checking
PS12Personal Savings
BC13Business Checking
Factor442Factor4 Gift Card
\r\n

You may use the Text or the Numerical value.

\r\n
") acct_type: Optional[AcctType] = None """ The Account Type of the Payment Profile **Required when adding Gift Card**
Common Values
TextNumericalAccount Type
VISA1Visa
MC2MasterCard
Disc3Discover
Amex4American Express
PC11Personal Checking
PS12Personal Savings
BC13Business Checking
Factor442Factor4 Gift Card

You may use the Text or the Numerical value.

""" # @ApiMember(Description="Bank Routing Number \n**Required for Bank Accounts**") bnk_route: Optional[int] = None """ Bank Routing Number **Required for Bank Accounts** """ # @ApiMember(Description="Set to `true` to not set the user's Payment Type Preference when adding an on-file profile") do_not_update_payment_type_preference: bool = False """ Set to `true` to not set the user's Payment Type Preference when adding an on-file profile """ # @ApiMember(Description="Whether the Payment Profile is Temporary (One time transactions and Gift Cards are IsTemp = `true`)") is_temp: bool = False """ Whether the Payment Profile is Temporary (One time transactions and Gift Cards are IsTemp = `true`) """ restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None