/* Options: Date: 2024-11-24 13:49:28 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://clubready.com/api/current //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: SellContractAndSetupClientRequest.* //ExcludeTypes: //DefaultImports: */ export enum RestrictedResourceType { Store = 'Store', Chain = 'Chain', User = 'User', Undefined = 'Undefined', } export interface IRestrictedApiRequest extends IApiKeyEndpoint { RestrictedId?: number; RestrictedResourceType: RestrictedResourceType; } export interface IApiKeyEndpoint { ApiKey: string; } export class ApiDtoBase { public ApiKey: string; public StoreId?: number; public ChainId?: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export enum AcctType { Uninitialized = 0, Visa = 1, MC = 2, Disc = 3, Amex = 4, Diners = 5, JCB = 6, enRoute = 7, PayPal = 8, BillMe = 9, PC = 11, PS = 12, BC = 13, BS = 14, Becs = 15, Bacs = 16, Maestro = 20, Solo = 21, VisaElectron = 22, CIBC = 23, RoyalBankCa = 24, TDCaTrust = 25, Scotia = 26, BMO = 27, HSBCCa = 28, UnionPay = 29, InterPayment = 30, Laser = 31, UnknownCredit = 40, TransArmor = 41, Factor4 = 42, XPass = 43, ConnectedAccount = 44, UnknownBank = 45, Error = -1, } export enum PaymentMethodType { Uninitialized = 0, PaymentProfileId = 1, PreferredOnFile = 2, AcctToken = 3, Error = -1, } // @DataContract export class PaymentMethodDto { // @DataMember public AcctToken: string; // @DataMember public ProfileToken: string; // @DataMember public PaymentProfileId: string; // @DataMember public PaymentAmount?: number; // @DataMember public PaymentMethodType?: PaymentMethodType; // @DataMember public DoNotUpdatePaymentTypePreference?: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class SellContractAndSetupClientDto extends ApiDtoBase { public AcctToken: string; public Last4: string; public ExpMonth?: number; public ExpYear?: number; public AcctType?: AcctType; public BnkRoute?: number; public IsTemp: boolean; public PackageId: number; public InstallmentPlanId: number; public PaymentAmount: number; public StartDate?: string; public FirstName: string; public LastName: string; public Address: string; public City: string; public State: string; public Zip: string; public Email: string; public Gender: string; public Phone: string; public WorkPhone: string; public DateOfBirth?: string; public CellPhone: string; public Note: string; public ExternalId: string; public PromoCode: string; public Username: string; public ReferralTypeId?: number; public EmergencyContactName: string; public EmergencyContactPhone: string; public EmergencyContactType: string; public PaymentMethods: PaymentMethodDto[]; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } // @Route("/sales/contract/sold/new/user", "POST") // @ApiResponse(Description="", ResponseType="typeof(ClubReady.Web.Api.Sales.Model.SellContractAndSetupClientResponse)", StatusCode=200) export class SellContractAndSetupClientRequest extends SellContractAndSetupClientDto implements IRestrictedApiRequest { /** * Api Authentication Key */ // @ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query") public ApiKey: string; /** * Id for the chain of the Api Key */ // @ApiMember(Description="Id for the chain of the Api Key", ParameterType="query") public ChainId?: number; /** * Id of the store for the user */ // @ApiMember(Description="Id of the store for the user", IsRequired=true, ParameterType="query") public StoreId: number; /** * Package Id being sold */ // @ApiMember(Description="Package Id being sold", IsRequired=true) public PackageId: number; /** * Installment Plan Id being sold */ // @ApiMember(Description="Installment Plan Id being sold", IsRequired=true) public InstallmentPlanId: number; /** * Amount being paid */ // @ApiMember(Description="Amount being paid", IsRequired=true) public PaymentAmount: number; /** * Date contract takes affect */ // @ApiMember(Description="Date contract takes affect") public StartDate?: string; /** * First Name */ // @ApiMember(Description="First Name", IsRequired=true) public FirstName: string; /** * Last Name */ // @ApiMember(Description="Last Name", IsRequired=true) public LastName: string; /** * Email Address */ // @ApiMember(Description="Email Address", IsRequired=true) public Email: string; /** * Gender */ // @ApiMember(Description="Gender") public Gender: string; /** * Address */ // @ApiMember(Description="Address") public Address: string; /** * City */ // @ApiMember(Description="City") public City: string; /** * State */ // @ApiMember(Description="State") public State: string; /** * Zip Code */ // @ApiMember(Description="Zip Code") public Zip: string; /** * Home phone */ // @ApiMember(Description="Home phone") public Phone: string; /** * Work phone */ // @ApiMember(Description="Work phone") public WorkPhone: string; /** * Date of Birth */ // @ApiMember(Description="Date of Birth") public DateOfBirth?: string; /** * Cell phone */ // @ApiMember(Description="Cell phone") public CellPhone: string; /** * Add an internal note for the new prospect */ // @ApiMember(Description="Add an internal note for the new prospect") public Note: string; /** * Unique Id for the user from your system. We store internally as ExternalUserId */ // @ApiMember(Description="Unique Id for the user from your system. We store internally as ExternalUserId") public ExternalId: string; /** * Promo code to apply a discount. */ // @ApiMember(Description="Promo code to apply a discount.") public PromoCode: string; /** * Username should be between 4 and 255 characters long */ // @ApiMember(Description="Username should be between 4 and 255 characters long") public Username: string; /** * ReferralTypeId */ // @ApiMember(Description="ReferralTypeId") public ReferralTypeId?: number; /** * Emergency contact name */ // @ApiMember(Description="Emergency contact name") public EmergencyContactName: string; /** * Emergency contact phone number */ // @ApiMember(Description="Emergency contact phone number") public EmergencyContactPhone: string; /** * Emergency contact relationship */ // @ApiMember(Description="Emergency contact relationship") public EmergencyContactType: string; /** * An array of Payment Methods to be used for this purchase. Any entry with PreferredOnFile is assumed if omitted or null. Each object of the array may contain properties:| Property | Description || --- | --- || PaymentMethodType | Usually "AcctToken" (Default or omitted/null) or "PreferredOnFile" || PaymentAmount | The amount to be attempted for this Payment Method. When omitted (or null), the Request's PaymentAmount will be attempted || AcctToken | The AcctToken to attempt payment (when using PaymentMethodType:AcctToken) || ProfileToken | When provided (with AcctToken), a Payment Profile will be created (this will prevent the requirement to call `/sales/paymentprofile/import` (when using PaymentMethodType:AcctToken) || DoNotUpdatePaymentTypePreference | When using ProfileToken, do not set the PaymentTypePreference (for more information, see `/sales/paymentprofile/import` (when using PaymentMethodType:AcctToken) || | |* Scenario #1: Use a Gift Card with PreferredOnFile to cover the amount not approved by the Gift Card. JSON:```json{ PaymentMethods: [ { "PaymentMethodType":"AcctToken", "PaymentAmount":"1.00", "AcctToken":"eyJ...GiftCard AcctToken...", "ProfileToken":"eyJ...Gift Card ProfileToken..." }, { "PaymentMethodType":"PreferredOnFile", "PaymentAmount":"1.00" } ]}```JSV:```[{PaymentMethodType:AcctToken,PaymentAmount:1.00,AcctToken:eyj...,ProfileToken:eyJ...},{PaymentMethodType:PreferredOnFile,PaymentAmount:1.00}]```* Scenario #2: Use a Gift Card with PreferredOnFile to cover the amount not approved by the Gift Card. JSON:```json{ PaymentMethods: [ { "PaymentMethodType":"AcctToken", "PaymentAmount":"1.00", "AcctToken":"eyJ...GiftCard AcctToken...", "ProfileToken":"eyJ...Gift Card ProfileToken..." }, { "PaymentMethodType":"PreferredOnFile", "PaymentAmount":"1.00" } ]}```JSV:```jsv[{PaymentMethodType:AcctToken,PaymentAmount:1.00,AcctToken:eyj...,ProfileToken:eyJ...},{PaymentMethodType:PreferredOnFile,PaymentAmount:1.00}]```Notes: * The example shows PaymentAmount of 1.00 for both "AcctToken" and "PreferredOnFile". This is for the examplewith a total of $1.00. The firstPaymentMethod (the Gift Card) will be attempted for $1.00. If it partially approvesfor less than 1.00 (example: $0.80), the second payment method (PreferredOnFile) will be attempted for the lesser ofit's PaymentAmount and the remaining amount (example: $0.20).* Because this endpoint creates a new user, the "PreferredOnFile" option is not applicable. Also, ProfileToken withthe OwnerType "TempstUser" is required because the Payment Profile owner will be converted to the newly created user.* When using Query String (or this web site), this value must be encoded with JSV [(JSON-like Separated Values)](https://docs.servicestack.net/jsv-format).Basic steps to convert JSON to JSV: 1) Remove properties that are null, 2) Remove white space including line feeds, 3) Remove quotes. */ // @ApiMember(Description="\r\nAn array of Payment Methods to be used for this purchase. Any entry with PreferredOnFile is assumed if omitted or null. \r\n\r\nEach object of the array may contain properties:\r\n\r\n| Property | Description |\r\n| --- | --- |\r\n| PaymentMethodType | Usually \"AcctToken\" (Default or omitted/null) or \"PreferredOnFile\" |\r\n| PaymentAmount | The amount to be attempted for this Payment Method. When omitted (or null), the Request's PaymentAmount will be attempted |\r\n| AcctToken | The AcctToken to attempt payment (when using PaymentMethodType:AcctToken) |\r\n| ProfileToken | When provided (with AcctToken), a Payment Profile will be created (this will prevent the requirement to call `/sales/paymentprofile/import` (when using PaymentMethodType:AcctToken) |\r\n| DoNotUpdatePaymentTypePreference | When using ProfileToken, do not set the PaymentTypePreference (for more information, see `/sales/paymentprofile/import` (when using PaymentMethodType:AcctToken) |\r\n| | |\r\n\r\n* Scenario #1: Use a Gift Card with PreferredOnFile to cover the amount not approved by the Gift Card. \r\n\r\nJSON:\r\n```json\r\n{\r\n PaymentMethods: [\r\n {\r\n \"PaymentMethodType\":\"AcctToken\",\r\n \"PaymentAmount\":\"1.00\",\r\n \"AcctToken\":\"eyJ...GiftCard AcctToken...\",\r\n \"ProfileToken\":\"eyJ...Gift Card ProfileToken...\"\r\n },\r\n {\r\n \"PaymentMethodType\":\"PreferredOnFile\",\r\n \"PaymentAmount\":\"1.00\"\r\n }\r\n ]\r\n}\r\n```\r\nJSV:\r\n```\r\n[{PaymentMethodType:AcctToken,PaymentAmount:1.00,AcctToken:eyj...,ProfileToken:eyJ...},{PaymentMethodType:PreferredOnFile,PaymentAmount:1.00}]\r\n```\r\n\r\n* Scenario #2: Use a Gift Card with PreferredOnFile to cover the amount not approved by the Gift Card. \r\n\r\nJSON:\r\n```json\r\n{\r\n PaymentMethods: [\r\n {\r\n \"PaymentMethodType\":\"AcctToken\",\r\n \"PaymentAmount\":\"1.00\",\r\n \"AcctToken\":\"eyJ...GiftCard AcctToken...\",\r\n \"ProfileToken\":\"eyJ...Gift Card ProfileToken...\"\r\n },\r\n {\r\n \"PaymentMethodType\":\"PreferredOnFile\",\r\n \"PaymentAmount\":\"1.00\"\r\n }\r\n ]\r\n}\r\n```\r\nJSV:\r\n```jsv\r\n[{PaymentMethodType:AcctToken,PaymentAmount:1.00,AcctToken:eyj...,ProfileToken:eyJ...},{PaymentMethodType:PreferredOnFile,PaymentAmount:1.00}]\r\n```\r\n\r\nNotes: \r\n\r\n* The example shows PaymentAmount of 1.00 for both \"AcctToken\" and \"PreferredOnFile\". This is for the example\r\nwith a total of $1.00. The firstPaymentMethod (the Gift Card) will be attempted for $1.00. If it partially approves\r\nfor less than 1.00 (example: $0.80), the second payment method (PreferredOnFile) will be attempted for the lesser of\r\nit's PaymentAmount and the remaining amount (example: $0.20).\r\n\r\n* Because this endpoint creates a new user, the \"PreferredOnFile\" option is not applicable. Also, ProfileToken with\r\nthe OwnerType \"TempstUser\" is required because the Payment Profile owner will be converted to the newly created user.\r\n\r\n* When using Query String (or this web site), this value must be encoded with JSV [(JSON-like Separated Values)](https://docs.servicestack.net/jsv-format).\r\nBasic steps to convert JSON to JSV: 1) Remove properties that are null, 2) Remove white space including line feeds, 3) Remove quotes.\r\n") public PaymentMethods: PaymentMethodDto[]; public RestrictedId?: number; public RestrictedResourceType: RestrictedResourceType; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) AcctToken provided by creating a Payment Profile with the Vault Api. Required if Package requires purchase and PaymentMethods is empty. */ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\nAcctToken provided by creating a Payment Profile with the Vault Api. Required if Package requires purchase and PaymentMethods is empty.") public AcctToken: string; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Last 4 digits of the Payment Profile. Required with AcctToken. */ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\nLast 4 digits of the Payment Profile. Required with AcctToken.") public Last4: string; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) 2 digit expiration month. **Required with AcctToken for Credit Card.** */ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\n2 digit expiration month. **Required with AcctToken for Credit Card.**") public ExpMonth?: number; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) 2 digit expiration year. **Required with AcctToken for Credit Card.** */ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\n2 digit expiration year. **Required with AcctToken for Credit Card.**") public ExpYear?: number; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) The Account Type the Payment Profile
Common Values
TextNumericalAccount Type
VISA1Visa
MC2MasterCard
Disc3Discover
Amex4American Express
PC11Personal Checking
PS12Personal Savings
BC13Business Checking

You may use the Text or the Numerical value.

*/ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\nThe Account Type the Payment Profile\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
TextNumericalAccount Type
VISA1Visa
MC2MasterCard
Disc3Discover
Amex4American Express
PC11Personal Checking
PS12Personal Savings
BC13Business Checking
\r\n

You may use the Text or the Numerical value.

\r\n
") public AcctType?: AcctType; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Bank Routing Number. **Required with AcctToken for Bank Accounts.** */ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\nBank Routing Number. **Required with AcctToken for Bank Accounts.**") public BnkRoute?: number; /** * **Deprecated** (Use `PaymentMethods` with `ProfileToken`) Whether the Payment Profile is Temporary. (One time transactions and Gift Cards are IsTemp = True). */ // @ApiMember(Description="\r\n**Deprecated** (Use `PaymentMethods` with `ProfileToken`) \r\n\r\nWhether the Payment Profile is Temporary. (One time transactions and Gift Cards are IsTemp = True).") public IsTemp: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'SellContractAndSetupClientRequest'; } public getMethod() { return 'POST'; } public createResponse() {} }