/* Options: Date: 2026-06-14 21:38:43 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: CreateCustomerRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/warranty/v1/createCustomer", "POST") public class CreateCustomerRequest : BaseRequest, IReturn { public typealias Return = CreateCustomerResponse 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 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 brandTrigram:String public var weddingDate:Date? 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 public var salePersonId:String public var privacyPolicyAcceptanceStorage:Bool? public var allowStoreDataAbroad:Bool? public var tvPrivacyPolicyAcceptanceStorage: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 required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customerRef case title case firstName case lastName case firstNameNotLatin case lastNameNotLatin case birthday case email case canBeContacted case language case nameSuffix case gender case middleName case countryId case phoneCountryId case prefixCountryId case phone case posId case brandTrigram case weddingDate case street case houseNumber case city case postalCode case region case street2 case street3 case street4 case street5 case salePersonId case privacyPolicyAcceptanceStorage case allowStoreDataAbroad case tvPrivacyPolicyAcceptanceStorage case tvAllowStoreDataAbroad case contactByMail case contactByEmail case contactByPhone case contactBySMS case contactBySocialMedia } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) 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) 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) brandTrigram = try container.decodeIfPresent(String.self, forKey: .brandTrigram) weddingDate = try container.decodeIfPresent(Date.self, forKey: .weddingDate) 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) salePersonId = try container.decodeIfPresent(String.self, forKey: .salePersonId) privacyPolicyAcceptanceStorage = try container.decodeIfPresent(Bool.self, forKey: .privacyPolicyAcceptanceStorage) allowStoreDataAbroad = try container.decodeIfPresent(Bool.self, forKey: .allowStoreDataAbroad) tvPrivacyPolicyAcceptanceStorage = try container.decodeIfPresent(Bool.self, forKey: .tvPrivacyPolicyAcceptanceStorage) 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) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) 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 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 brandTrigram != nil { try container.encode(brandTrigram, forKey: .brandTrigram) } if weddingDate != nil { try container.encode(weddingDate, forKey: .weddingDate) } 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) } if salePersonId != nil { try container.encode(salePersonId, forKey: .salePersonId) } if privacyPolicyAcceptanceStorage != nil { try container.encode(privacyPolicyAcceptanceStorage, forKey: .privacyPolicyAcceptanceStorage) } if allowStoreDataAbroad != nil { try container.encode(allowStoreDataAbroad, forKey: .allowStoreDataAbroad) } if tvPrivacyPolicyAcceptanceStorage != nil { try container.encode(tvPrivacyPolicyAcceptanceStorage, forKey: .tvPrivacyPolicyAcceptanceStorage) } 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) } } } public class CreateCustomerResponse : BaseResponse { public var customerId:String? public var boosterCustomerId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customerId case boosterCustomerId } 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) boosterCustomerId = try container.decodeIfPresent(Int.self, forKey: .boosterCustomerId) } 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 boosterCustomerId != nil { try container.encode(boosterCustomerId, forKey: .boosterCustomerId) } } } 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 } }