/* Options: Date: 2025-07-19 18:44:57 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.clubready.com/api/current //GlobalNamespace: //MakePartial: True //MakeVirtual: True //MakeInternal: False //MakeDataContractsExtensible: False //AddNullableAnnotations: False //AddReturnMarker: True //AddDescriptionAsComments: True //AddDataContractAttributes: False //AddIndexesToDataMembers: False //AddGeneratedCodeAttributes: False //AddResponseStatus: False //AddImplicitVersion: //InitializeCollections: True //ExportValueTypes: False IncludeTypes: ContractSoldNewUserEndpoint.* //ExcludeTypes: //AddNamespaces: //AddDefaultXmlNamespace: http://schemas.servicestack.net/types */ using System; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using ServiceStack; using ServiceStack.DataAnnotations; using ClubReady.Web.Api; using ClubReady.Core.Api; using ClubReady.Core.Api.Models; using ClubReadyGateway.Vault; using ClubReady.Core.Api.Sales; using ClubReady.Web.Api.Sales; namespace ClubReady.Core.Api { public partial interface IApiDtoBase { string ApiKey { get; set; } int? StoreId { get; set; } int? ChainId { get; set; } } } namespace ClubReady.Core.Api.Models { [DataContract] public partial class PaymentMethodDto { [DataMember] public virtual string AcctToken { get; set; } [DataMember] public virtual string ProfileToken { get; set; } [DataMember] public virtual string PaymentProfileId { get; set; } [DataMember] public virtual decimal? PaymentAmount { get; set; } [DataMember] public virtual bool? UsePreferred { get; set; } [DataMember] public virtual bool? DoNotUpdatePaymentTypePreference { get; set; } } } namespace ClubReady.Core.Api.Sales { public partial interface IContractSoldNewUserEndpoint : IApiDtoBase { string AcctToken { get; set; } string Last4 { get; set; } int? ExpMonth { get; set; } int? ExpYear { get; set; } AcctType? AcctType { get; set; } int? BnkRoute { get; set; } bool IsTemp { get; set; } int PackageId { get; set; } int InstallmentPlanId { get; set; } decimal PaymentAmount { get; set; } DateTime? StartDate { get; set; } string FirstName { get; set; } string LastName { get; set; } string Address { get; set; } string City { get; set; } string State { get; set; } string Zip { get; set; } string Email { get; set; } string Gender { get; set; } string Phone { get; set; } string WorkPhone { get; set; } DateTime? DateOfBirth { get; set; } string CellPhone { get; set; } string Note { get; set; } string ExternalId { get; set; } string PromoCode { get; set; } string Username { get; set; } int? ReferralTypeId { get; set; } string EmergencyContactName { get; set; } string EmergencyContactPhone { get; set; } string EmergencyContactType { get; set; } List PaymentMethods { get; set; } } } namespace ClubReady.Web.Api { public partial interface IApiKeyEndpoint { string ApiKey { get; set; } } public partial interface IRestrictedApiRequest : IApiKeyEndpoint { int? RestrictedId { get; set; } RestrictedResourceType RestrictedResourceType { get; set; } } public enum RestrictedResourceType { Store, Chain, User, Undefined, } } namespace ClubReady.Web.Api.Sales { [Route("/sales/contract/sold/new/user", "POST")] [ApiResponse(Description="", ResponseType=typeof(ClubReady.Web.Api.Sales.ContractSoldNewUserResponse), StatusCode=200)] public partial class ContractSoldNewUserEndpoint : IContractSoldNewUserEndpoint, IRestrictedApiRequest { public ContractSoldNewUserEndpoint() { PaymentMethods = new List{}; } /// ///IP address of the end user /// [ApiMember(Description="IP address of the end user", Name="X-Forwarded-For", ParameterType="header")] public virtual string XForwardedFor { get; set; } /// ///Api Authentication Key /// [ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query")] public virtual string ApiKey { get; set; } /// ///Id for the chain of the Api Key /// [ApiMember(Description="Id for the chain of the Api Key", ParameterType="query")] public virtual int? ChainId { get; set; } /// ///Id of the store for the user /// [ApiMember(Description="Id of the store for the user", IsRequired=true, ParameterType="query")] public virtual int? StoreId { get; set; } /// ///Package Id being sold /// [ApiMember(Description="Package Id being sold", IsRequired=true)] public virtual int PackageId { get; set; } /// ///Installment Plan Id being sold /// [ApiMember(Description="Installment Plan Id being sold", IsRequired=true)] public virtual int InstallmentPlanId { get; set; } /// ///Amount being paid /// [ApiMember(Description="Amount being paid", IsRequired=true)] public virtual decimal PaymentAmount { get; set; } /// ///Date contract takes affect /// [ApiMember(Description="Date contract takes affect")] public virtual DateTime? StartDate { get; set; } /// ///First Name /// [ApiMember(Description="First Name", IsRequired=true)] public virtual string FirstName { get; set; } /// ///Last Name /// [ApiMember(Description="Last Name", IsRequired=true)] public virtual string LastName { get; set; } /// ///Email Address /// [ApiMember(Description="Email Address", IsRequired=true)] public virtual string Email { get; set; } /// ///Gender /// [ApiMember(Description="Gender")] public virtual string Gender { get; set; } /// ///Address /// [ApiMember(Description="Address")] public virtual string Address { get; set; } /// ///City /// [ApiMember(Description="City")] public virtual string City { get; set; } /// ///State /// [ApiMember(Description="State")] public virtual string State { get; set; } /// ///Zip Code /// [ApiMember(Description="Zip Code")] public virtual string Zip { get; set; } /// ///Home phone /// [ApiMember(Description="Home phone")] public virtual string Phone { get; set; } /// ///Work phone /// [ApiMember(Description="Work phone")] public virtual string WorkPhone { get; set; } /// ///Date of Birth /// [ApiMember(Description="Date of Birth")] public virtual DateTime? DateOfBirth { get; set; } /// ///Cell phone /// [ApiMember(Description="Cell phone")] public virtual string CellPhone { get; set; } /// ///Add an internal note for the new prospect /// [ApiMember(Description="Add an internal note for the new prospect")] public virtual string Note { get; set; } /// ///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 virtual string ExternalId { get; set; } /// ///Promo code to apply a discount. /// [ApiMember(Description="Promo code to apply a discount.")] public virtual string PromoCode { get; set; } /// ///Username should be between 4 and 255 characters long /// [ApiMember(Description="Username should be between 4 and 255 characters long")] public virtual string Username { get; set; } /// ///ReferralTypeId /// [ApiMember(Description="ReferralTypeId")] public virtual int? ReferralTypeId { get; set; } /// ///Emergency contact name /// [ApiMember(Description="Emergency contact name")] public virtual string EmergencyContactName { get; set; } /// ///Emergency contact phone number /// [ApiMember(Description="Emergency contact phone number")] public virtual string EmergencyContactPhone { get; set; } /// ///Emergency contact relationship /// [ApiMember(Description="Emergency contact relationship")] public virtual string EmergencyContactType { get; set; } /// ///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 virtual List PaymentMethods { get; set; } public virtual int? RestrictedId { get; set; } public virtual RestrictedResourceType RestrictedResourceType { get; set; } } } namespace ClubReadyGateway.Vault { [DataContract] public 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, } }