/* Options: Date: 2024-11-24 13:58:02 SwiftVersion: 5.0 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://clubready.com/api/current //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: PaymentProfileUpdateEndpoint.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/sales/wallet/paymentprofileupdate", "PUT") public class PaymentProfileUpdateEndpoint : PaymentProfileUpdateRequestDto, IReturn { public typealias Return = PaymentProfileUpdateResponse /** * Grants access to resources */ // @ApiMember(Description="Grants access to resources", IsRequired=true) public var apiKey:String /** * AcctToken to update */ // @ApiMember(Description="AcctToken to update", IsRequired=true) public var acctToken:String /** * UserId that is updating profile */ // @ApiMember(Description="UserId that is updating profile", IsRequired=true) public var modifiedBy:Int? /** * Expiry Month: 1 = January, 12 = December */ // @ApiMember(Description="Expiry Month: 1 = January, 12 = December") public var ccExpMonth:UInt8? /** * Expiry Year: Two digit year */ // @ApiMember(Description="Expiry Year: Two digit year") public var ccExpYear:UInt8? /** * The name can be provided with FullName OR as separate fields (PrefixName, FirstName, MiddleName, LastName, SuffixName).
Providing both will cause an error. */ // @ApiMember(Description="The name can be provided with FullName OR as separate fields (PrefixName, FirstName, MiddleName, LastName, SuffixName).
Providing both will cause an error.") public var fullName:String // @ApiMember() public var prefixName:String // @ApiMember() public var firstName:String // @ApiMember() public var middleName:String // @ApiMember() public var lastName:String // @ApiMember() public var suffixName:String // @ApiMember() public var address1:String // @ApiMember() public var address2:String // @ApiMember() public var urbanization:String // @ApiMember() public var city:String // @ApiMember() public var state:String // @ApiMember() public var postalCode:String /** * Disable (or Enabled) the Payment Profile */ // @ApiMember(Description="Disable (or Enabled) the Payment Profile") public var isDisabled:Bool? /** * Exclude (or Include) from Account Updater */ // @ApiMember(Description="Exclude (or Include) from Account Updater") public var excludeFromAcctUpdater:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case apiKey case acctToken case modifiedBy case ccExpMonth case ccExpYear case fullName case prefixName case firstName case middleName case lastName case suffixName case address1 case address2 case urbanization case city case state case postalCode case isDisabled case excludeFromAcctUpdater } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) apiKey = try container.decodeIfPresent(String.self, forKey: .apiKey) acctToken = try container.decodeIfPresent(String.self, forKey: .acctToken) modifiedBy = try container.decodeIfPresent(Int.self, forKey: .modifiedBy) ccExpMonth = try container.decodeIfPresent(UInt8.self, forKey: .ccExpMonth) ccExpYear = try container.decodeIfPresent(UInt8.self, forKey: .ccExpYear) fullName = try container.decodeIfPresent(String.self, forKey: .fullName) prefixName = try container.decodeIfPresent(String.self, forKey: .prefixName) firstName = try container.decodeIfPresent(String.self, forKey: .firstName) middleName = try container.decodeIfPresent(String.self, forKey: .middleName) lastName = try container.decodeIfPresent(String.self, forKey: .lastName) suffixName = try container.decodeIfPresent(String.self, forKey: .suffixName) address1 = try container.decodeIfPresent(String.self, forKey: .address1) address2 = try container.decodeIfPresent(String.self, forKey: .address2) urbanization = try container.decodeIfPresent(String.self, forKey: .urbanization) city = try container.decodeIfPresent(String.self, forKey: .city) state = try container.decodeIfPresent(String.self, forKey: .state) postalCode = try container.decodeIfPresent(String.self, forKey: .postalCode) isDisabled = try container.decodeIfPresent(Bool.self, forKey: .isDisabled) excludeFromAcctUpdater = try container.decodeIfPresent(Bool.self, forKey: .excludeFromAcctUpdater) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if apiKey != nil { try container.encode(apiKey, forKey: .apiKey) } if acctToken != nil { try container.encode(acctToken, forKey: .acctToken) } if modifiedBy != nil { try container.encode(modifiedBy, forKey: .modifiedBy) } if ccExpMonth != nil { try container.encode(ccExpMonth, forKey: .ccExpMonth) } if ccExpYear != nil { try container.encode(ccExpYear, forKey: .ccExpYear) } if fullName != nil { try container.encode(fullName, forKey: .fullName) } if prefixName != nil { try container.encode(prefixName, forKey: .prefixName) } if firstName != nil { try container.encode(firstName, forKey: .firstName) } if middleName != nil { try container.encode(middleName, forKey: .middleName) } if lastName != nil { try container.encode(lastName, forKey: .lastName) } if suffixName != nil { try container.encode(suffixName, forKey: .suffixName) } if address1 != nil { try container.encode(address1, forKey: .address1) } if address2 != nil { try container.encode(address2, forKey: .address2) } if urbanization != nil { try container.encode(urbanization, forKey: .urbanization) } if city != nil { try container.encode(city, forKey: .city) } if state != nil { try container.encode(state, forKey: .state) } if postalCode != nil { try container.encode(postalCode, forKey: .postalCode) } if isDisabled != nil { try container.encode(isDisabled, forKey: .isDisabled) } if excludeFromAcctUpdater != nil { try container.encode(excludeFromAcctUpdater, forKey: .excludeFromAcctUpdater) } } } public class PaymentProfileUpdateResponse : PaymentProfileUpdateResponseDto { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class ApiDtoBase : Codable { public var apiKey:String public var storeId:Int? public var chainId:Int? required public init(){} } public class PaymentProfileUpdateRequestDto : ApiDtoBase { public var acctToken:String public var modifiedBy:Int? public var ccExpMonth:UInt8? public var ccExpYear:UInt8? public var fullName:String public var prefixName:String public var firstName:String public var middleName:String public var lastName:String public var suffixName:String public var address1:String public var address2:String public var urbanization:String public var city:String public var state:String public var postalCode:String public var isDisabled:Bool? public var excludeFromAcctUpdater:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case acctToken case modifiedBy case ccExpMonth case ccExpYear case fullName case prefixName case firstName case middleName case lastName case suffixName case address1 case address2 case urbanization case city case state case postalCode case isDisabled case excludeFromAcctUpdater } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) acctToken = try container.decodeIfPresent(String.self, forKey: .acctToken) modifiedBy = try container.decodeIfPresent(Int.self, forKey: .modifiedBy) ccExpMonth = try container.decodeIfPresent(UInt8.self, forKey: .ccExpMonth) ccExpYear = try container.decodeIfPresent(UInt8.self, forKey: .ccExpYear) fullName = try container.decodeIfPresent(String.self, forKey: .fullName) prefixName = try container.decodeIfPresent(String.self, forKey: .prefixName) firstName = try container.decodeIfPresent(String.self, forKey: .firstName) middleName = try container.decodeIfPresent(String.self, forKey: .middleName) lastName = try container.decodeIfPresent(String.self, forKey: .lastName) suffixName = try container.decodeIfPresent(String.self, forKey: .suffixName) address1 = try container.decodeIfPresent(String.self, forKey: .address1) address2 = try container.decodeIfPresent(String.self, forKey: .address2) urbanization = try container.decodeIfPresent(String.self, forKey: .urbanization) city = try container.decodeIfPresent(String.self, forKey: .city) state = try container.decodeIfPresent(String.self, forKey: .state) postalCode = try container.decodeIfPresent(String.self, forKey: .postalCode) isDisabled = try container.decodeIfPresent(Bool.self, forKey: .isDisabled) excludeFromAcctUpdater = try container.decodeIfPresent(Bool.self, forKey: .excludeFromAcctUpdater) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if acctToken != nil { try container.encode(acctToken, forKey: .acctToken) } if modifiedBy != nil { try container.encode(modifiedBy, forKey: .modifiedBy) } if ccExpMonth != nil { try container.encode(ccExpMonth, forKey: .ccExpMonth) } if ccExpYear != nil { try container.encode(ccExpYear, forKey: .ccExpYear) } if fullName != nil { try container.encode(fullName, forKey: .fullName) } if prefixName != nil { try container.encode(prefixName, forKey: .prefixName) } if firstName != nil { try container.encode(firstName, forKey: .firstName) } if middleName != nil { try container.encode(middleName, forKey: .middleName) } if lastName != nil { try container.encode(lastName, forKey: .lastName) } if suffixName != nil { try container.encode(suffixName, forKey: .suffixName) } if address1 != nil { try container.encode(address1, forKey: .address1) } if address2 != nil { try container.encode(address2, forKey: .address2) } if urbanization != nil { try container.encode(urbanization, forKey: .urbanization) } if city != nil { try container.encode(city, forKey: .city) } if state != nil { try container.encode(state, forKey: .state) } if postalCode != nil { try container.encode(postalCode, forKey: .postalCode) } if isDisabled != nil { try container.encode(isDisabled, forKey: .isDisabled) } if excludeFromAcctUpdater != nil { try container.encode(excludeFromAcctUpdater, forKey: .excludeFromAcctUpdater) } } } public class PaymentProfileUpdateResponseDto : ApiResponseBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class ApiResponseBase : Codable { public var success:Bool public var message:String required public init(){} }