/* Options: Date: 2024-11-24 14:52:18 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateProspectRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum RestrictedResourceType { Store, Chain, User, Undefined, } abstract class IRestrictedApiRequest extends IApiKeyEndpoint { int? RestrictedId; RestrictedResourceType? RestrictedResourceType; } abstract class IApiKeyEndpoint { String? ApiKey; } class ApiDtoBase implements IConvertible { String? ApiKey; int? StoreId; int? ChainId; ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId}); ApiDtoBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; return this; } Map toJson() => { 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId }; getTypeName() => "ApiDtoBase"; TypeContext? context = _ctx; } class CreateProspectRequestDto extends ApiDtoBase implements IConvertible { String? FirstName; String? LastName; String? Address; String? City; String? State; String? Zip; String? Email; String? Gender; int? AddPackageId; int? ProspectTypeId; int? ReferralTypeId; bool? SendEmail; String? Phone; String? WorkPhone; DateTime? DateOfBirth; String? CellPhone; String? Coupon; String? Note; int? EmailTemplateId; String? ExternalId; int? ReferredBy; int? AssignToId; int? AssignToMethod; int? ContactedHow; String? Username; String? EmergencyContactName; String? EmergencyContactPhone; String? EmergencyContactType; bool? EmailOptOut; bool? NonPromotionalSmsOptedIn; bool? PromotionalSmsOptedIn; CreateProspectRequestDto({this.FirstName,this.LastName,this.Address,this.City,this.State,this.Zip,this.Email,this.Gender,this.AddPackageId,this.ProspectTypeId,this.ReferralTypeId,this.SendEmail,this.Phone,this.WorkPhone,this.DateOfBirth,this.CellPhone,this.Coupon,this.Note,this.EmailTemplateId,this.ExternalId,this.ReferredBy,this.AssignToId,this.AssignToMethod,this.ContactedHow,this.Username,this.EmergencyContactName,this.EmergencyContactPhone,this.EmergencyContactType,this.EmailOptOut,this.NonPromotionalSmsOptedIn,this.PromotionalSmsOptedIn}); CreateProspectRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); FirstName = json['FirstName']; LastName = json['LastName']; Address = json['Address']; City = json['City']; State = json['State']; Zip = json['Zip']; Email = json['Email']; Gender = json['Gender']; AddPackageId = json['AddPackageId']; ProspectTypeId = json['ProspectTypeId']; ReferralTypeId = json['ReferralTypeId']; SendEmail = json['SendEmail']; Phone = json['Phone']; WorkPhone = json['WorkPhone']; DateOfBirth = JsonConverters.fromJson(json['DateOfBirth'],'DateTime',context!); CellPhone = json['CellPhone']; Coupon = json['Coupon']; Note = json['Note']; EmailTemplateId = json['EmailTemplateId']; ExternalId = json['ExternalId']; ReferredBy = json['ReferredBy']; AssignToId = json['AssignToId']; AssignToMethod = json['AssignToMethod']; ContactedHow = json['ContactedHow']; Username = json['Username']; EmergencyContactName = json['EmergencyContactName']; EmergencyContactPhone = json['EmergencyContactPhone']; EmergencyContactType = json['EmergencyContactType']; EmailOptOut = json['EmailOptOut']; NonPromotionalSmsOptedIn = json['NonPromotionalSmsOptedIn']; PromotionalSmsOptedIn = json['PromotionalSmsOptedIn']; return this; } Map toJson() => super.toJson()..addAll({ 'FirstName': FirstName, 'LastName': LastName, 'Address': Address, 'City': City, 'State': State, 'Zip': Zip, 'Email': Email, 'Gender': Gender, 'AddPackageId': AddPackageId, 'ProspectTypeId': ProspectTypeId, 'ReferralTypeId': ReferralTypeId, 'SendEmail': SendEmail, 'Phone': Phone, 'WorkPhone': WorkPhone, 'DateOfBirth': JsonConverters.toJson(DateOfBirth,'DateTime',context!), 'CellPhone': CellPhone, 'Coupon': Coupon, 'Note': Note, 'EmailTemplateId': EmailTemplateId, 'ExternalId': ExternalId, 'ReferredBy': ReferredBy, 'AssignToId': AssignToId, 'AssignToMethod': AssignToMethod, 'ContactedHow': ContactedHow, 'Username': Username, 'EmergencyContactName': EmergencyContactName, 'EmergencyContactPhone': EmergencyContactPhone, 'EmergencyContactType': EmergencyContactType, 'EmailOptOut': EmailOptOut, 'NonPromotionalSmsOptedIn': NonPromotionalSmsOptedIn, 'PromotionalSmsOptedIn': PromotionalSmsOptedIn }); getTypeName() => "CreateProspectRequestDto"; TypeContext? context = _ctx; } // @Route("/users/prospect", "POST") class CreateProspectRequest extends CreateProspectRequestDto implements IRestrictedApiRequest, IConvertible { /** * Api Key - grants access to resources */ // @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query") String? ApiKey; /** * ClubReady Club ID (StoreID internally) */ // @ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * First Name */ // @ApiMember(DataType="string", Description="First Name", IsRequired=true, Name="FirstName", ParameterType="query") String? FirstName; /** * Last Name */ // @ApiMember(DataType="string", Description="Last Name", IsRequired=true, Name="LastName", ParameterType="query") String? LastName; /** * Email Address */ // @ApiMember(DataType="string", Description="Email Address", IsRequired=true, Name="Email", ParameterType="query") String? Email; /** * Gender (Format:'M'|'F') */ // @ApiMember(DataType="string", Description="Gender (Format:'M'|'F')", Name="Gender", ParameterType="query") String? Gender; /** * Address */ // @ApiMember(DataType="string", Description="Address", Name="Address", ParameterType="query") String? Address; /** * City */ // @ApiMember(DataType="string", Description="City", Name="City", ParameterType="query") String? City; // @ApiMember(DataType="string", Name="State", ParameterType="query") String? State; // @ApiMember(DataType="string", Name="Zip", ParameterType="query") String? Zip; /** * Home phone */ // @ApiMember(DataType="string", Description="Home phone", Name="Phone", ParameterType="query") String? Phone; /** * Work phone */ // @ApiMember(DataType="string", Description="Work phone", Name="WorkPhone", ParameterType="query") String? WorkPhone; /** * Date of Birth (Format:YYYY-MM-DD) */ // @ApiMember(DataType="date", Description="Date of Birth (Format:YYYY-MM-DD)", Name="DateOfBirth", ParameterType="query") DateTime? DateOfBirth; /** * Cell phone */ // @ApiMember(DataType="string", Description="Cell phone", Name="CellPhone", ParameterType="query") String? CellPhone; /** * Specify a Package to apply to the new prospect */ // @ApiMember(DataType="integer", Description="Specify a Package to apply to the new prospect", Name="AddPackageId", ParameterType="query") int? AddPackageId; /** * Specify a specific Prospect Type for the new prospect */ // @ApiMember(DataType="integer", Description="Specify a specific Prospect Type for the new prospect", Name="ProspectTypeId", ParameterType="query") int? ProspectTypeId; /** * Specify a specific Referral Type for the new prospect */ // @ApiMember(DataType="integer", Description="Specify a specific Referral Type for the new prospect", Name="ReferralTypeId", ParameterType="query") int? ReferralTypeId; /** * Send a Welcome email to the new prospect (Format:true|false) */ // @ApiMember(DataType="boolean", Description="Send a Welcome email to the new prospect (Format:true|false)", IsRequired=true, Name="SendEmail", ParameterType="query") bool? SendEmail; /** * Only used if SendEmail = True */ // @ApiMember(DataType="integer", Description="Only used if SendEmail = True", Name="EmailTemplateId", ParameterType="query") int? EmailTemplateId; /** * */ // @ApiMember(DataType="string", Description="", Name="Coupon", ParameterType="query") String? Coupon; /** * Add an internal note for the new prospect */ // @ApiMember(DataType="string", Description="Add an internal note for the new prospect", Name="Note", ParameterType="query") String? Note; /** * Unique ID for the user from your system. We store internally as ExternalUserId */ // @ApiMember(DataType="string", Description="Unique ID for the user from your system. We store internally as ExternalUserId", Name="ExternalId", ParameterType="query") String? ExternalId; /** * User ID of existing user who referred them. */ // @ApiMember(DataType="integer", Description="User ID of existing user who referred them.", Name="ReferredBy", ParameterType="query") int? ReferredBy; /** * ClubReady UserId of staff to assign new member to. */ // @ApiMember(DataType="integer", Description="ClubReady UserId of staff to assign new member to.", Name="AssignToId", ParameterType="query") int? AssignToId; /** * Who should be assigned to this lead? 0 = Default lead assignments, 1 = When passing in a ReferredBy user, assign the new Lead to that referring user's Staff assignment. */ // @ApiMember(DataType="integer", Description="Who should be assigned to this lead? 0 = Default lead assignments, 1 = When passing in a ReferredBy user, assign the new Lead to that referring user's Staff assignment.", Name="AssignToMethod", ParameterType="query") int? AssignToMethod; /** * Username needs to be between 4 and 255 characters */ // @ApiMember(DataType="string", Description="Username needs to be between 4 and 255 characters", Name="Username", ParameterType="query") String? Username; /** * Emergency contact name */ // @ApiMember(DataType="string", Description="Emergency contact name", Name="EmergencyContactName", ParameterType="query") String? EmergencyContactName; /** * Emergency contact phone number */ // @ApiMember(DataType="string", Description="Emergency contact phone number", Name="EmergencyContactPhone", ParameterType="query") String? EmergencyContactPhone; /** * Emergency contact relationship */ // @ApiMember(DataType="string", Description="Emergency contact relationship", Name="EmergencyContactType", ParameterType="query") String? EmergencyContactType; /** * Set a prospect's email opt out status (Format:true|false) */ // @ApiMember(DataType="boolean", Description="Set a prospect's email opt out status (Format:true|false)", Name="EmailOptOut", ParameterType="query") bool? EmailOptOut; /** * Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false) */ // @ApiMember(DataType="boolean", Description="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name="NonPromotionalSmsOptedIn", ParameterType="query") bool? NonPromotionalSmsOptedIn; /** * Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false) */ // @ApiMember(DataType="boolean", Description="Set a prospect's NonPromotionalSmsOptedIn status (Format:true|false)", Name="PromotionalSmsOptedIn", ParameterType="query") bool? PromotionalSmsOptedIn; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateProspectRequest({this.ApiKey,this.StoreId,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.AddPackageId,this.ProspectTypeId,this.ReferralTypeId,this.SendEmail,this.EmailTemplateId,this.Coupon,this.Note,this.ExternalId,this.ReferredBy,this.AssignToId,this.AssignToMethod,this.Username,this.EmergencyContactName,this.EmergencyContactPhone,this.EmergencyContactType,this.EmailOptOut,this.NonPromotionalSmsOptedIn,this.PromotionalSmsOptedIn,this.RestrictedId,this.RestrictedResourceType}); CreateProspectRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; 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']; AddPackageId = json['AddPackageId']; ProspectTypeId = json['ProspectTypeId']; ReferralTypeId = json['ReferralTypeId']; SendEmail = json['SendEmail']; EmailTemplateId = json['EmailTemplateId']; Coupon = json['Coupon']; Note = json['Note']; ExternalId = json['ExternalId']; ReferredBy = json['ReferredBy']; AssignToId = json['AssignToId']; AssignToMethod = json['AssignToMethod']; Username = json['Username']; EmergencyContactName = json['EmergencyContactName']; EmergencyContactPhone = json['EmergencyContactPhone']; EmergencyContactType = json['EmergencyContactType']; EmailOptOut = json['EmailOptOut']; NonPromotionalSmsOptedIn = json['NonPromotionalSmsOptedIn']; PromotionalSmsOptedIn = json['PromotionalSmsOptedIn']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, '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, 'AddPackageId': AddPackageId, 'ProspectTypeId': ProspectTypeId, 'ReferralTypeId': ReferralTypeId, 'SendEmail': SendEmail, 'EmailTemplateId': EmailTemplateId, 'Coupon': Coupon, 'Note': Note, 'ExternalId': ExternalId, 'ReferredBy': ReferredBy, 'AssignToId': AssignToId, 'AssignToMethod': AssignToMethod, 'Username': Username, 'EmergencyContactName': EmergencyContactName, 'EmergencyContactPhone': EmergencyContactPhone, 'EmergencyContactType': EmergencyContactType, 'EmailOptOut': EmailOptOut, 'NonPromotionalSmsOptedIn': NonPromotionalSmsOptedIn, 'PromotionalSmsOptedIn': PromotionalSmsOptedIn, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "CreateProspectRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()), 'CreateProspectRequestDto': TypeInfo(TypeOf.Class, create:() => CreateProspectRequestDto()), 'CreateProspectRequest': TypeInfo(TypeOf.Class, create:() => CreateProspectRequest()), });