/* Options: Date: 2025-07-19 11:27:36 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.clubready.com/api/current //Package: //GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False //AddDescriptionAsComments: True //AddImplicitVersion: IncludeTypes: ContractSoldNewUserEndpoint.* //ExcludeTypes: //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.*; import java.util.*; import net.servicestack.client.*; public class dtos { @Route(Path="/sales/contract/sold/new/user", Verbs="POST") @ApiResponse(Description="", ResponseType=ContractSoldNewUserResponse.class, StatusCode=200) public static class ContractSoldNewUserEndpoint implements IContractSoldNewUserEndpoint, IRestrictedApiRequest { /** * IP address of the end user */ @ApiMember(Description="IP address of the end user", Name="X-Forwarded-For", ParameterType="header") public String XForwardedFor = null; /** * Api Authentication Key */ @ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query") public String ApiKey = null; /** * Id for the chain of the Api Key */ @ApiMember(Description="Id for the chain of the Api Key", ParameterType="query") public Integer ChainId = null; /** * Id of the store for the user */ @ApiMember(Description="Id of the store for the user", IsRequired=true, ParameterType="query") public Integer StoreId = null; /** * Package Id being sold */ @ApiMember(Description="Package Id being sold", IsRequired=true) public Integer PackageId = null; /** * Installment Plan Id being sold */ @ApiMember(Description="Installment Plan Id being sold", IsRequired=true) public Integer InstallmentPlanId = null; /** * Amount being paid */ @ApiMember(Description="Amount being paid", IsRequired=true) public BigDecimal PaymentAmount = null; /** * Date contract takes affect */ @ApiMember(Description="Date contract takes affect") public Date StartDate = null; /** * First Name */ @ApiMember(Description="First Name", IsRequired=true) public String FirstName = null; /** * Last Name */ @ApiMember(Description="Last Name", IsRequired=true) public String LastName = null; /** * Email Address */ @ApiMember(Description="Email Address", IsRequired=true) public String Email = null; /** * Gender */ @ApiMember(Description="Gender") public String Gender = null; /** * Address */ @ApiMember(Description="Address") public String Address = null; /** * City */ @ApiMember(Description="City") public String City = null; /** * State */ @ApiMember(Description="State") public String State = null; /** * Zip Code */ @ApiMember(Description="Zip Code") public String Zip = null; /** * Home phone */ @ApiMember(Description="Home phone") public String Phone = null; /** * Work phone */ @ApiMember(Description="Work phone") public String WorkPhone = null; /** * Date of Birth */ @ApiMember(Description="Date of Birth") public Date DateOfBirth = null; /** * Cell phone */ @ApiMember(Description="Cell phone") public String CellPhone = null; /** * Add an internal note for the new prospect */ @ApiMember(Description="Add an internal note for the new prospect") public String Note = null; /** * 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 String ExternalId = null; /** * Promo code to apply a discount. */ @ApiMember(Description="Promo code to apply a discount.") public String PromoCode = null; /** * Username should be between 4 and 255 characters long */ @ApiMember(Description="Username should be between 4 and 255 characters long") public String Username = null; /** * ReferralTypeId */ @ApiMember(Description="ReferralTypeId") public Integer ReferralTypeId = null; /** * Emergency contact name */ @ApiMember(Description="Emergency contact name") public String EmergencyContactName = null; /** * Emergency contact phone number */ @ApiMember(Description="Emergency contact phone number") public String EmergencyContactPhone = null; /** * Emergency contact relationship */ @ApiMember(Description="Emergency contact relationship") public String EmergencyContactType = null; /** * An array of PaymentMethod objects to be used for this purchase. A null array (or omitted property) will use thePreferred method for the total amount.Each object of the array may contain properties:| Property | Description || --- | --- || PaymentAmount | The maximum amount to be attempted for this PaymentMethod. When null or omitted, the remaining PaymentAmount will be attempted. || **Use only one of the following three** | **UsePreferred** or **AcctToken** or **ProfileToken [DoNotUpdatePaymentTypePreference]** || UsePreferred | Set to `true` to use the Preferred method, otherwise omit the value or set to `null` or `false` || AcctToken | The AcctToken to attempt payment || ProfileToken | When provided, a PaymentMethod will be created (this will prevent the requirement to call `/sales/paymentprofile/import`) || DoNotUpdatePaymentTypePreference | [Optional] When creating a PaymentMethod (ProfileToken), it is set as the preferred method. To not create as preferred, set `DoNotUpdatePaymentTypePreference` to `true`. (for more information, see `/sales/paymentprofile/import`) || | |Only one of `UsePreferred`, `AcctToken`, `ProfileToken` or is needed. `DoNotUpdatePaymentTypePreference` is optionaland only valid with `ProfileToken`.* Scenario #1: Sell $3 contract using an existing PaymentMethod (i.e. AcctToken) for $1 and the Preferred method for $2.JSON:```json{ ... "PaymentAmount": 3.00, "PaymentMethods": [ { "PaymentAmount": "1.00", "AcctToken": "eyJ..." }, { "PaymentAmount": "2.00", "UsePreferred": true } ]}```JSV:```...,PaymentAmount:3.00,PaymentMethods:[{PaymentAmount:1.00,AcctToken:eyJ...NdQ},{PaymentAmount:2.00,UsePreferred:true}]```* Scenario #2: Sell $3 contract using a new PaymentMethod (i.e. ProfileToken) for $1 and the Preferred method for the remaining.Note, the sum of the PaymentMethod's PaymentAmount ($4) is greater than the agreement amount ($3). PaymentAmount is the maximum amount.This allows the first PaymentMethod to decline or partially approve (common with gift cards). Therefore, if the first PaymentMethod approvesfor $0.75, the second will be attempted for $2.25.JSON:```json{ ... "PaymentAmount": 3.00, "PaymentMethods": [ { "PaymentAmount": "1.00", "ProfileToken": "eyJ..." }, { "PaymentAmount": "3.00", "UsePreferred": true } ]}```JSV:```jsv...,PaymentAmount:3.00,PaymentMethods:[{PaymentAmount:1.00,ProfileToken:eyj...NdQ},{PaymentAmount:3.00,UsePreferred:true}]```Notes: * AcctTokens should not be parsed or persisted in the client application. They are currently jsonbased, but can be updated without notice.* ProfileToken is used to create a PaymentMethod in the ClubReady system. For more information, see `/sales/paymentprofile/import`.* If `PaymentMethods` is missing or `null`, the Preferred method will be used.* If a `PaymentMethods` `PaymentAmount` is not specified, the remaining amount will be attempted.* If a PaymentMethod is partially approved (common for gift cards), the PaymentMethod with anunspecified PaymentAmount will be charged the remaining amount, including the unapproved amount not.* When testing with this website, the PaymentMethods textbox needs JSV and only the square brackets and contents(e.g. `[{PaymentAmount:1.00,UsePreferred:true}]`). */ @ApiMember(Description="An array of PaymentMethod objects to be used for this purchase. A null array (or omitted property) will use the\r\nPreferred method for the total amount.\r\n\r\nEach object of the array may contain properties:\r\n\r\n| Property | Description |\r\n| --- | --- |\r\n| PaymentAmount | The maximum amount to be attempted for this PaymentMethod. When null or omitted, the remaining PaymentAmount will be attempted. |\r\n| **Use only one of the following three** | **UsePreferred** or **AcctToken** or **ProfileToken [DoNotUpdatePaymentTypePreference]** |\r\n| UsePreferred | Set to `true` to use the Preferred method, otherwise omit the value or set to `null` or `false` |\r\n| AcctToken | The AcctToken to attempt payment |\r\n| ProfileToken | When provided, a PaymentMethod will be created (this will prevent the requirement to call `/sales/paymentprofile/import`) |\r\n| DoNotUpdatePaymentTypePreference | [Optional] When creating a PaymentMethod (ProfileToken), it is set as the preferred method. To not create as preferred, set `DoNotUpdatePaymentTypePreference` to `true`. (for more information, see `/sales/paymentprofile/import`) |\r\n| | |\r\n\r\nOnly one of `UsePreferred`, `AcctToken`, `ProfileToken` or is needed. `DoNotUpdatePaymentTypePreference` is optional\r\nand only valid with `ProfileToken`.\r\n\r\n* Scenario #1: Sell $3 contract using an existing PaymentMethod (i.e. AcctToken) for $1 and the Preferred method for $2.\r\n\r\nJSON:\r\n```json\r\n{\r\n ...\r\n \"PaymentAmount\": 3.00,\r\n \"PaymentMethods\": [\r\n {\r\n \"PaymentAmount\": \"1.00\",\r\n \"AcctToken\": \"eyJ...\"\r\n },\r\n {\r\n \"PaymentAmount\": \"2.00\",\r\n \"UsePreferred\": true\r\n }\r\n ]\r\n}\r\n```\r\nJSV:\r\n```\r\n...,PaymentAmount:3.00,PaymentMethods:[{PaymentAmount:1.00,AcctToken:eyJ...NdQ},{PaymentAmount:2.00,UsePreferred:true}]\r\n```\r\n\r\n* Scenario #2: Sell $3 contract using a new PaymentMethod (i.e. ProfileToken) for $1 and the Preferred method for the remaining.\r\nNote, the sum of the PaymentMethod's PaymentAmount ($4) is greater than the agreement amount ($3). PaymentAmount is the maximum amount.\r\nThis allows the first PaymentMethod to decline or partially approve (common with gift cards). Therefore, if the first PaymentMethod approves\r\nfor $0.75, the second will be attempted for $2.25.\r\n\r\nJSON:\r\n```json\r\n{ \r\n ...\r\n \"PaymentAmount\": 3.00,\r\n \"PaymentMethods\": [\r\n {\r\n \"PaymentAmount\": \"1.00\",\r\n \"ProfileToken\": \"eyJ...\"\r\n },\r\n {\r\n \"PaymentAmount\": \"3.00\",\r\n \"UsePreferred\": true\r\n }\r\n ]\r\n}\r\n```\r\nJSV:\r\n```jsv\r\n...,PaymentAmount:3.00,PaymentMethods:[{PaymentAmount:1.00,ProfileToken:eyj...NdQ},{PaymentAmount:3.00,UsePreferred:true}]\r\n```\r\n\r\nNotes: \r\n\r\n* AcctTokens should not be parsed or persisted in the client application. They are currently json\r\nbased, but can be updated without notice.\r\n\r\n* ProfileToken is used to create a PaymentMethod in the ClubReady system. For more information, \r\nsee `/sales/paymentprofile/import`.\r\n\r\n* If `PaymentMethods` is missing or `null`, the Preferred method will be used.\r\n\r\n* If a `PaymentMethods` `PaymentAmount` is not specified, the remaining amount will be attempted.\r\n\r\n* If a PaymentMethod is partially approved (common for gift cards), the PaymentMethod with an\r\nunspecified PaymentAmount will be charged the remaining amount, including the unapproved amount not.\r\n\r\n* When testing with this website, the PaymentMethods textbox needs JSV and only the square brackets and contents\r\n(e.g. `[{PaymentAmount:1.00,UsePreferred:true}]`).") public ArrayList PaymentMethods = null; public Integer RestrictedId = null; public RestrictedResourceType RestrictedResourceType = null; public String getXForwardedFor() { return XForwardedFor; } public ContractSoldNewUserEndpoint setXForwardedFor(String value) { this.XForwardedFor = value; return this; } public String getApiKey() { return ApiKey; } public ContractSoldNewUserEndpoint setApiKey(String value) { this.ApiKey = value; return this; } public Integer getChainId() { return ChainId; } public ContractSoldNewUserEndpoint setChainId(Integer value) { this.ChainId = value; return this; } public Integer getStoreId() { return StoreId; } public ContractSoldNewUserEndpoint setStoreId(Integer value) { this.StoreId = value; return this; } public Integer getPackageId() { return PackageId; } public ContractSoldNewUserEndpoint setPackageId(Integer value) { this.PackageId = value; return this; } public Integer getInstallmentPlanId() { return InstallmentPlanId; } public ContractSoldNewUserEndpoint setInstallmentPlanId(Integer value) { this.InstallmentPlanId = value; return this; } public BigDecimal getPaymentAmount() { return PaymentAmount; } public ContractSoldNewUserEndpoint setPaymentAmount(BigDecimal value) { this.PaymentAmount = value; return this; } public Date getStartDate() { return StartDate; } public ContractSoldNewUserEndpoint setStartDate(Date value) { this.StartDate = value; return this; } public String getFirstName() { return FirstName; } public ContractSoldNewUserEndpoint setFirstName(String value) { this.FirstName = value; return this; } public String getLastName() { return LastName; } public ContractSoldNewUserEndpoint setLastName(String value) { this.LastName = value; return this; } public String getEmail() { return Email; } public ContractSoldNewUserEndpoint setEmail(String value) { this.Email = value; return this; } public String getGender() { return Gender; } public ContractSoldNewUserEndpoint setGender(String value) { this.Gender = value; return this; } public String getAddress() { return Address; } public ContractSoldNewUserEndpoint setAddress(String value) { this.Address = value; return this; } public String getCity() { return City; } public ContractSoldNewUserEndpoint setCity(String value) { this.City = value; return this; } public String getState() { return State; } public ContractSoldNewUserEndpoint setState(String value) { this.State = value; return this; } public String getZip() { return Zip; } public ContractSoldNewUserEndpoint setZip(String value) { this.Zip = value; return this; } public String getPhone() { return Phone; } public ContractSoldNewUserEndpoint setPhone(String value) { this.Phone = value; return this; } public String getWorkPhone() { return WorkPhone; } public ContractSoldNewUserEndpoint setWorkPhone(String value) { this.WorkPhone = value; return this; } public Date getDateOfBirth() { return DateOfBirth; } public ContractSoldNewUserEndpoint setDateOfBirth(Date value) { this.DateOfBirth = value; return this; } public String getCellPhone() { return CellPhone; } public ContractSoldNewUserEndpoint setCellPhone(String value) { this.CellPhone = value; return this; } public String getNote() { return Note; } public ContractSoldNewUserEndpoint setNote(String value) { this.Note = value; return this; } public String getExternalId() { return ExternalId; } public ContractSoldNewUserEndpoint setExternalId(String value) { this.ExternalId = value; return this; } public String getPromoCode() { return PromoCode; } public ContractSoldNewUserEndpoint setPromoCode(String value) { this.PromoCode = value; return this; } public String getUsername() { return Username; } public ContractSoldNewUserEndpoint setUsername(String value) { this.Username = value; return this; } public Integer getReferralTypeId() { return ReferralTypeId; } public ContractSoldNewUserEndpoint setReferralTypeId(Integer value) { this.ReferralTypeId = value; return this; } public String getEmergencyContactName() { return EmergencyContactName; } public ContractSoldNewUserEndpoint setEmergencyContactName(String value) { this.EmergencyContactName = value; return this; } public String getEmergencyContactPhone() { return EmergencyContactPhone; } public ContractSoldNewUserEndpoint setEmergencyContactPhone(String value) { this.EmergencyContactPhone = value; return this; } public String getEmergencyContactType() { return EmergencyContactType; } public ContractSoldNewUserEndpoint setEmergencyContactType(String value) { this.EmergencyContactType = value; return this; } public ArrayList getPaymentMethods() { return PaymentMethods; } public ContractSoldNewUserEndpoint setPaymentMethods(ArrayList value) { this.PaymentMethods = value; return this; } public Integer getRestrictedId() { return RestrictedId; } public ContractSoldNewUserEndpoint setRestrictedId(Integer value) { this.RestrictedId = value; return this; } public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; } public ContractSoldNewUserEndpoint setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; } } public static enum RestrictedResourceType { Store, Chain, User, Undefined; } public static interface IApiDtoBase { public String ApiKey = null; public Integer StoreId = null; public Integer ChainId = null; } public static interface IRestrictedApiRequest implements IApiKeyEndpoint { public Integer RestrictedId = null; public RestrictedResourceType RestrictedResourceType = null; } public static interface IApiKeyEndpoint { public String ApiKey = null; } @DataContract public static class PaymentMethodDto { @DataMember public String AcctToken = null; @DataMember public String ProfileToken = null; @DataMember public String PaymentProfileId = null; @DataMember public BigDecimal PaymentAmount = null; @DataMember public Boolean UsePreferred = null; @DataMember public Boolean DoNotUpdatePaymentTypePreference = null; public String getAcctToken() { return AcctToken; } public PaymentMethodDto setAcctToken(String value) { this.AcctToken = value; return this; } public String getProfileToken() { return ProfileToken; } public PaymentMethodDto setProfileToken(String value) { this.ProfileToken = value; return this; } public String getPaymentProfileId() { return PaymentProfileId; } public PaymentMethodDto setPaymentProfileId(String value) { this.PaymentProfileId = value; return this; } public BigDecimal getPaymentAmount() { return PaymentAmount; } public PaymentMethodDto setPaymentAmount(BigDecimal value) { this.PaymentAmount = value; return this; } public Boolean isUsePreferred() { return UsePreferred; } public PaymentMethodDto setUsePreferred(Boolean value) { this.UsePreferred = value; return this; } public Boolean isDoNotUpdatePaymentTypePreference() { return DoNotUpdatePaymentTypePreference; } public PaymentMethodDto setDoNotUpdatePaymentTypePreference(Boolean value) { this.DoNotUpdatePaymentTypePreference = value; return this; } } @DataContract public static 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); private final int value; AcctType(final int intValue) { value = intValue; } public int getValue() { return value; } } public static interface IContractSoldNewUserEndpoint implements IApiDtoBase { public String AcctToken = null; public String Last4 = null; public Integer ExpMonth = null; public Integer ExpYear = null; public AcctType AcctType = null; public Integer BnkRoute = null; public Boolean IsTemp = null; public Integer PackageId = null; public Integer InstallmentPlanId = null; public BigDecimal PaymentAmount = null; public Date StartDate = null; public String FirstName = null; public String LastName = null; public String Address = null; public String City = null; public String State = null; public String Zip = null; public String Email = null; public String Gender = null; public String Phone = null; public String WorkPhone = null; public Date DateOfBirth = null; public String CellPhone = null; public String Note = null; public String ExternalId = null; public String PromoCode = null; public String Username = null; public Integer ReferralTypeId = null; public String EmergencyContactName = null; public String EmergencyContactPhone = null; public String EmergencyContactType = null; public ArrayList PaymentMethods = null; } }