/* Options: Date: 2026-06-14 21:53:01 SwiftVersion: 5.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://qp-microservices-booster.richemont.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: EditAndConnectCustomerRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/warranty/v1/card/{cardId}/editCustomer", "POST") public class EditAndConnectCustomerRequest : BaseRequest, IReturn { public typealias Return = EditAndConnectCustomerResponse public var customerId:String public var personId:String public var addressId:String public var phoneId:String? public var emailId:String? public var cardId:String public var customerRef:String public var title:Int? public var firstName:String public var lastName:String public var firstNameNotLatin:String public var lastNameNotLatin:String public var birthday:Date? public var weddingDate:Date? public var email:String public var canBeContacted:Bool public var language:String public var nameSuffix:String public var gender:String public var middleName:String public var countryId:String public var phoneCountryId:String public var prefixCountryId:String public var phone:String public var posId:Int public var birthDayEventId:String? public var salePersonId:String public var allowStoreDataAbroad:Bool? public var tvAllowStoreDataAbroad:Bool? public var contactByMail:Bool public var contactByEmail:Bool public var contactByPhone:Bool public var contactBySMS:Bool public var contactBySocialMedia:Bool public var street:String public var houseNumber:String public var city:String public var postalCode:String public var region:String public var street2:String public var street3:String public var street4:String public var street5:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customerId case personId case addressId case phoneId case emailId case cardId case customerRef case title case firstName case lastName case firstNameNotLatin case lastNameNotLatin case birthday case weddingDate case email case canBeContacted case language case nameSuffix case gender case middleName case countryId case phoneCountryId case prefixCountryId case phone case posId case birthDayEventId case salePersonId case allowStoreDataAbroad case tvAllowStoreDataAbroad case contactByMail case contactByEmail case contactByPhone case contactBySMS case contactBySocialMedia case street case houseNumber case city case postalCode case region case street2 case street3 case street4 case street5 } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) personId = try container.decodeIfPresent(String.self, forKey: .personId) addressId = try container.decodeIfPresent(String.self, forKey: .addressId) phoneId = try container.decodeIfPresent(String.self, forKey: .phoneId) emailId = try container.decodeIfPresent(String.self, forKey: .emailId) cardId = try container.decodeIfPresent(String.self, forKey: .cardId) customerRef = try container.decodeIfPresent(String.self, forKey: .customerRef) title = try container.decodeIfPresent(Int.self, forKey: .title) firstName = try container.decodeIfPresent(String.self, forKey: .firstName) lastName = try container.decodeIfPresent(String.self, forKey: .lastName) firstNameNotLatin = try container.decodeIfPresent(String.self, forKey: .firstNameNotLatin) lastNameNotLatin = try container.decodeIfPresent(String.self, forKey: .lastNameNotLatin) birthday = try container.decodeIfPresent(Date.self, forKey: .birthday) weddingDate = try container.decodeIfPresent(Date.self, forKey: .weddingDate) email = try container.decodeIfPresent(String.self, forKey: .email) canBeContacted = try container.decodeIfPresent(Bool.self, forKey: .canBeContacted) language = try container.decodeIfPresent(String.self, forKey: .language) nameSuffix = try container.decodeIfPresent(String.self, forKey: .nameSuffix) gender = try container.decodeIfPresent(String.self, forKey: .gender) middleName = try container.decodeIfPresent(String.self, forKey: .middleName) countryId = try container.decodeIfPresent(String.self, forKey: .countryId) phoneCountryId = try container.decodeIfPresent(String.self, forKey: .phoneCountryId) prefixCountryId = try container.decodeIfPresent(String.self, forKey: .prefixCountryId) phone = try container.decodeIfPresent(String.self, forKey: .phone) posId = try container.decodeIfPresent(Int.self, forKey: .posId) birthDayEventId = try container.decodeIfPresent(String.self, forKey: .birthDayEventId) salePersonId = try container.decodeIfPresent(String.self, forKey: .salePersonId) allowStoreDataAbroad = try container.decodeIfPresent(Bool.self, forKey: .allowStoreDataAbroad) tvAllowStoreDataAbroad = try container.decodeIfPresent(Bool.self, forKey: .tvAllowStoreDataAbroad) contactByMail = try container.decodeIfPresent(Bool.self, forKey: .contactByMail) contactByEmail = try container.decodeIfPresent(Bool.self, forKey: .contactByEmail) contactByPhone = try container.decodeIfPresent(Bool.self, forKey: .contactByPhone) contactBySMS = try container.decodeIfPresent(Bool.self, forKey: .contactBySMS) contactBySocialMedia = try container.decodeIfPresent(Bool.self, forKey: .contactBySocialMedia) street = try container.decodeIfPresent(String.self, forKey: .street) houseNumber = try container.decodeIfPresent(String.self, forKey: .houseNumber) city = try container.decodeIfPresent(String.self, forKey: .city) postalCode = try container.decodeIfPresent(String.self, forKey: .postalCode) region = try container.decodeIfPresent(String.self, forKey: .region) street2 = try container.decodeIfPresent(String.self, forKey: .street2) street3 = try container.decodeIfPresent(String.self, forKey: .street3) street4 = try container.decodeIfPresent(String.self, forKey: .street4) street5 = try container.decodeIfPresent(String.self, forKey: .street5) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customerId != nil { try container.encode(customerId, forKey: .customerId) } if personId != nil { try container.encode(personId, forKey: .personId) } if addressId != nil { try container.encode(addressId, forKey: .addressId) } if phoneId != nil { try container.encode(phoneId, forKey: .phoneId) } if emailId != nil { try container.encode(emailId, forKey: .emailId) } if cardId != nil { try container.encode(cardId, forKey: .cardId) } if customerRef != nil { try container.encode(customerRef, forKey: .customerRef) } if title != nil { try container.encode(title, forKey: .title) } if firstName != nil { try container.encode(firstName, forKey: .firstName) } if lastName != nil { try container.encode(lastName, forKey: .lastName) } if firstNameNotLatin != nil { try container.encode(firstNameNotLatin, forKey: .firstNameNotLatin) } if lastNameNotLatin != nil { try container.encode(lastNameNotLatin, forKey: .lastNameNotLatin) } if birthday != nil { try container.encode(birthday, forKey: .birthday) } if weddingDate != nil { try container.encode(weddingDate, forKey: .weddingDate) } if email != nil { try container.encode(email, forKey: .email) } if canBeContacted != nil { try container.encode(canBeContacted, forKey: .canBeContacted) } if language != nil { try container.encode(language, forKey: .language) } if nameSuffix != nil { try container.encode(nameSuffix, forKey: .nameSuffix) } if gender != nil { try container.encode(gender, forKey: .gender) } if middleName != nil { try container.encode(middleName, forKey: .middleName) } if countryId != nil { try container.encode(countryId, forKey: .countryId) } if phoneCountryId != nil { try container.encode(phoneCountryId, forKey: .phoneCountryId) } if prefixCountryId != nil { try container.encode(prefixCountryId, forKey: .prefixCountryId) } if phone != nil { try container.encode(phone, forKey: .phone) } if posId != nil { try container.encode(posId, forKey: .posId) } if birthDayEventId != nil { try container.encode(birthDayEventId, forKey: .birthDayEventId) } if salePersonId != nil { try container.encode(salePersonId, forKey: .salePersonId) } if allowStoreDataAbroad != nil { try container.encode(allowStoreDataAbroad, forKey: .allowStoreDataAbroad) } if tvAllowStoreDataAbroad != nil { try container.encode(tvAllowStoreDataAbroad, forKey: .tvAllowStoreDataAbroad) } if contactByMail != nil { try container.encode(contactByMail, forKey: .contactByMail) } if contactByEmail != nil { try container.encode(contactByEmail, forKey: .contactByEmail) } if contactByPhone != nil { try container.encode(contactByPhone, forKey: .contactByPhone) } if contactBySMS != nil { try container.encode(contactBySMS, forKey: .contactBySMS) } if contactBySocialMedia != nil { try container.encode(contactBySocialMedia, forKey: .contactBySocialMedia) } if street != nil { try container.encode(street, forKey: .street) } if houseNumber != nil { try container.encode(houseNumber, forKey: .houseNumber) } if city != nil { try container.encode(city, forKey: .city) } if postalCode != nil { try container.encode(postalCode, forKey: .postalCode) } if region != nil { try container.encode(region, forKey: .region) } if street2 != nil { try container.encode(street2, forKey: .street2) } if street3 != nil { try container.encode(street3, forKey: .street3) } if street4 != nil { try container.encode(street4, forKey: .street4) } if street5 != nil { try container.encode(street5, forKey: .street5) } } } public class EditAndConnectCustomerResponse : BaseResponse { 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 BaseRequest : IRequest, Codable { public var sid:String public var app:String public var _os:String public var _appVersion:String public var _searchMethod:String required public init(){} } public protocol IRequest { var sid:String { get set } var app:String { get set } } public class BaseResponse : IRespose, Codable { public var _xmlns:String public var _type:String public var _source:String public var _tstamp:String public var _user:String public var _env:String public var _uri:String public var _query:String required public init(){} } public protocol IRespose { var _xmlns:String { get set } var _type:String { get set } var _source:String { get set } var _tstamp:String { get set } var _user:String { get set } var _env:String { get set } var _uri:String { get set } var _query:String { get set } }