/* Options: Date: 2025-04-04 17:49:00 Version: 5.140 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.clubmanagercentral.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: Command.AddMembershipCommandRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class CustomAttributeValue implements IConvertible { int? CustomAttributeId; int? CustomAttributeValueId; int? InstanceId; String? StoredValue; String? TypeName; bool? ReadOnly; CustomAttributeValue({this.CustomAttributeId,this.CustomAttributeValueId,this.InstanceId,this.StoredValue,this.TypeName,this.ReadOnly}); CustomAttributeValue.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CustomAttributeId = json['CustomAttributeId']; CustomAttributeValueId = json['CustomAttributeValueId']; InstanceId = json['InstanceId']; StoredValue = json['StoredValue']; TypeName = json['TypeName']; ReadOnly = json['ReadOnly']; return this; } Map toJson() => { 'CustomAttributeId': CustomAttributeId, 'CustomAttributeValueId': CustomAttributeValueId, 'InstanceId': InstanceId, 'StoredValue': StoredValue, 'TypeName': TypeName, 'ReadOnly': ReadOnly }; getTypeName() => "CustomAttributeValue"; TypeContext? context = _ctx; } enum PreviousMembershipAction { Nothing, Renewal, Replaces, Additional, Delete, } enum OffsetPeriod { Day, Week, Month, Year, } enum PaymentType { Deposit, MemberPayment, Recurring, Purchase, } enum PaymentPeriod { Single, Recurring, } enum DirectDebitPeriod { Daily, Monthly, Quarterly, Yearly, Weekly, SixMonthly, TwoWeekly, EveryFourWeeks, None, } enum PaymentMethod { Unpaid, Cash, Card, Cheque, Recurring, Failed, Bacs, Account, } class MembershipPayment implements IConvertible { String? Name; PaymentType? PaymentType; double? Amount; PaymentPeriod? PaymentPeriod; DirectDebitPeriod? DirectDebitPeriod; int? Recurring; int? StartingOffset; OffsetPeriod? StartingOffsetPeriod; DateTime? StartDate; PaymentMethod? PaymentMethod; bool? AutoRecur; bool? ProRata; double? ProRataAmount; DateTime? ProRataStartDate; PaymentMethod? ProRataPaymentMethod; bool? ProRataAddToFirstPayment; bool? ChargePerLicense; MembershipPayment({this.Name,this.PaymentType,this.Amount,this.PaymentPeriod,this.DirectDebitPeriod,this.Recurring,this.StartingOffset,this.StartingOffsetPeriod,this.StartDate,this.PaymentMethod,this.AutoRecur,this.ProRata,this.ProRataAmount,this.ProRataStartDate,this.ProRataPaymentMethod,this.ProRataAddToFirstPayment,this.ChargePerLicense}); MembershipPayment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Name = json['Name']; PaymentType = JsonConverters.fromJson(json['PaymentType'],'PaymentType',context!); Amount = JsonConverters.toDouble(json['Amount']); PaymentPeriod = JsonConverters.fromJson(json['PaymentPeriod'],'PaymentPeriod',context!); DirectDebitPeriod = JsonConverters.fromJson(json['DirectDebitPeriod'],'DirectDebitPeriod',context!); Recurring = json['Recurring']; StartingOffset = json['StartingOffset']; StartingOffsetPeriod = JsonConverters.fromJson(json['StartingOffsetPeriod'],'OffsetPeriod',context!); StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); PaymentMethod = JsonConverters.fromJson(json['PaymentMethod'],'PaymentMethod',context!); AutoRecur = json['AutoRecur']; ProRata = json['ProRata']; ProRataAmount = JsonConverters.toDouble(json['ProRataAmount']); ProRataStartDate = JsonConverters.fromJson(json['ProRataStartDate'],'DateTime',context!); ProRataPaymentMethod = JsonConverters.fromJson(json['ProRataPaymentMethod'],'PaymentMethod',context!); ProRataAddToFirstPayment = json['ProRataAddToFirstPayment']; ChargePerLicense = json['ChargePerLicense']; return this; } Map toJson() => { 'Name': Name, 'PaymentType': JsonConverters.toJson(PaymentType,'PaymentType',context!), 'Amount': Amount, 'PaymentPeriod': JsonConverters.toJson(PaymentPeriod,'PaymentPeriod',context!), 'DirectDebitPeriod': JsonConverters.toJson(DirectDebitPeriod,'DirectDebitPeriod',context!), 'Recurring': Recurring, 'StartingOffset': StartingOffset, 'StartingOffsetPeriod': JsonConverters.toJson(StartingOffsetPeriod,'OffsetPeriod',context!), 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'PaymentMethod': JsonConverters.toJson(PaymentMethod,'PaymentMethod',context!), 'AutoRecur': AutoRecur, 'ProRata': ProRata, 'ProRataAmount': ProRataAmount, 'ProRataStartDate': JsonConverters.toJson(ProRataStartDate,'DateTime',context!), 'ProRataPaymentMethod': JsonConverters.toJson(ProRataPaymentMethod,'PaymentMethod',context!), 'ProRataAddToFirstPayment': ProRataAddToFirstPayment, 'ChargePerLicense': ChargePerLicense }; getTypeName() => "MembershipPayment"; TypeContext? context = _ctx; } class MembershipType implements IConvertible { int? BranchId; DateTime? StartDate; DateTime? EndDate; int? Length; OffsetPeriod? LengthPeriod; List? Payments; double? AddToBalance; int? SessionsRemaining; int? ClassesRemaining; int? LicensesRemaining; bool? MultiSiteAccess; int? MemberLimit; String? Definition; bool? BookingAccessOnly; MembershipType({this.BranchId,this.StartDate,this.EndDate,this.Length,this.LengthPeriod,this.Payments,this.AddToBalance,this.SessionsRemaining,this.ClassesRemaining,this.LicensesRemaining,this.MultiSiteAccess,this.MemberLimit,this.Definition,this.BookingAccessOnly}); MembershipType.fromJson(Map json) { fromMap(json); } fromMap(Map json) { BranchId = json['BranchId']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!); Length = json['Length']; LengthPeriod = JsonConverters.fromJson(json['LengthPeriod'],'OffsetPeriod',context!); Payments = JsonConverters.fromJson(json['Payments'],'List',context!); AddToBalance = JsonConverters.toDouble(json['AddToBalance']); SessionsRemaining = json['SessionsRemaining']; ClassesRemaining = json['ClassesRemaining']; LicensesRemaining = json['LicensesRemaining']; MultiSiteAccess = json['MultiSiteAccess']; MemberLimit = json['MemberLimit']; Definition = json['Definition']; BookingAccessOnly = json['BookingAccessOnly']; return this; } Map toJson() => { 'BranchId': BranchId, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!), 'Length': Length, 'LengthPeriod': JsonConverters.toJson(LengthPeriod,'OffsetPeriod',context!), 'Payments': JsonConverters.toJson(Payments,'List',context!), 'AddToBalance': AddToBalance, 'SessionsRemaining': SessionsRemaining, 'ClassesRemaining': ClassesRemaining, 'LicensesRemaining': LicensesRemaining, 'MultiSiteAccess': MultiSiteAccess, 'MemberLimit': MemberLimit, 'Definition': Definition, 'BookingAccessOnly': BookingAccessOnly }; getTypeName() => "MembershipType"; TypeContext? context = _ctx; } abstract class ICommandResult { } class AddMembershipResult implements ICommandResult, IConvertible { int? MembershipId; int? RecurrenceId; bool? HasRecurringPayments; AddMembershipResult({this.MembershipId,this.RecurrenceId,this.HasRecurringPayments}); AddMembershipResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { MembershipId = json['MembershipId']; RecurrenceId = json['RecurrenceId']; HasRecurringPayments = json['HasRecurringPayments']; return this; } Map toJson() => { 'MembershipId': MembershipId, 'RecurrenceId': RecurrenceId, 'HasRecurringPayments': HasRecurringPayments }; getTypeName() => "AddMembershipResult"; TypeContext? context = _ctx; } // @Route("/api/Command/AddMembershipCommand", "POST") class AddMembershipCommandRequest implements IReturn, IConvertible { int? MemberId; int? UserId; int? MembershipTypeId; DateTime? StartDate; PreviousMembershipAction? PreviousMembershipAction; bool? ExternallyCreated; bool? IsOnlineJoining; MembershipType? MembershipType; bool? CreateRecurringPaymentsOnly; List? MembershipReviewAttributes; List? RegistrationAttributes; bool? FeeRecurrenceDisabled; bool? Expired; DateTime? EndDate; int? RefererMemberId; int? PromotionId; double? RecurringAmount; DateTime? RecurringStartDate; int? PaymentMethodId; int? BookingId; AddMembershipCommandRequest({this.MemberId,this.UserId,this.MembershipTypeId,this.StartDate,this.PreviousMembershipAction,this.ExternallyCreated,this.IsOnlineJoining,this.MembershipType,this.CreateRecurringPaymentsOnly,this.MembershipReviewAttributes,this.RegistrationAttributes,this.FeeRecurrenceDisabled,this.Expired,this.EndDate,this.RefererMemberId,this.PromotionId,this.RecurringAmount,this.RecurringStartDate,this.PaymentMethodId,this.BookingId}); AddMembershipCommandRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { MemberId = json['MemberId']; UserId = json['UserId']; MembershipTypeId = json['MembershipTypeId']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); PreviousMembershipAction = JsonConverters.fromJson(json['PreviousMembershipAction'],'PreviousMembershipAction',context!); ExternallyCreated = json['ExternallyCreated']; IsOnlineJoining = json['IsOnlineJoining']; MembershipType = JsonConverters.fromJson(json['MembershipType'],'MembershipType',context!); CreateRecurringPaymentsOnly = json['CreateRecurringPaymentsOnly']; MembershipReviewAttributes = JsonConverters.fromJson(json['MembershipReviewAttributes'],'List',context!); RegistrationAttributes = JsonConverters.fromJson(json['RegistrationAttributes'],'List',context!); FeeRecurrenceDisabled = json['FeeRecurrenceDisabled']; Expired = json['Expired']; EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!); RefererMemberId = json['RefererMemberId']; PromotionId = json['PromotionId']; RecurringAmount = JsonConverters.toDouble(json['RecurringAmount']); RecurringStartDate = JsonConverters.fromJson(json['RecurringStartDate'],'DateTime',context!); PaymentMethodId = json['PaymentMethodId']; BookingId = json['BookingId']; return this; } Map toJson() => { 'MemberId': MemberId, 'UserId': UserId, 'MembershipTypeId': MembershipTypeId, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'PreviousMembershipAction': JsonConverters.toJson(PreviousMembershipAction,'PreviousMembershipAction',context!), 'ExternallyCreated': ExternallyCreated, 'IsOnlineJoining': IsOnlineJoining, 'MembershipType': JsonConverters.toJson(MembershipType,'MembershipType',context!), 'CreateRecurringPaymentsOnly': CreateRecurringPaymentsOnly, 'MembershipReviewAttributes': JsonConverters.toJson(MembershipReviewAttributes,'List',context!), 'RegistrationAttributes': JsonConverters.toJson(RegistrationAttributes,'List',context!), 'FeeRecurrenceDisabled': FeeRecurrenceDisabled, 'Expired': Expired, 'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!), 'RefererMemberId': RefererMemberId, 'PromotionId': PromotionId, 'RecurringAmount': RecurringAmount, 'RecurringStartDate': JsonConverters.toJson(RecurringStartDate,'DateTime',context!), 'PaymentMethodId': PaymentMethodId, 'BookingId': BookingId }; createResponse() => AddMembershipResult(); getResponseTypeName() => "AddMembershipResult"; getTypeName() => "AddMembershipCommandRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.clubmanagercentral.com', types: { 'CustomAttributeValue': TypeInfo(TypeOf.Class, create:() => CustomAttributeValue()), 'PreviousMembershipAction': TypeInfo(TypeOf.Enum, enumValues:PreviousMembershipAction.values), 'OffsetPeriod': TypeInfo(TypeOf.Enum, enumValues:OffsetPeriod.values), 'PaymentType': TypeInfo(TypeOf.Enum, enumValues:PaymentType.values), 'PaymentPeriod': TypeInfo(TypeOf.Enum, enumValues:PaymentPeriod.values), 'DirectDebitPeriod': TypeInfo(TypeOf.Enum, enumValues:DirectDebitPeriod.values), 'PaymentMethod': TypeInfo(TypeOf.Enum, enumValues:PaymentMethod.values), 'MembershipPayment': TypeInfo(TypeOf.Class, create:() => MembershipPayment()), 'MembershipType': TypeInfo(TypeOf.Class, create:() => MembershipType()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ICommandResult': TypeInfo(TypeOf.Interface), 'AddMembershipResult': TypeInfo(TypeOf.Class, create:() => AddMembershipResult()), 'AddMembershipCommandRequest': TypeInfo(TypeOf.Class, create:() => AddMembershipCommandRequest()), 'List': TypeInfo(TypeOf.Class, create:() => []), });