(* Options: Date: 2025-07-19 19:29:44 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.clubready.com/api/current //GlobalNamespace: //MakeDataContractsExtensible: False //AddReturnMarker: True //AddDescriptionAsComments: True //AddDataContractAttributes: False //AddIndexesToDataMembers: False //AddGeneratedCodeAttributes: False //AddResponseStatus: False //AddImplicitVersion: //ExportValueTypes: False IncludeTypes: ContractSoldNewUserEndpoint.* //ExcludeTypes: //InitializeCollections: True //AddNamespaces: *) namespace ClubReady.Core.Api open System open System.Collections open System.Collections.Generic open System.Runtime.Serialization open ServiceStack open ServiceStack.DataAnnotations type RestrictedResourceType = | Store = 0 | Chain = 1 | User = 2 | Undefined = 3 [] type IApiDtoBase = abstract ApiKey:String with get,set abstract StoreId:Nullable with get,set abstract ChainId:Nullable with get,set [] type IRestrictedApiRequest = abstract RestrictedId:Nullable with get,set abstract RestrictedResourceType:RestrictedResourceType with get,set [] type IApiKeyEndpoint = abstract ApiKey:String with get,set [] [] type PaymentMethodDto() = [] member val AcctToken:String = null with get,set [] member val ProfileToken:String = null with get,set [] member val PaymentProfileId:String = null with get,set [] member val PaymentAmount:Nullable = new Nullable() with get,set [] member val UsePreferred:Nullable = new Nullable() with get,set [] member val DoNotUpdatePaymentTypePreference:Nullable = new Nullable() with get,set [] type 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 [] type IContractSoldNewUserEndpoint = abstract AcctToken:String with get,set abstract Last4:String with get,set abstract ExpMonth:Nullable with get,set abstract ExpYear:Nullable with get,set abstract AcctType:Nullable with get,set abstract BnkRoute:Nullable with get,set abstract IsTemp:Boolean with get,set abstract PackageId:Int32 with get,set abstract InstallmentPlanId:Int32 with get,set abstract PaymentAmount:Decimal with get,set abstract StartDate:Nullable with get,set abstract FirstName:String with get,set abstract LastName:String with get,set abstract Address:String with get,set abstract City:String with get,set abstract State:String with get,set abstract Zip:String with get,set abstract Email:String with get,set abstract Gender:String with get,set abstract Phone:String with get,set abstract WorkPhone:String with get,set abstract DateOfBirth:Nullable with get,set abstract CellPhone:String with get,set abstract Note:String with get,set abstract ExternalId:String with get,set abstract PromoCode:String with get,set abstract Username:String with get,set abstract ReferralTypeId:Nullable with get,set abstract EmergencyContactName:String with get,set abstract EmergencyContactPhone:String with get,set abstract EmergencyContactType:String with get,set abstract PaymentMethods:ResizeArray with get,set [] [, StatusCode=200)>] [] type ContractSoldNewUserEndpoint() = /// ///IP address of the end user /// [] member val XForwardedFor:String = null with get,set /// ///Api Authentication Key /// [] member val ApiKey:String = null with get,set /// ///Id for the chain of the Api Key /// [] member val ChainId:Nullable = new Nullable() with get,set /// ///Id of the store for the user /// [] member val StoreId:Nullable = new Nullable() with get,set /// ///Package Id being sold /// [] member val PackageId:Int32 = new Int32() with get,set /// ///Installment Plan Id being sold /// [] member val InstallmentPlanId:Int32 = new Int32() with get,set /// ///Amount being paid /// [] member val PaymentAmount:Decimal = new Decimal() with get,set /// ///Date contract takes affect /// [] member val StartDate:Nullable = new Nullable() with get,set /// ///First Name /// [] member val FirstName:String = null with get,set /// ///Last Name /// [] member val LastName:String = null with get,set /// ///Email Address /// [] member val Email:String = null with get,set /// ///Gender /// [] member val Gender:String = null with get,set /// ///Address /// [] member val Address:String = null with get,set /// ///City /// [] member val City:String = null with get,set /// ///State /// [] member val State:String = null with get,set /// ///Zip Code /// [] member val Zip:String = null with get,set /// ///Home phone /// [] member val Phone:String = null with get,set /// ///Work phone /// [] member val WorkPhone:String = null with get,set /// ///Date of Birth /// [] member val DateOfBirth:Nullable = new Nullable() with get,set /// ///Cell phone /// [] member val CellPhone:String = null with get,set /// ///Add an internal note for the new prospect /// [] member val Note:String = null with get,set /// ///Unique Id for the user from your system. We store internally as ExternalUserId /// [] member val ExternalId:String = null with get,set /// ///Promo code to apply a discount. /// [] member val PromoCode:String = null with get,set /// ///Username should be between 4 and 255 characters long /// [] member val Username:String = null with get,set /// ///ReferralTypeId /// [] member val ReferralTypeId:Nullable = new Nullable() with get,set /// ///Emergency contact name /// [] member val EmergencyContactName:String = null with get,set /// ///Emergency contact phone number /// [] member val EmergencyContactPhone:String = null with get,set /// ///Emergency contact relationship /// [] member val EmergencyContactType:String = null with 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}]`). /// [] member val PaymentMethods:ResizeArray = new ResizeArray() with get,set member val RestrictedId:Nullable = new Nullable() with get,set member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() with get,set