/* Options: Date: 2025-07-19 11:39:50 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: AddNewUserEndpoint.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum RestrictedResourceType { Store, Chain, User, Undefined, } abstract class IApiDtoBase { String? ApiKey; int? StoreId; int? ChainId; } abstract class IRestrictedApiRequest extends IApiKeyEndpoint { int? RestrictedId; RestrictedResourceType? RestrictedResourceType; } abstract class IApiKeyEndpoint { String? ApiKey; } abstract class IAddNewUserEndpoint extends IApiDtoBase { int? MemberId; int? PackageId; int? InstallmentId; DateTime? StartDate; String? PromoCode; int? StaffId; String? FirstName; String? LastName; String? Address; String? City; String? State; String? Zip; String? Email; String? Gender; String? Phone; String? WorkPhone; DateTime? DateOfBirth; String? CellPhone; String? Note; String? ExternalId; String? Username; int? ReferralTypeId; String? EmergencyContactName; String? EmergencyContactPhone; String? EmergencyContactType; } class ApiResponse2Base implements IConvertible { bool? success; String? message; ApiResponse2Base({this.success,this.message}); ApiResponse2Base.fromJson(Map json) { fromMap(json); } fromMap(Map json) { success = json['success']; message = json['message']; return this; } Map toJson() => { 'success': success, 'message': message }; getTypeName() => "ApiResponse2Base"; TypeContext? context = _ctx; } class AddNewUserResponse extends ApiResponse2Base implements IConvertible { String? incompleteAgreementToken; int? memberId; int? contractId; AddNewUserResponse({this.incompleteAgreementToken,this.memberId,this.contractId}); AddNewUserResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); incompleteAgreementToken = json['incompleteAgreementToken']; memberId = json['memberId']; contractId = json['contractId']; return this; } Map toJson() => super.toJson()..addAll({ 'incompleteAgreementToken': incompleteAgreementToken, 'memberId': memberId, 'contractId': contractId }); getTypeName() => "AddNewUserResponse"; TypeContext? context = _ctx; } // @Route("/sales/agreement/addNewUser", "POST") // @ApiResponse(Description="", ResponseType=typeof(AddNewUserResponse), StatusCode=200) class AddNewUserEndpoint implements IReturn, IAddNewUserEndpoint, IRestrictedApiRequest, IConvertible { /** * IP address of the end user */ // @ApiMember(Description="IP address of the end user", IsRequired=true, Name="X-Forwarded-For", ParameterType="header") String? XForwardedFor; /** * Api Authentication Key */ // @ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query") String? ApiKey; /** * Member Id of the user buying the Package */ // @ApiMember(Description="Member Id of the user buying the Package", IsRequired=true, ParameterType="query") int? MemberId; /** * Id of the store for the user */ // @ApiMember(Description="Id of the store for the user", IsRequired=true) int? StoreId; int? ChainId; /** * Package Id number of the package being purchased */ // @ApiMember(Description="Package Id number of the package being purchased", IsRequired=true) int? PackageId; /** * Installment Plan Id being purchased. If empty, the default package will be selected. */ // @ApiMember(Description="Installment Plan Id being purchased. If empty, the default package will be selected.") int? InstallmentId; /** * Date contract takes affect */ // @ApiMember(Description="Date contract takes affect") DateTime? StartDate; /** * Promo code to apply a discount. */ // @ApiMember(Description="Promo code to apply a discount.") String? PromoCode; /** * Staff Id of salesperson who sold the agreement. */ // @ApiMember(Description="Staff Id of salesperson who sold the agreement.") int? StaffId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; /** * First Name */ // @ApiMember(Description="First Name", IsRequired=true) String? FirstName; /** * Last Name */ // @ApiMember(Description="Last Name", IsRequired=true) String? LastName; /** * Email Address */ // @ApiMember(Description="Email Address", IsRequired=true) String? Email; /** * Gender */ // @ApiMember(Description="Gender") String? Gender; /** * Address */ // @ApiMember(Description="Address") String? Address; /** * City */ // @ApiMember(Description="City") String? City; /** * State */ // @ApiMember(Description="State") String? State; /** * Zip Code */ // @ApiMember(Description="Zip Code") String? Zip; /** * Home phone */ // @ApiMember(Description="Home phone") String? Phone; /** * Work phone */ // @ApiMember(Description="Work phone") String? WorkPhone; /** * Date of Birth */ // @ApiMember(Description="Date of Birth") DateTime? DateOfBirth; /** * Cell phone */ // @ApiMember(Description="Cell phone") String? CellPhone; /** * Add an internal note for the new prospect */ // @ApiMember(Description="Add an internal note for the new prospect") String? Note; /** * 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") String? ExternalId; /** * Username should be between 4 and 255 characters long */ // @ApiMember(Description="Username should be between 4 and 255 characters long") String? Username; /** * ReferralTypeId */ // @ApiMember(Description="ReferralTypeId") int? ReferralTypeId; /** * Emergency contact name */ // @ApiMember(Description="Emergency contact name") String? EmergencyContactName; /** * Emergency contact phone number */ // @ApiMember(Description="Emergency contact phone number") String? EmergencyContactPhone; /** * Emergency contact relationship */ // @ApiMember(Description="Emergency contact relationship") String? EmergencyContactType; AddNewUserEndpoint({this.XForwardedFor,this.ApiKey,this.MemberId,this.StoreId,this.ChainId,this.PackageId,this.InstallmentId,this.StartDate,this.PromoCode,this.StaffId,this.RestrictedId,this.RestrictedResourceType,this.FirstName,this.LastName,this.Email,this.Gender,this.Address,this.City,this.State,this.Zip,this.Phone,this.WorkPhone,this.DateOfBirth,this.CellPhone,this.Note,this.ExternalId,this.Username,this.ReferralTypeId,this.EmergencyContactName,this.EmergencyContactPhone,this.EmergencyContactType}); AddNewUserEndpoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { XForwardedFor = json['XForwardedFor']; ApiKey = json['ApiKey']; MemberId = json['MemberId']; StoreId = json['StoreId']; ChainId = json['ChainId']; PackageId = json['PackageId']; InstallmentId = json['InstallmentId']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); PromoCode = json['PromoCode']; StaffId = json['StaffId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); FirstName = json['FirstName']; LastName = json['LastName']; Email = json['Email']; Gender = json['Gender']; Address = json['Address']; City = json['City']; State = json['State']; Zip = json['Zip']; Phone = json['Phone']; WorkPhone = json['WorkPhone']; DateOfBirth = JsonConverters.fromJson(json['DateOfBirth'],'DateTime',context!); CellPhone = json['CellPhone']; Note = json['Note']; ExternalId = json['ExternalId']; Username = json['Username']; ReferralTypeId = json['ReferralTypeId']; EmergencyContactName = json['EmergencyContactName']; EmergencyContactPhone = json['EmergencyContactPhone']; EmergencyContactType = json['EmergencyContactType']; return this; } Map toJson() => { 'XForwardedFor': XForwardedFor, 'ApiKey': ApiKey, 'MemberId': MemberId, 'StoreId': StoreId, 'ChainId': ChainId, 'PackageId': PackageId, 'InstallmentId': InstallmentId, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'PromoCode': PromoCode, 'StaffId': StaffId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!), 'FirstName': FirstName, 'LastName': LastName, 'Email': Email, 'Gender': Gender, 'Address': Address, 'City': City, 'State': State, 'Zip': Zip, 'Phone': Phone, 'WorkPhone': WorkPhone, 'DateOfBirth': JsonConverters.toJson(DateOfBirth,'DateTime',context!), 'CellPhone': CellPhone, 'Note': Note, 'ExternalId': ExternalId, 'Username': Username, 'ReferralTypeId': ReferralTypeId, 'EmergencyContactName': EmergencyContactName, 'EmergencyContactPhone': EmergencyContactPhone, 'EmergencyContactType': EmergencyContactType }; createResponse() => AddNewUserResponse(); getResponseTypeName() => "AddNewUserResponse"; getTypeName() => "AddNewUserEndpoint"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IApiDtoBase': TypeInfo(TypeOf.Interface), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'IAddNewUserEndpoint': TypeInfo(TypeOf.Interface), 'ApiResponse2Base': TypeInfo(TypeOf.Class, create:() => ApiResponse2Base()), 'AddNewUserResponse': TypeInfo(TypeOf.Class, create:() => AddNewUserResponse()), 'AddNewUserEndpoint': TypeInfo(TypeOf.Class, create:() => AddNewUserEndpoint()), });