/* Options: Date: 2025-04-04 17:53:16 SwiftVersion: 5.0 Version: 5.140 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.clubmanagercentral.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: Command.AddMembershipCommandRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/api/Command/AddMembershipCommand", "POST") public class AddMembershipCommandRequest : IReturn, Codable { public typealias Return = AddMembershipResult public var memberId:Int? public var userId:Int? public var membershipTypeId:Int? public var startDate:Date? public var previousMembershipAction:PreviousMembershipAction? public var externallyCreated:Bool? public var isOnlineJoining:Bool? public var membershipType:MembershipType? public var createRecurringPaymentsOnly:Bool? public var membershipReviewAttributes:[CustomAttributeValue] = [] public var registrationAttributes:[CustomAttributeValue] = [] public var feeRecurrenceDisabled:Bool? public var expired:Bool? public var endDate:Date? public var refererMemberId:Int? public var promotionId:Int? public var recurringAmount:Double? public var recurringStartDate:Date? public var paymentMethodId:Int? public var bookingId:Int? required public init(){} } public class AddMembershipResult : ICommandResult, Codable { public var membershipId:Int? public var recurrenceId:Int? public var hasRecurringPayments:Bool? required public init(){} } public class CustomAttributeValue : Codable { public var customAttributeId:Int? public var customAttributeValueId:Int? public var instanceId:Int? public var storedValue:String? public var typeName:String? public var readOnly:Bool? required public init(){} } public enum PreviousMembershipAction : String, Codable { case Nothing case Renewal case Replaces case Additional case Delete } public class MembershipType : Codable { public var branchId:Int? public var startDate:Date? public var endDate:Date? public var length:Int? public var lengthPeriod:OffsetPeriod? public var payments:[MembershipPayment] = [] public var addToBalance:Double? public var sessionsRemaining:Int? public var classesRemaining:Int? public var licensesRemaining:Int? public var multiSiteAccess:Bool? public var memberLimit:Int? public var definition:String? public var bookingAccessOnly:Bool? required public init(){} } public protocol ICommandResult { } public enum OffsetPeriod : String, Codable { case Day case Week case Month case Year } public class MembershipPayment : Codable { public var name:String? public var paymentType:PaymentType? public var amount:Double? public var paymentPeriod:PaymentPeriod? public var directDebitPeriod:DirectDebitPeriod? public var recurring:Int? public var startingOffset:Int? public var startingOffsetPeriod:OffsetPeriod? public var startDate:Date? public var paymentMethod:PaymentMethod? public var autoRecur:Bool? public var proRata:Bool? public var proRataAmount:Double? public var proRataStartDate:Date? public var proRataPaymentMethod:PaymentMethod? public var proRataAddToFirstPayment:Bool? public var chargePerLicense:Bool? required public init(){} } public enum PaymentType : Int, Codable { case Deposit = 1 case MemberPayment = 2 case Recurring = 3 case Purchase = 4 } public enum PaymentPeriod : String, Codable { case Single case Recurring } public enum DirectDebitPeriod : Int, Codable { case Daily = 0 case Monthly = 1 case Quarterly = 2 case Yearly = 3 case Weekly = 4 case SixMonthly = 5 case TwoWeekly = 6 case EveryFourWeeks = 7 case None = -1 } public enum PaymentMethod : Int, Codable { case Unpaid = 1 case Cash = 2 case Card = 3 case Cheque = 4 case Recurring = 5 case Failed = 6 case Bacs = 7 case Account = 8 }