/* Options: Date: 2024-11-24 13:37:12 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: CreateProspectRequestV2.* //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 CreateProspectRequestV2Dto 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; CreateProspectRequestV2Dto({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}); CreateProspectRequestV2Dto.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']; 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 }); getTypeName() => "CreateProspectRequestV2Dto"; TypeContext? context = _ctx; } // @Route("/v2/{ApiKey}/club/{StoreId}/prospect", "POST") class CreateProspectRequestV2 extends CreateProspectRequestV2Dto 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 */ // @ApiMember(DataType="string", Description="Gender", 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; String? Phone; String? WorkPhone; DateTime? DateOfBirth; 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 */ // @ApiMember(DataType="boolean", Description="Send a Welcome email to the new prospect", 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; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; CreateProspectRequestV2({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.RestrictedId,this.RestrictedResourceType}); CreateProspectRequestV2.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']; 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, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "CreateProspectRequestV2"; 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()), 'CreateProspectRequestV2Dto': TypeInfo(TypeOf.Class, create:() => CreateProspectRequestV2Dto()), 'CreateProspectRequestV2': TypeInfo(TypeOf.Class, create:() => CreateProspectRequestV2()), });