/* Options: Date: 2025-09-13 18:02:24 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bookmore.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: CreateService.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/services", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") public class CreateService : IReturn, ICompany, Codable { public typealias Return = ServiceQueryResponse /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") public var companyId:String? /** * The service name */ // @ApiMember(Description="The service name") public var name:String? /** * The service description */ // @ApiMember(Description="The service description") public var Description:String? /** * The service group */ // @ApiMember(Description="The service group") public var group:String? /** * If service is active or not */ // @ApiMember(Description="If service is active or not") public var active:Bool? /** * If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked. */ // @ApiMember(Description="If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked.") public var bookingStatusId:Int? /** * Pause after each booking on this service in minutes */ // @ApiMember(Description="Pause after each booking on this service in minutes") public var pauseAfterBooking:Int? /** * Last time to unbook service in days */ // @ApiMember(Description="Last time to unbook service in days") public var unbookBeforeDays:Int? /** * Last time to unbook service in hours */ // @ApiMember(Description="Last time to unbook service in hours") public var unbookBeforeHours:Int? /** * Last time to unbook service in minutes */ // @ApiMember(Description="Last time to unbook service in minutes") public var unbookBeforeMinutes:Int? /** * Last time to book service in days */ // @ApiMember(Description="Last time to book service in days") public var bookBeforeDays:Int? /** * Last time to book service in hours */ // @ApiMember(Description="Last time to book service in hours") public var bookBeforeHours:Int? /** * Last time to book service in minutes */ // @ApiMember(Description="Last time to book service in minutes") public var bookBeforeMinutes:Int? /** * What type of duration should be used for the service. Normal = 1, Flexible = 2. Flexible means user can select duration. */ // @ApiMember(Description="What type of duration should be used for the service. Normal = 1, Flexible = 2. Flexible means user can select duration.") public var durationTypeId:Int? /** * The duration of the service in minutes */ // @ApiMember(Description="The duration of the service in minutes") public var duration:Int? /** * When using Duration Intervals then set the Min Duration a customer can book in Minutes */ // @ApiMember(Description="When using Duration Intervals then set the Min Duration a customer can book in Minutes") public var minDuration:Int? /** * When using Duration Intervals then set the Max Duration a customer can book in Minutes */ // @ApiMember(Description="When using Duration Intervals then set the Max Duration a customer can book in Minutes") public var maxDuration:Int? /** * The duration interval of the service when allowing customers to book in intervals in Minutes */ // @ApiMember(Description="The duration interval of the service when allowing customers to book in intervals in Minutes") public var durationInterval:Int? /** * If the service must be payed with reservation cost */ // @ApiMember(Description="If the service must be payed with reservation cost") public var shouldPayReservationCost:Bool? /** * Setting if the service must be payed with full cost */ // @ApiMember(Description="Setting if the service must be payed with full cost") public var shouldPayFullCost:Bool? /** * The number of spots on the service */ // @ApiMember(Description="The number of spots on the service") public var totalSpots:Int? /** * If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer. */ // @ApiMember(Description="If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer.") public var lockSpotsToBooking:Bool? /** * Group booking settings */ // @ApiMember(Description="Group booking settings") public var groupBooking:GroupBookingSettings? /** * Multiple resource booking settings */ // @ApiMember(Description="Multiple resource booking settings") public var multipleResource:MultipleResourceSettings? /** * SortOrder */ // @ApiMember(Description="SortOrder") public var sortOrder:Int? /** * If the service only is bookable by admins */ // @ApiMember(Description="If the service only is bookable by admins") public var onlyVisibleByAdmin:Bool? /** * If payson payment should be enabled on the service */ // @ApiMember(Description="If payson payment should be enabled on the service") public var isPaymentEnabled:Bool? /** * Maximum numbers of minutes the booking payment must be completed before automatically umbooked */ // @ApiMember(Description="Maximum numbers of minutes the booking payment must be completed before automatically umbooked") public var maxPaymentTime:Int? /** * The service image */ // @ApiMember(Description="The service image") public var imageUrl:Uri? /** * If you want to allow customers to add them self into a queue if fully booked. Settings for this is handled in BookingSettings. */ // @ApiMember(Description="If you want to allow customers to add them self into a queue if fully booked. Settings for this is handled in BookingSettings.", IsRequired=true) public var enableBookingQueue:Bool? /** * If you want to enable sync to code lock for this service. */ // @ApiMember(Description="If you want to enable sync to code lock for this service.", IsRequired=true) public var enableCodeLockSync:Bool? /** * If you want to allow customer pay manually at the spot etc. */ // @ApiMember(Description="If you want to allow customer pay manually at the spot etc.") public var enableCustomerManualPayment:Bool? /** * The resource types to be added */ // @ApiMember(Description="The resource types to be added") public var resourceTypes:[AddResourceTypeService]? /** * The schedules to be added */ // @ApiMember(Description="The schedules to be added") public var schedules:AddSchedulesToService? /** * If Custom Fields are added to the service, here you will send the id and the value for each custom field to be added */ // @ApiMember(Description="If Custom Fields are added to the service, here you will send the id and the value for each custom field to be added") public var customFields:[AddCustomField]? /** * By default sets to 1, which should be 'default' in database */ // @ApiMember(Description="By default sets to 1, which should be 'default' in database") public var priceViewTypeId:Int? required public init(){} } public class ServiceQueryResponse : Codable { public var id:Int? public var name:String? public var Description:String? public var imageUrl:Uri? public var totalSpots:Int? /** * If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer. */ // @ApiMember(Description="If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer.") public var lockSpotsToBooking:Bool? public var minNumberOfSpotsPerBooking:Int? public var maxNumberOfSpotsPerBooking:Int? public var minNumberOfResourcesToBook:Int? public var maxNumberOfResourcesToBook:Int? public var unbookBeforeDays:Int? public var unbookBeforeHours:Int? public var unbookBeforeMinutes:Int? /** * What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2 */ // @ApiMember(Description="What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2") public var scheduleType:ScheduleType? /** * What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2 */ // @ApiMember(Description="What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2") public var scheduleTypeId:Int? public var bookBeforeDays:Int? public var bookBeforeHours:Int? public var bookBeforeMinutes:Int? public var group:String? public var enableBookingQueue:Bool? public var enableCodeLockSync:Bool? public var enableCustomerManualPayment:Bool? public var sortOrder:Int? public var active:Bool? public var isGroupBooking:Bool? public var groupBooking:GroupBookingSettings? public var multipleResource:MultipleResourceSettings? public var isPaymentEnabled:Bool? /** * Maximum numbers of minutes the booking payment must be completed before automatically unbooked */ // @ApiMember(Description="Maximum numbers of minutes the booking payment must be completed before automatically unbooked") public var maxPaymentTime:Int? /** * If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked. */ // @ApiMember(Description="If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked.") public var bookingStatusId:Int? public var onlyVisibleByAdmin:Bool? public var lengthInMinutes:Int? public var durationTypeId:Int? public var duration:Int? public var minDuration:Int? public var maxDuration:Int? public var durationInterval:Int? public var pauseAfterBooking:Int? public var customFields:[CustomFieldConfigData]? public var customFieldValues:[CustomFieldDataResponse]? public var bookingCustomFields:[CustomFieldConfigData]? public var customerCustomFields:[CustomFieldConfigData]? /** * The booking status options to choose from */ // @ApiMember(Description="The booking status options to choose from") public var bookingStatusOptions:[BookingStatusOptionsResponse]? public var prices:[ServicePriceResponse]? public var schedules:ServiceSchedules? public var ratingSummary:CompanyRatingSummary? public var reviews:[RatingReviewResponse]? public var resourceTypes:[ServiceResourceTypeResponse]? public var responseStatus:ResponseStatus? public var priceViewTypeId:Int? required public init(){} } public protocol ICompany { var companyId:String? { get set } } public class Article : BaseModel, IBaseModelCreated, IBaseModelUpdated { public var company:Company? public var currencyInfo:Currency? public var articleServiceRelations:[ArticleServiceRelation]? // @Ignore() public var serviceIds:[Int]? // @Ignore() public var services:[Service]? // @Ignore() public var articleType:ArticleTypeEnum? // @Required() public var companyId:String? public var id:Int? // @Required() public var name:String? // @Required() public var articleTypeId:Int? public var Description:String? public var imageUrl:String? // @Required() public var active:Bool? // @Required() public var amount:Int? // @Required() public var price:Double? public var vat:Double? // @Required() // @StringLength(50) public var currencyId:String? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case company case currencyInfo case articleServiceRelations case serviceIds case services case articleType case companyId case id case name case articleTypeId case Description case imageUrl case active case amount case price case vat case currencyId case updatedDate case createdDate case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) company = try container.decodeIfPresent(Company.self, forKey: .company) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) articleServiceRelations = try container.decodeIfPresent([ArticleServiceRelation].self, forKey: .articleServiceRelations) ?? [] serviceIds = try container.decodeIfPresent([Int].self, forKey: .serviceIds) ?? [] services = try container.decodeIfPresent([Service].self, forKey: .services) ?? [] articleType = try container.decodeIfPresent(ArticleTypeEnum.self, forKey: .articleType) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) name = try container.decodeIfPresent(String.self, forKey: .name) articleTypeId = try container.decodeIfPresent(Int.self, forKey: .articleTypeId) Description = try container.decodeIfPresent(String.self, forKey: .Description) imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) active = try container.decodeIfPresent(Bool.self, forKey: .active) amount = try container.decodeIfPresent(Int.self, forKey: .amount) price = try container.decodeIfPresent(Double.self, forKey: .price) vat = try container.decodeIfPresent(Double.self, forKey: .vat) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if company != nil { try container.encode(company, forKey: .company) } if currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if articleServiceRelations != nil { try container.encode(articleServiceRelations, forKey: .articleServiceRelations) } if serviceIds != nil { try container.encode(serviceIds, forKey: .serviceIds) } if services != nil { try container.encode(services, forKey: .services) } if articleType != nil { try container.encode(articleType, forKey: .articleType) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if name != nil { try container.encode(name, forKey: .name) } if articleTypeId != nil { try container.encode(articleTypeId, forKey: .articleTypeId) } if Description != nil { try container.encode(Description, forKey: .Description) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if active != nil { try container.encode(active, forKey: .active) } if amount != nil { try container.encode(amount, forKey: .amount) } if price != nil { try container.encode(price, forKey: .price) } if vat != nil { try container.encode(vat, forKey: .vat) } if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class BookingLog : BaseModel { // @References(typeof(BookingLogEventType)) public var eventTypeId:Int? public var eventType:BookingLogEventType? // @Required() public var companyId:String? // @Required() public var bookingId:Int? public var id:Int? public var comments:String? public var userId:String? // @Required() public var created:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case eventTypeId case eventType case companyId case bookingId case id case comments case userId case created case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) eventTypeId = try container.decodeIfPresent(Int.self, forKey: .eventTypeId) eventType = try container.decodeIfPresent(BookingLogEventType.self, forKey: .eventType) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) bookingId = try container.decodeIfPresent(Int.self, forKey: .bookingId) id = try container.decodeIfPresent(Int.self, forKey: .id) comments = try container.decodeIfPresent(String.self, forKey: .comments) userId = try container.decodeIfPresent(String.self, forKey: .userId) created = try container.decodeIfPresent(Date.self, forKey: .created) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if eventTypeId != nil { try container.encode(eventTypeId, forKey: .eventTypeId) } if eventType != nil { try container.encode(eventType, forKey: .eventType) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if bookingId != nil { try container.encode(bookingId, forKey: .bookingId) } if id != nil { try container.encode(id, forKey: .id) } if comments != nil { try container.encode(comments, forKey: .comments) } if userId != nil { try container.encode(userId, forKey: .userId) } if created != nil { try container.encode(created, forKey: .created) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class BookingStatus : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var color:String? // @Required() public var icon:String? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case color case icon case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) color = try container.decodeIfPresent(String.self, forKey: .color) icon = try container.decodeIfPresent(String.self, forKey: .icon) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if color != nil { try container.encode(color, forKey: .color) } if icon != nil { try container.encode(icon, forKey: .icon) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class Booking : PayableEntity, IInterval, ICustomFieldTable, IBaseModelUpdated, IBaseModelCreated { // @Ignore() public var service:Service? // @Ignore() public var log:[BookingLog]? // @Ignore() public var checkoutLogs:[PaymentDetails]? // @Ignore() public var prices:[BookingPrice]? // @Ignore() public var status:BookingStatusEnum? // @Ignore() public var isReserved:Bool? // @Ignore() public var statusName:String? public var bookingStatus:BookingStatus? // @Ignore() public var totalPrice:Double? // @Ignore() public var totalSpots:Int? // @Ignore() public var resources:IList? // @Ignore() public var externalReferences:IList? // @Ignore() public var bookedResources:IList? // @Ignore() public var customFieldsConfig:IList? // @Ignore() public var customFieldsData:IList? // @Ignore() public var deterministicId:String? // @Ignore() public var active:Bool? // @Ignore() public var lastTimeToUnBook:Date? // @Ignore() public var priceMappings:[PriceMapping]? public var id:Int? // @Required() public var customerId:String? // @Required() public var serviceId:Int? // @Required() public var statusId:Int? public var unbookedOn:Date? public var unbookedComments:String? public var bookedComments:String? // @Required() public var bookedBy:String? public var unBookedBy:String? // @Required() public var sendSmsReminder:Bool? // @Required() public var sendEmailReminder:Bool? // @Required() public var sendSmsConfirmation:Bool? public var rebateCode:String? public var comments:String? public var ipAddress:String? // @Required() public var numberOfBookedSpots:Int? public var commentsToCustomer:String? public var paymentExpiration:Date? // @Required() public var sendEmailConfirmation:Bool? public var cancellationCode:String? public var modifiedDate:Date? public var ratingCode:String? public var textField1:String? public var textField2:String? public var textField3:String? public var textField4:String? public var textField5:String? public var textField6:String? public var textField7:String? public var textField8:String? public var textField9:String? public var textField10:String? public var textField11:String? public var textField12:String? public var textField13:String? public var textField14:String? public var textField15:String? public var textField16:String? public var textField17:String? public var textField18:String? public var textField19:String? public var textField20:String? // @Required() public var from:Date? // @Required() public var to:Date? public var articleInvoiceAddressId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case service case log case checkoutLogs case prices case status case isReserved case statusName case bookingStatus case totalPrice case totalSpots case resources case externalReferences case bookedResources case customFieldsConfig case customFieldsData case deterministicId case active case lastTimeToUnBook case priceMappings case internalReferenceId case id case customerId case serviceId case statusId case unbookedOn case unbookedComments case bookedComments case bookedBy case unBookedBy case sendSmsReminder case sendEmailReminder case sendSmsConfirmation case rebateCode case comments case ipAddress case numberOfBookedSpots case commentsToCustomer case paymentExpiration case sendEmailConfirmation case cancellationCode case modifiedDate case ratingCode case textField1 case textField2 case textField3 case textField4 case textField5 case textField6 case textField7 case textField8 case textField9 case textField10 case textField11 case textField12 case textField13 case textField14 case textField15 case textField16 case textField17 case textField18 case textField19 case textField20 case from case to case articleInvoiceAddressId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) service = try container.decodeIfPresent(Service.self, forKey: .service) log = try container.decodeIfPresent([BookingLog].self, forKey: .log) ?? [] checkoutLogs = try container.decodeIfPresent([PaymentDetails].self, forKey: .checkoutLogs) ?? [] prices = try container.decodeIfPresent([BookingPrice].self, forKey: .prices) ?? [] status = try container.decodeIfPresent(BookingStatusEnum.self, forKey: .status) isReserved = try container.decodeIfPresent(Bool.self, forKey: .isReserved) statusName = try container.decodeIfPresent(String.self, forKey: .statusName) bookingStatus = try container.decodeIfPresent(BookingStatus.self, forKey: .bookingStatus) totalPrice = try container.decodeIfPresent(Double.self, forKey: .totalPrice) totalSpots = try container.decodeIfPresent(Int.self, forKey: .totalSpots) resources = try container.decodeIfPresent(IList.self, forKey: .resources) externalReferences = try container.decodeIfPresent(IList.self, forKey: .externalReferences) bookedResources = try container.decodeIfPresent(IList.self, forKey: .bookedResources) customFieldsConfig = try container.decodeIfPresent(IList.self, forKey: .customFieldsConfig) customFieldsData = try container.decodeIfPresent(IList.self, forKey: .customFieldsData) deterministicId = try container.decodeIfPresent(String.self, forKey: .deterministicId) active = try container.decodeIfPresent(Bool.self, forKey: .active) lastTimeToUnBook = try container.decodeIfPresent(Date.self, forKey: .lastTimeToUnBook) priceMappings = try container.decodeIfPresent([PriceMapping].self, forKey: .priceMappings) ?? [] internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) id = try container.decodeIfPresent(Int.self, forKey: .id) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) serviceId = try container.decodeIfPresent(Int.self, forKey: .serviceId) statusId = try container.decodeIfPresent(Int.self, forKey: .statusId) unbookedOn = try container.decodeIfPresent(Date.self, forKey: .unbookedOn) unbookedComments = try container.decodeIfPresent(String.self, forKey: .unbookedComments) bookedComments = try container.decodeIfPresent(String.self, forKey: .bookedComments) bookedBy = try container.decodeIfPresent(String.self, forKey: .bookedBy) unBookedBy = try container.decodeIfPresent(String.self, forKey: .unBookedBy) sendSmsReminder = try container.decodeIfPresent(Bool.self, forKey: .sendSmsReminder) sendEmailReminder = try container.decodeIfPresent(Bool.self, forKey: .sendEmailReminder) sendSmsConfirmation = try container.decodeIfPresent(Bool.self, forKey: .sendSmsConfirmation) rebateCode = try container.decodeIfPresent(String.self, forKey: .rebateCode) comments = try container.decodeIfPresent(String.self, forKey: .comments) ipAddress = try container.decodeIfPresent(String.self, forKey: .ipAddress) numberOfBookedSpots = try container.decodeIfPresent(Int.self, forKey: .numberOfBookedSpots) commentsToCustomer = try container.decodeIfPresent(String.self, forKey: .commentsToCustomer) paymentExpiration = try container.decodeIfPresent(Date.self, forKey: .paymentExpiration) sendEmailConfirmation = try container.decodeIfPresent(Bool.self, forKey: .sendEmailConfirmation) cancellationCode = try container.decodeIfPresent(String.self, forKey: .cancellationCode) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) ratingCode = try container.decodeIfPresent(String.self, forKey: .ratingCode) textField1 = try container.decodeIfPresent(String.self, forKey: .textField1) textField2 = try container.decodeIfPresent(String.self, forKey: .textField2) textField3 = try container.decodeIfPresent(String.self, forKey: .textField3) textField4 = try container.decodeIfPresent(String.self, forKey: .textField4) textField5 = try container.decodeIfPresent(String.self, forKey: .textField5) textField6 = try container.decodeIfPresent(String.self, forKey: .textField6) textField7 = try container.decodeIfPresent(String.self, forKey: .textField7) textField8 = try container.decodeIfPresent(String.self, forKey: .textField8) textField9 = try container.decodeIfPresent(String.self, forKey: .textField9) textField10 = try container.decodeIfPresent(String.self, forKey: .textField10) textField11 = try container.decodeIfPresent(String.self, forKey: .textField11) textField12 = try container.decodeIfPresent(String.self, forKey: .textField12) textField13 = try container.decodeIfPresent(String.self, forKey: .textField13) textField14 = try container.decodeIfPresent(String.self, forKey: .textField14) textField15 = try container.decodeIfPresent(String.self, forKey: .textField15) textField16 = try container.decodeIfPresent(String.self, forKey: .textField16) textField17 = try container.decodeIfPresent(String.self, forKey: .textField17) textField18 = try container.decodeIfPresent(String.self, forKey: .textField18) textField19 = try container.decodeIfPresent(String.self, forKey: .textField19) textField20 = try container.decodeIfPresent(String.self, forKey: .textField20) from = try container.decodeIfPresent(Date.self, forKey: .from) to = try container.decodeIfPresent(Date.self, forKey: .to) articleInvoiceAddressId = try container.decodeIfPresent(String.self, forKey: .articleInvoiceAddressId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if service != nil { try container.encode(service, forKey: .service) } if log != nil { try container.encode(log, forKey: .log) } if checkoutLogs != nil { try container.encode(checkoutLogs, forKey: .checkoutLogs) } if prices != nil { try container.encode(prices, forKey: .prices) } if status != nil { try container.encode(status, forKey: .status) } if isReserved != nil { try container.encode(isReserved, forKey: .isReserved) } if statusName != nil { try container.encode(statusName, forKey: .statusName) } if bookingStatus != nil { try container.encode(bookingStatus, forKey: .bookingStatus) } if totalPrice != nil { try container.encode(totalPrice, forKey: .totalPrice) } if totalSpots != nil { try container.encode(totalSpots, forKey: .totalSpots) } if resources != nil { try container.encode(resources, forKey: .resources) } if externalReferences != nil { try container.encode(externalReferences, forKey: .externalReferences) } if bookedResources != nil { try container.encode(bookedResources, forKey: .bookedResources) } if customFieldsConfig != nil { try container.encode(customFieldsConfig, forKey: .customFieldsConfig) } if customFieldsData != nil { try container.encode(customFieldsData, forKey: .customFieldsData) } if deterministicId != nil { try container.encode(deterministicId, forKey: .deterministicId) } if active != nil { try container.encode(active, forKey: .active) } if lastTimeToUnBook != nil { try container.encode(lastTimeToUnBook, forKey: .lastTimeToUnBook) } if priceMappings != nil { try container.encode(priceMappings, forKey: .priceMappings) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if id != nil { try container.encode(id, forKey: .id) } if customerId != nil { try container.encode(customerId, forKey: .customerId) } if serviceId != nil { try container.encode(serviceId, forKey: .serviceId) } if statusId != nil { try container.encode(statusId, forKey: .statusId) } if unbookedOn != nil { try container.encode(unbookedOn, forKey: .unbookedOn) } if unbookedComments != nil { try container.encode(unbookedComments, forKey: .unbookedComments) } if bookedComments != nil { try container.encode(bookedComments, forKey: .bookedComments) } if bookedBy != nil { try container.encode(bookedBy, forKey: .bookedBy) } if unBookedBy != nil { try container.encode(unBookedBy, forKey: .unBookedBy) } if sendSmsReminder != nil { try container.encode(sendSmsReminder, forKey: .sendSmsReminder) } if sendEmailReminder != nil { try container.encode(sendEmailReminder, forKey: .sendEmailReminder) } if sendSmsConfirmation != nil { try container.encode(sendSmsConfirmation, forKey: .sendSmsConfirmation) } if rebateCode != nil { try container.encode(rebateCode, forKey: .rebateCode) } if comments != nil { try container.encode(comments, forKey: .comments) } if ipAddress != nil { try container.encode(ipAddress, forKey: .ipAddress) } if numberOfBookedSpots != nil { try container.encode(numberOfBookedSpots, forKey: .numberOfBookedSpots) } if commentsToCustomer != nil { try container.encode(commentsToCustomer, forKey: .commentsToCustomer) } if paymentExpiration != nil { try container.encode(paymentExpiration, forKey: .paymentExpiration) } if sendEmailConfirmation != nil { try container.encode(sendEmailConfirmation, forKey: .sendEmailConfirmation) } if cancellationCode != nil { try container.encode(cancellationCode, forKey: .cancellationCode) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if ratingCode != nil { try container.encode(ratingCode, forKey: .ratingCode) } if textField1 != nil { try container.encode(textField1, forKey: .textField1) } if textField2 != nil { try container.encode(textField2, forKey: .textField2) } if textField3 != nil { try container.encode(textField3, forKey: .textField3) } if textField4 != nil { try container.encode(textField4, forKey: .textField4) } if textField5 != nil { try container.encode(textField5, forKey: .textField5) } if textField6 != nil { try container.encode(textField6, forKey: .textField6) } if textField7 != nil { try container.encode(textField7, forKey: .textField7) } if textField8 != nil { try container.encode(textField8, forKey: .textField8) } if textField9 != nil { try container.encode(textField9, forKey: .textField9) } if textField10 != nil { try container.encode(textField10, forKey: .textField10) } if textField11 != nil { try container.encode(textField11, forKey: .textField11) } if textField12 != nil { try container.encode(textField12, forKey: .textField12) } if textField13 != nil { try container.encode(textField13, forKey: .textField13) } if textField14 != nil { try container.encode(textField14, forKey: .textField14) } if textField15 != nil { try container.encode(textField15, forKey: .textField15) } if textField16 != nil { try container.encode(textField16, forKey: .textField16) } if textField17 != nil { try container.encode(textField17, forKey: .textField17) } if textField18 != nil { try container.encode(textField18, forKey: .textField18) } if textField19 != nil { try container.encode(textField19, forKey: .textField19) } if textField20 != nil { try container.encode(textField20, forKey: .textField20) } if from != nil { try container.encode(from, forKey: .from) } if to != nil { try container.encode(to, forKey: .to) } if articleInvoiceAddressId != nil { try container.encode(articleInvoiceAddressId, forKey: .articleInvoiceAddressId) } } } public enum BookingStatusEnum : Int, Codable { case Booked = 1 case Unbooked = 2 case Reserved = 3 case Canceled = 4 case AwaitingPayment = 5 case AwaitingPaymentNoTimeLimit = 6 case Payed = 7 case AwaitingPaymentRequestFromAdmin = 8 case AwaitingPaymentFromProvider = 9 case Invoiced = 10 } public class AddCustomField : Codable { public var id:Int? public var value:String? required public init(){} } public protocol IInterval { var from:Date? { get set } var to:Date? { get set } } public class CompanyCategory : BaseModel { // @Required() public var name:String? // @Required() public var header:String? // @Required() public var Description:String? public var imageUrl:Uri? // @Required() public var active:Bool? public var sortOrder:Int? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case header case Description case imageUrl case active case sortOrder case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) header = try container.decodeIfPresent(String.self, forKey: .header) Description = try container.decodeIfPresent(String.self, forKey: .Description) imageUrl = try container.decodeIfPresent(Uri.self, forKey: .imageUrl) active = try container.decodeIfPresent(Bool.self, forKey: .active) sortOrder = try container.decodeIfPresent(Int.self, forKey: .sortOrder) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if header != nil { try container.encode(header, forKey: .header) } if Description != nil { try container.encode(Description, forKey: .Description) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if active != nil { try container.encode(active, forKey: .active) } if sortOrder != nil { try container.encode(sortOrder, forKey: .sortOrder) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class CompanyType : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class Company : BaseModel { // @Ignore() public var status:CompanyStatus? // @Ignore() public var active:Bool? // @Ignore() public var customerCustomFieldsConfig:IList? // @Ignore() public var bookingAgreements:String? // @Ignore() public var bookingSettings:BookingSettings? // @Ignore() public var companyType:CompanyType? // @Ignore() public var codeLockSettings:CodeLockSetting? // @Ignore() public var paymentSettings:PaymentSetting? // @Ignore() public var settings:CompanySetting? // @Ignore() public var widgetSettings:HomepageWidgetSetting? // @Ignore() public var homepageSettings:HomepageSetting? // @Ignore() public var ratingScore:AverageRatingScore? // @Ignore() public var ratings:[Rating]? // @Ignore() public var distance:Double? // @Ignore() public var licenses:[License]? // @Ignore() public var companyUsers:[CompanyUser]? // @Ignore() public var activeLicenses:[License]? // @Ignore() public var currentLicense:License? // @Ignore() public var isFreeAccount:Bool? // @Ignore() public var defaultLanguage:CultureInfo? public var category:CompanyCategory? // @Ignore() public var lat:Double? // @Ignore() public var lon:Double? // @Ignore() public var isFavorite:Bool? // @Ignore() public var externalReferences:IList? // @Required() public var organisationNumber:String? // @Required() public var statusId:Int? // @Required() public var categoryId:Int? // @Required() public var sitePath:String? // @Required() public var name:String? public var street1:String? public var street2:String? public var zipCode:String? public var city:String? public var openingHours:String? public var faxNumber:String? // @Required() public var email:String? public var phone:String? public var details:String? public var logoType:String? // @Required() public var approvedByAdmin:Bool? // @Required() public var updated:Date? // @Required() public var created:Date? public var ipAddress:String? public var homepage:String? public var domainName:String? // @Required() public var countryId:String? // @Required() public var companyOwnerId:Int? public var typeId:Int? public var modifiedDate:Date? // @Required() public var id:String? public var deletionNotificationDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case status case active case customerCustomFieldsConfig case bookingAgreements case bookingSettings case companyType case codeLockSettings case paymentSettings case settings case widgetSettings case homepageSettings case ratingScore case ratings case distance case licenses case companyUsers case activeLicenses case currentLicense case isFreeAccount case defaultLanguage case category case lat case lon case isFavorite case externalReferences case organisationNumber case statusId case categoryId case sitePath case name case street1 case street2 case zipCode case city case openingHours case faxNumber case email case phone case details case logoType case approvedByAdmin case updated case created case ipAddress case homepage case domainName case countryId case companyOwnerId case typeId case modifiedDate case id case deletionNotificationDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) status = try container.decodeIfPresent(CompanyStatus.self, forKey: .status) active = try container.decodeIfPresent(Bool.self, forKey: .active) customerCustomFieldsConfig = try container.decodeIfPresent(IList.self, forKey: .customerCustomFieldsConfig) bookingAgreements = try container.decodeIfPresent(String.self, forKey: .bookingAgreements) bookingSettings = try container.decodeIfPresent(BookingSettings.self, forKey: .bookingSettings) companyType = try container.decodeIfPresent(CompanyType.self, forKey: .companyType) codeLockSettings = try container.decodeIfPresent(CodeLockSetting.self, forKey: .codeLockSettings) paymentSettings = try container.decodeIfPresent(PaymentSetting.self, forKey: .paymentSettings) settings = try container.decodeIfPresent(CompanySetting.self, forKey: .settings) widgetSettings = try container.decodeIfPresent(HomepageWidgetSetting.self, forKey: .widgetSettings) homepageSettings = try container.decodeIfPresent(HomepageSetting.self, forKey: .homepageSettings) ratingScore = try container.decodeIfPresent(AverageRatingScore.self, forKey: .ratingScore) ratings = try container.decodeIfPresent([Rating].self, forKey: .ratings) ?? [] distance = try container.decodeIfPresent(Double.self, forKey: .distance) licenses = try container.decodeIfPresent([License].self, forKey: .licenses) ?? [] companyUsers = try container.decodeIfPresent([CompanyUser].self, forKey: .companyUsers) ?? [] activeLicenses = try container.decodeIfPresent([License].self, forKey: .activeLicenses) ?? [] currentLicense = try container.decodeIfPresent(License.self, forKey: .currentLicense) isFreeAccount = try container.decodeIfPresent(Bool.self, forKey: .isFreeAccount) defaultLanguage = try container.decodeIfPresent(CultureInfo.self, forKey: .defaultLanguage) category = try container.decodeIfPresent(CompanyCategory.self, forKey: .category) lat = try container.decodeIfPresent(Double.self, forKey: .lat) lon = try container.decodeIfPresent(Double.self, forKey: .lon) isFavorite = try container.decodeIfPresent(Bool.self, forKey: .isFavorite) externalReferences = try container.decodeIfPresent(IList.self, forKey: .externalReferences) organisationNumber = try container.decodeIfPresent(String.self, forKey: .organisationNumber) statusId = try container.decodeIfPresent(Int.self, forKey: .statusId) categoryId = try container.decodeIfPresent(Int.self, forKey: .categoryId) sitePath = try container.decodeIfPresent(String.self, forKey: .sitePath) name = try container.decodeIfPresent(String.self, forKey: .name) street1 = try container.decodeIfPresent(String.self, forKey: .street1) street2 = try container.decodeIfPresent(String.self, forKey: .street2) zipCode = try container.decodeIfPresent(String.self, forKey: .zipCode) city = try container.decodeIfPresent(String.self, forKey: .city) openingHours = try container.decodeIfPresent(String.self, forKey: .openingHours) faxNumber = try container.decodeIfPresent(String.self, forKey: .faxNumber) email = try container.decodeIfPresent(String.self, forKey: .email) phone = try container.decodeIfPresent(String.self, forKey: .phone) details = try container.decodeIfPresent(String.self, forKey: .details) logoType = try container.decodeIfPresent(String.self, forKey: .logoType) approvedByAdmin = try container.decodeIfPresent(Bool.self, forKey: .approvedByAdmin) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) ipAddress = try container.decodeIfPresent(String.self, forKey: .ipAddress) homepage = try container.decodeIfPresent(String.self, forKey: .homepage) domainName = try container.decodeIfPresent(String.self, forKey: .domainName) countryId = try container.decodeIfPresent(String.self, forKey: .countryId) companyOwnerId = try container.decodeIfPresent(Int.self, forKey: .companyOwnerId) typeId = try container.decodeIfPresent(Int.self, forKey: .typeId) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(String.self, forKey: .id) deletionNotificationDate = try container.decodeIfPresent(Date.self, forKey: .deletionNotificationDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if status != nil { try container.encode(status, forKey: .status) } if active != nil { try container.encode(active, forKey: .active) } if customerCustomFieldsConfig != nil { try container.encode(customerCustomFieldsConfig, forKey: .customerCustomFieldsConfig) } if bookingAgreements != nil { try container.encode(bookingAgreements, forKey: .bookingAgreements) } if bookingSettings != nil { try container.encode(bookingSettings, forKey: .bookingSettings) } if companyType != nil { try container.encode(companyType, forKey: .companyType) } if codeLockSettings != nil { try container.encode(codeLockSettings, forKey: .codeLockSettings) } if paymentSettings != nil { try container.encode(paymentSettings, forKey: .paymentSettings) } if settings != nil { try container.encode(settings, forKey: .settings) } if widgetSettings != nil { try container.encode(widgetSettings, forKey: .widgetSettings) } if homepageSettings != nil { try container.encode(homepageSettings, forKey: .homepageSettings) } if ratingScore != nil { try container.encode(ratingScore, forKey: .ratingScore) } if ratings != nil { try container.encode(ratings, forKey: .ratings) } if distance != nil { try container.encode(distance, forKey: .distance) } if licenses != nil { try container.encode(licenses, forKey: .licenses) } if companyUsers != nil { try container.encode(companyUsers, forKey: .companyUsers) } if activeLicenses != nil { try container.encode(activeLicenses, forKey: .activeLicenses) } if currentLicense != nil { try container.encode(currentLicense, forKey: .currentLicense) } if isFreeAccount != nil { try container.encode(isFreeAccount, forKey: .isFreeAccount) } if defaultLanguage != nil { try container.encode(defaultLanguage, forKey: .defaultLanguage) } if category != nil { try container.encode(category, forKey: .category) } if lat != nil { try container.encode(lat, forKey: .lat) } if lon != nil { try container.encode(lon, forKey: .lon) } if isFavorite != nil { try container.encode(isFavorite, forKey: .isFavorite) } if externalReferences != nil { try container.encode(externalReferences, forKey: .externalReferences) } if organisationNumber != nil { try container.encode(organisationNumber, forKey: .organisationNumber) } if statusId != nil { try container.encode(statusId, forKey: .statusId) } if categoryId != nil { try container.encode(categoryId, forKey: .categoryId) } if sitePath != nil { try container.encode(sitePath, forKey: .sitePath) } if name != nil { try container.encode(name, forKey: .name) } if street1 != nil { try container.encode(street1, forKey: .street1) } if street2 != nil { try container.encode(street2, forKey: .street2) } if zipCode != nil { try container.encode(zipCode, forKey: .zipCode) } if city != nil { try container.encode(city, forKey: .city) } if openingHours != nil { try container.encode(openingHours, forKey: .openingHours) } if faxNumber != nil { try container.encode(faxNumber, forKey: .faxNumber) } if email != nil { try container.encode(email, forKey: .email) } if phone != nil { try container.encode(phone, forKey: .phone) } if details != nil { try container.encode(details, forKey: .details) } if logoType != nil { try container.encode(logoType, forKey: .logoType) } if approvedByAdmin != nil { try container.encode(approvedByAdmin, forKey: .approvedByAdmin) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if ipAddress != nil { try container.encode(ipAddress, forKey: .ipAddress) } if homepage != nil { try container.encode(homepage, forKey: .homepage) } if domainName != nil { try container.encode(domainName, forKey: .domainName) } if countryId != nil { try container.encode(countryId, forKey: .countryId) } if companyOwnerId != nil { try container.encode(companyOwnerId, forKey: .companyOwnerId) } if typeId != nil { try container.encode(typeId, forKey: .typeId) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } if deletionNotificationDate != nil { try container.encode(deletionNotificationDate, forKey: .deletionNotificationDate) } } } public class CompanyUser : BaseModel, IUser, IBaseModelCreated, IBaseModelUpdated { public var resource:Resource? // @Ignore() public var roles:[KeyCloakRole]? // @Ignore() public var company:Company? public var email:String? // @Ignore() public var fullName:String? public var resourceId:Int? public var workerId:String? // @Required() public var active:Bool? // @Required() public var isSuperAdmin:Bool? // @Required() public var createdDate:Date? // @Required() public var updatedDate:Date? public var modifiedDate:Date? // @Required() public var companyId:String? // @Required() public var id:String? public var userId:String? public var firstname:String? public var lastname:String? // @Required() public var sendPushNotification:Bool? // @Required() public var sendPushNotificationReminder:Bool? public var phone:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case resource case roles case company case email case fullName case resourceId case workerId case active case isSuperAdmin case createdDate case updatedDate case modifiedDate case companyId case id case userId case firstname case lastname case sendPushNotification case sendPushNotificationReminder case phone } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) resource = try container.decodeIfPresent(Resource.self, forKey: .resource) roles = try container.decodeIfPresent([KeyCloakRole].self, forKey: .roles) ?? [] company = try container.decodeIfPresent(Company.self, forKey: .company) email = try container.decodeIfPresent(String.self, forKey: .email) fullName = try container.decodeIfPresent(String.self, forKey: .fullName) resourceId = try container.decodeIfPresent(Int.self, forKey: .resourceId) workerId = try container.decodeIfPresent(String.self, forKey: .workerId) active = try container.decodeIfPresent(Bool.self, forKey: .active) isSuperAdmin = try container.decodeIfPresent(Bool.self, forKey: .isSuperAdmin) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(String.self, forKey: .id) userId = try container.decodeIfPresent(String.self, forKey: .userId) firstname = try container.decodeIfPresent(String.self, forKey: .firstname) lastname = try container.decodeIfPresent(String.self, forKey: .lastname) sendPushNotification = try container.decodeIfPresent(Bool.self, forKey: .sendPushNotification) sendPushNotificationReminder = try container.decodeIfPresent(Bool.self, forKey: .sendPushNotificationReminder) phone = try container.decodeIfPresent(String.self, forKey: .phone) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if resource != nil { try container.encode(resource, forKey: .resource) } if roles != nil { try container.encode(roles, forKey: .roles) } if company != nil { try container.encode(company, forKey: .company) } if email != nil { try container.encode(email, forKey: .email) } if fullName != nil { try container.encode(fullName, forKey: .fullName) } if resourceId != nil { try container.encode(resourceId, forKey: .resourceId) } if workerId != nil { try container.encode(workerId, forKey: .workerId) } if active != nil { try container.encode(active, forKey: .active) } if isSuperAdmin != nil { try container.encode(isSuperAdmin, forKey: .isSuperAdmin) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if userId != nil { try container.encode(userId, forKey: .userId) } if firstname != nil { try container.encode(firstname, forKey: .firstname) } if lastname != nil { try container.encode(lastname, forKey: .lastname) } if sendPushNotification != nil { try container.encode(sendPushNotification, forKey: .sendPushNotification) } if sendPushNotificationReminder != nil { try container.encode(sendPushNotificationReminder, forKey: .sendPushNotificationReminder) } if phone != nil { try container.encode(phone, forKey: .phone) } } } public class Country : BaseModel { // @References(typeof(Currency)) public var currencyId:String? public var currencyInfo:Currency? // @Required() public var name:String? public var culture:String? public var timeZone:String? public var modifiedDate:Date? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currencyId case currencyInfo case name case culture case timeZone case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) name = try container.decodeIfPresent(String.self, forKey: .name) culture = try container.decodeIfPresent(String.self, forKey: .culture) timeZone = try container.decodeIfPresent(String.self, forKey: .timeZone) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if name != nil { try container.encode(name, forKey: .name) } if culture != nil { try container.encode(culture, forKey: .culture) } if timeZone != nil { try container.encode(timeZone, forKey: .timeZone) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class Currency : BaseModel { // @Required() public var name:String? // @Required() public var currencySign:String? // @Required() public var active:Bool? public var modifiedDate:Date? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case currencySign case active case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) currencySign = try container.decodeIfPresent(String.self, forKey: .currencySign) active = try container.decodeIfPresent(Bool.self, forKey: .active) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if currencySign != nil { try container.encode(currencySign, forKey: .currencySign) } if active != nil { try container.encode(active, forKey: .active) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class Customer : BaseModel, IUser, ICustomFieldTable { public var identityId:Int? public var id:String? // @Ignore() public var customerId:String? // @Ignore() public var accessKeys:IList? public var email:String? // @Ignore() public var externalReferences:IList? // @Ignore() public var invoiceAddress:IList? // @Ignore() public var mainInvoiceAddress:InvoiceAddress? // @Ignore() public var company:Company? // @Ignore() public var customFieldsConfig:IList? // @Ignore() public var customFieldsData:IList? // @Ignore() public var comments:IList? // @Ignore() public var rebateCodes:IList? public var firstname:String? // @Ignore() public var fullName:String? // @Ignore() public var imageUrl:String? // @Required() public var active:Bool? public var facebookUsername:String? // @Required() public var updated:Date? // @Required() public var created:Date? public var ipAddress:String? public var modifiedDate:Date? public var textField1:String? public var textField2:String? public var textField3:String? public var textField4:String? public var textField5:String? public var textField6:String? public var textField7:String? public var textField8:String? public var textField9:String? public var textField10:String? public var textField11:String? public var textField12:String? public var textField13:String? public var textField14:String? public var textField15:String? public var textField16:String? public var textField17:String? public var textField18:String? public var textField19:String? public var textField20:String? public var userId:String? public var lastname:String? public var phone:String? public var corporateIdentityNumber:String? public var invoiceAddress1:String? public var invoiceAddress2:String? public var invoiceCity:String? public var invoicePostalCode:String? public var invoiceCountryCode:String? // @Required() public var companyId:String? public var subscribedToNewsletter:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case identityId case id case customerId case accessKeys case email case externalReferences case invoiceAddress case mainInvoiceAddress case company case customFieldsConfig case customFieldsData case comments case rebateCodes case firstname case fullName case imageUrl case active case facebookUsername case updated case created case ipAddress case modifiedDate case textField1 case textField2 case textField3 case textField4 case textField5 case textField6 case textField7 case textField8 case textField9 case textField10 case textField11 case textField12 case textField13 case textField14 case textField15 case textField16 case textField17 case textField18 case textField19 case textField20 case userId case lastname case phone case corporateIdentityNumber case invoiceAddress1 case invoiceAddress2 case invoiceCity case invoicePostalCode case invoiceCountryCode case companyId case subscribedToNewsletter } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) identityId = try container.decodeIfPresent(Int.self, forKey: .identityId) id = try container.decodeIfPresent(String.self, forKey: .id) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) accessKeys = try container.decodeIfPresent(IList.self, forKey: .accessKeys) email = try container.decodeIfPresent(String.self, forKey: .email) externalReferences = try container.decodeIfPresent(IList.self, forKey: .externalReferences) invoiceAddress = try container.decodeIfPresent(IList.self, forKey: .invoiceAddress) mainInvoiceAddress = try container.decodeIfPresent(InvoiceAddress.self, forKey: .mainInvoiceAddress) company = try container.decodeIfPresent(Company.self, forKey: .company) customFieldsConfig = try container.decodeIfPresent(IList.self, forKey: .customFieldsConfig) customFieldsData = try container.decodeIfPresent(IList.self, forKey: .customFieldsData) comments = try container.decodeIfPresent(IList.self, forKey: .comments) rebateCodes = try container.decodeIfPresent(IList.self, forKey: .rebateCodes) firstname = try container.decodeIfPresent(String.self, forKey: .firstname) fullName = try container.decodeIfPresent(String.self, forKey: .fullName) imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) active = try container.decodeIfPresent(Bool.self, forKey: .active) facebookUsername = try container.decodeIfPresent(String.self, forKey: .facebookUsername) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) ipAddress = try container.decodeIfPresent(String.self, forKey: .ipAddress) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) textField1 = try container.decodeIfPresent(String.self, forKey: .textField1) textField2 = try container.decodeIfPresent(String.self, forKey: .textField2) textField3 = try container.decodeIfPresent(String.self, forKey: .textField3) textField4 = try container.decodeIfPresent(String.self, forKey: .textField4) textField5 = try container.decodeIfPresent(String.self, forKey: .textField5) textField6 = try container.decodeIfPresent(String.self, forKey: .textField6) textField7 = try container.decodeIfPresent(String.self, forKey: .textField7) textField8 = try container.decodeIfPresent(String.self, forKey: .textField8) textField9 = try container.decodeIfPresent(String.self, forKey: .textField9) textField10 = try container.decodeIfPresent(String.self, forKey: .textField10) textField11 = try container.decodeIfPresent(String.self, forKey: .textField11) textField12 = try container.decodeIfPresent(String.self, forKey: .textField12) textField13 = try container.decodeIfPresent(String.self, forKey: .textField13) textField14 = try container.decodeIfPresent(String.self, forKey: .textField14) textField15 = try container.decodeIfPresent(String.self, forKey: .textField15) textField16 = try container.decodeIfPresent(String.self, forKey: .textField16) textField17 = try container.decodeIfPresent(String.self, forKey: .textField17) textField18 = try container.decodeIfPresent(String.self, forKey: .textField18) textField19 = try container.decodeIfPresent(String.self, forKey: .textField19) textField20 = try container.decodeIfPresent(String.self, forKey: .textField20) userId = try container.decodeIfPresent(String.self, forKey: .userId) lastname = try container.decodeIfPresent(String.self, forKey: .lastname) phone = try container.decodeIfPresent(String.self, forKey: .phone) corporateIdentityNumber = try container.decodeIfPresent(String.self, forKey: .corporateIdentityNumber) invoiceAddress1 = try container.decodeIfPresent(String.self, forKey: .invoiceAddress1) invoiceAddress2 = try container.decodeIfPresent(String.self, forKey: .invoiceAddress2) invoiceCity = try container.decodeIfPresent(String.self, forKey: .invoiceCity) invoicePostalCode = try container.decodeIfPresent(String.self, forKey: .invoicePostalCode) invoiceCountryCode = try container.decodeIfPresent(String.self, forKey: .invoiceCountryCode) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) subscribedToNewsletter = try container.decodeIfPresent(Bool.self, forKey: .subscribedToNewsletter) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if identityId != nil { try container.encode(identityId, forKey: .identityId) } if id != nil { try container.encode(id, forKey: .id) } if customerId != nil { try container.encode(customerId, forKey: .customerId) } if accessKeys != nil { try container.encode(accessKeys, forKey: .accessKeys) } if email != nil { try container.encode(email, forKey: .email) } if externalReferences != nil { try container.encode(externalReferences, forKey: .externalReferences) } if invoiceAddress != nil { try container.encode(invoiceAddress, forKey: .invoiceAddress) } if mainInvoiceAddress != nil { try container.encode(mainInvoiceAddress, forKey: .mainInvoiceAddress) } if company != nil { try container.encode(company, forKey: .company) } if customFieldsConfig != nil { try container.encode(customFieldsConfig, forKey: .customFieldsConfig) } if customFieldsData != nil { try container.encode(customFieldsData, forKey: .customFieldsData) } if comments != nil { try container.encode(comments, forKey: .comments) } if rebateCodes != nil { try container.encode(rebateCodes, forKey: .rebateCodes) } if firstname != nil { try container.encode(firstname, forKey: .firstname) } if fullName != nil { try container.encode(fullName, forKey: .fullName) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if active != nil { try container.encode(active, forKey: .active) } if facebookUsername != nil { try container.encode(facebookUsername, forKey: .facebookUsername) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if ipAddress != nil { try container.encode(ipAddress, forKey: .ipAddress) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if textField1 != nil { try container.encode(textField1, forKey: .textField1) } if textField2 != nil { try container.encode(textField2, forKey: .textField2) } if textField3 != nil { try container.encode(textField3, forKey: .textField3) } if textField4 != nil { try container.encode(textField4, forKey: .textField4) } if textField5 != nil { try container.encode(textField5, forKey: .textField5) } if textField6 != nil { try container.encode(textField6, forKey: .textField6) } if textField7 != nil { try container.encode(textField7, forKey: .textField7) } if textField8 != nil { try container.encode(textField8, forKey: .textField8) } if textField9 != nil { try container.encode(textField9, forKey: .textField9) } if textField10 != nil { try container.encode(textField10, forKey: .textField10) } if textField11 != nil { try container.encode(textField11, forKey: .textField11) } if textField12 != nil { try container.encode(textField12, forKey: .textField12) } if textField13 != nil { try container.encode(textField13, forKey: .textField13) } if textField14 != nil { try container.encode(textField14, forKey: .textField14) } if textField15 != nil { try container.encode(textField15, forKey: .textField15) } if textField16 != nil { try container.encode(textField16, forKey: .textField16) } if textField17 != nil { try container.encode(textField17, forKey: .textField17) } if textField18 != nil { try container.encode(textField18, forKey: .textField18) } if textField19 != nil { try container.encode(textField19, forKey: .textField19) } if textField20 != nil { try container.encode(textField20, forKey: .textField20) } if userId != nil { try container.encode(userId, forKey: .userId) } if lastname != nil { try container.encode(lastname, forKey: .lastname) } if phone != nil { try container.encode(phone, forKey: .phone) } if corporateIdentityNumber != nil { try container.encode(corporateIdentityNumber, forKey: .corporateIdentityNumber) } if invoiceAddress1 != nil { try container.encode(invoiceAddress1, forKey: .invoiceAddress1) } if invoiceAddress2 != nil { try container.encode(invoiceAddress2, forKey: .invoiceAddress2) } if invoiceCity != nil { try container.encode(invoiceCity, forKey: .invoiceCity) } if invoicePostalCode != nil { try container.encode(invoicePostalCode, forKey: .invoicePostalCode) } if invoiceCountryCode != nil { try container.encode(invoiceCountryCode, forKey: .invoiceCountryCode) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if subscribedToNewsletter != nil { try container.encode(subscribedToNewsletter, forKey: .subscribedToNewsletter) } } } public class CustomFieldConfig : BaseModel { // @Ignore() public var values:[CustomFieldValue]? public var customField:CustomField? // @Ignore() public var regEx:RegEx? // @Ignore() public var services:[Service]? public var customFieldServiceRelation:[CustomFieldServiceRelation]? // @Required() public var companyId:String? public var id:Int? public var groupId:Int? // @Required() public var fieldId:Int? // @Required() public var iconId:Int? public var regExId:Int? // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var datatype:String? // @Required() public var maxLength:Int? // @Required() public var isPublic:Bool? // @Required() public var isHidden:Bool? // @Required() public var isMandatory:Bool? public var defaultValue:String? public var regExErrorMessage:String? public var mandatoryErrorMessage:String? public var width:Int? // @Required() public var multipleLineText:Bool? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case values case customField case regEx case services case customFieldServiceRelation case companyId case id case groupId case fieldId case iconId case regExId case name case Description case datatype case maxLength case isPublic case isHidden case isMandatory case defaultValue case regExErrorMessage case mandatoryErrorMessage case width case multipleLineText case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) values = try container.decodeIfPresent([CustomFieldValue].self, forKey: .values) ?? [] customField = try container.decodeIfPresent(CustomField.self, forKey: .customField) regEx = try container.decodeIfPresent(RegEx.self, forKey: .regEx) services = try container.decodeIfPresent([Service].self, forKey: .services) ?? [] customFieldServiceRelation = try container.decodeIfPresent([CustomFieldServiceRelation].self, forKey: .customFieldServiceRelation) ?? [] companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) groupId = try container.decodeIfPresent(Int.self, forKey: .groupId) fieldId = try container.decodeIfPresent(Int.self, forKey: .fieldId) iconId = try container.decodeIfPresent(Int.self, forKey: .iconId) regExId = try container.decodeIfPresent(Int.self, forKey: .regExId) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) datatype = try container.decodeIfPresent(String.self, forKey: .datatype) maxLength = try container.decodeIfPresent(Int.self, forKey: .maxLength) isPublic = try container.decodeIfPresent(Bool.self, forKey: .isPublic) isHidden = try container.decodeIfPresent(Bool.self, forKey: .isHidden) isMandatory = try container.decodeIfPresent(Bool.self, forKey: .isMandatory) defaultValue = try container.decodeIfPresent(String.self, forKey: .defaultValue) regExErrorMessage = try container.decodeIfPresent(String.self, forKey: .regExErrorMessage) mandatoryErrorMessage = try container.decodeIfPresent(String.self, forKey: .mandatoryErrorMessage) width = try container.decodeIfPresent(Int.self, forKey: .width) multipleLineText = try container.decodeIfPresent(Bool.self, forKey: .multipleLineText) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if values != nil { try container.encode(values, forKey: .values) } if customField != nil { try container.encode(customField, forKey: .customField) } if regEx != nil { try container.encode(regEx, forKey: .regEx) } if services != nil { try container.encode(services, forKey: .services) } if customFieldServiceRelation != nil { try container.encode(customFieldServiceRelation, forKey: .customFieldServiceRelation) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if groupId != nil { try container.encode(groupId, forKey: .groupId) } if fieldId != nil { try container.encode(fieldId, forKey: .fieldId) } if iconId != nil { try container.encode(iconId, forKey: .iconId) } if regExId != nil { try container.encode(regExId, forKey: .regExId) } if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if datatype != nil { try container.encode(datatype, forKey: .datatype) } if maxLength != nil { try container.encode(maxLength, forKey: .maxLength) } if isPublic != nil { try container.encode(isPublic, forKey: .isPublic) } if isHidden != nil { try container.encode(isHidden, forKey: .isHidden) } if isMandatory != nil { try container.encode(isMandatory, forKey: .isMandatory) } if defaultValue != nil { try container.encode(defaultValue, forKey: .defaultValue) } if regExErrorMessage != nil { try container.encode(regExErrorMessage, forKey: .regExErrorMessage) } if mandatoryErrorMessage != nil { try container.encode(mandatoryErrorMessage, forKey: .mandatoryErrorMessage) } if width != nil { try container.encode(width, forKey: .width) } if multipleLineText != nil { try container.encode(multipleLineText, forKey: .multipleLineText) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class License : BaseModel { public var type:LicenseType? // @Required() public var companyId:String? public var id:Int? // @Required() public var typeId:Int? // @Required() public var validFrom:Date? // @Required() public var validTo:Date? // @Required() public var active:Bool? // @Required() public var updated:Date? // @Required() public var created:Date? public var modifiedDate:Date? public var metaData:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case type case companyId case id case typeId case validFrom case validTo case active case updated case created case modifiedDate case metaData } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decodeIfPresent(LicenseType.self, forKey: .type) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) typeId = try container.decodeIfPresent(Int.self, forKey: .typeId) validFrom = try container.decodeIfPresent(Date.self, forKey: .validFrom) validTo = try container.decodeIfPresent(Date.self, forKey: .validTo) active = try container.decodeIfPresent(Bool.self, forKey: .active) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) metaData = try container.decodeIfPresent(String.self, forKey: .metaData) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if type != nil { try container.encode(type, forKey: .type) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if typeId != nil { try container.encode(typeId, forKey: .typeId) } if validFrom != nil { try container.encode(validFrom, forKey: .validFrom) } if validTo != nil { try container.encode(validTo, forKey: .validTo) } if active != nil { try container.encode(active, forKey: .active) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if metaData != nil { try container.encode(metaData, forKey: .metaData) } } } public class LicenseType : BaseModel { // @Ignore() public var licenseItems:IList? // @Ignore() public var prices:IList? // @Ignore() public var isFree:Bool? // @Ignore() public var periodOfNoticeDays:Int? // @Ignore() public var nextLicenseOption:LicenseType? // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var extraLicenseOption:Bool? public var modifiedDate:Date? public var active:Bool? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case licenseItems case prices case isFree case periodOfNoticeDays case nextLicenseOption case name case Description case extraLicenseOption case modifiedDate case active case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) licenseItems = try container.decodeIfPresent(IList.self, forKey: .licenseItems) prices = try container.decodeIfPresent(IList.self, forKey: .prices) isFree = try container.decodeIfPresent(Bool.self, forKey: .isFree) periodOfNoticeDays = try container.decodeIfPresent(Int.self, forKey: .periodOfNoticeDays) nextLicenseOption = try container.decodeIfPresent(LicenseType.self, forKey: .nextLicenseOption) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) extraLicenseOption = try container.decodeIfPresent(Bool.self, forKey: .extraLicenseOption) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) active = try container.decodeIfPresent(Bool.self, forKey: .active) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if licenseItems != nil { try container.encode(licenseItems, forKey: .licenseItems) } if prices != nil { try container.encode(prices, forKey: .prices) } if isFree != nil { try container.encode(isFree, forKey: .isFree) } if periodOfNoticeDays != nil { try container.encode(periodOfNoticeDays, forKey: .periodOfNoticeDays) } if nextLicenseOption != nil { try container.encode(nextLicenseOption, forKey: .nextLicenseOption) } if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if extraLicenseOption != nil { try container.encode(extraLicenseOption, forKey: .extraLicenseOption) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if active != nil { try container.encode(active, forKey: .active) } if id != nil { try container.encode(id, forKey: .id) } } } public class Rating : BaseModel { public var reviewId:String? public var review:Review? // @Required() public var companyId:String? // @Required() public var bookingId:Int? // @Required() public var ratingScore:Int? // @Required() public var status:Int? // @Required() public var created:Date? // @Required() public var updated:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case reviewId case review case companyId case bookingId case ratingScore case status case created case updated case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) reviewId = try container.decodeIfPresent(String.self, forKey: .reviewId) review = try container.decodeIfPresent(Review.self, forKey: .review) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) bookingId = try container.decodeIfPresent(Int.self, forKey: .bookingId) ratingScore = try container.decodeIfPresent(Int.self, forKey: .ratingScore) status = try container.decodeIfPresent(Int.self, forKey: .status) created = try container.decodeIfPresent(Date.self, forKey: .created) updated = try container.decodeIfPresent(Date.self, forKey: .updated) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if reviewId != nil { try container.encode(reviewId, forKey: .reviewId) } if review != nil { try container.encode(review, forKey: .review) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if bookingId != nil { try container.encode(bookingId, forKey: .bookingId) } if ratingScore != nil { try container.encode(ratingScore, forKey: .ratingScore) } if status != nil { try container.encode(status, forKey: .status) } if created != nil { try container.encode(created, forKey: .created) } if updated != nil { try container.encode(updated, forKey: .updated) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class Review : BaseModel { public var reviewId:String? // @Required() public var companyId:String? // @Required() public var title:String? // @Required() public var Description:String? // @Required() public var author:String? // @Required() public var status:Int? // @Required() public var created:Date? // @Required() public var updated:Date? public var modifiedDate:Date? public var reviewAnswer:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case reviewId case companyId case title case Description case author case status case created case updated case modifiedDate case reviewAnswer } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) reviewId = try container.decodeIfPresent(String.self, forKey: .reviewId) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) title = try container.decodeIfPresent(String.self, forKey: .title) Description = try container.decodeIfPresent(String.self, forKey: .Description) author = try container.decodeIfPresent(String.self, forKey: .author) status = try container.decodeIfPresent(Int.self, forKey: .status) created = try container.decodeIfPresent(Date.self, forKey: .created) updated = try container.decodeIfPresent(Date.self, forKey: .updated) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) reviewAnswer = try container.decodeIfPresent(String.self, forKey: .reviewAnswer) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if reviewId != nil { try container.encode(reviewId, forKey: .reviewId) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if title != nil { try container.encode(title, forKey: .title) } if Description != nil { try container.encode(Description, forKey: .Description) } if author != nil { try container.encode(author, forKey: .author) } if status != nil { try container.encode(status, forKey: .status) } if created != nil { try container.encode(created, forKey: .created) } if updated != nil { try container.encode(updated, forKey: .updated) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if reviewAnswer != nil { try container.encode(reviewAnswer, forKey: .reviewAnswer) } } } public class RatingReviewResponse : Codable { /** * The title for the review */ // @ApiMember(Description="The title for the review") public var title:String? /** * The description for the review */ // @ApiMember(Description="The description for the review") public var Description:String? /** * The rating score */ // @ApiMember(Description="The rating score") public var ratingScore:Int? /** * The review author */ // @ApiMember(Description="The review author") public var author:String? /** * The created date */ // @ApiMember(Description="The created date") public var created:Date? /** * The review answer from the company */ // @ApiMember(Description="The review answer from the company") public var reviewAnswer:String? required public init(){} } public class RebateCode : PayableEntity { // @References(typeof(RebateCodeType)) public var rebateCodeTypeId:Int? public var rebateCodeTypeInfo:RebateCodeType? // @References(typeof(RebateCodeStatus)) public var rebateCodeStatusId:Int? public var rebateCodeStatusInfo:RebateCodeStatus? public var rebateCodeDayOfWeekRelation:[RebateCodeDayOfWeekRelation]? public var rebateCodeServiceRelation:[RebateCodeServiceRelation]? public var rebateCodeBookingPriceRelation:[RebateCodeBookingPriceRelation]? public var rebateCodeCustomerRelation:[RebateCodeCustomerRelation]? // @Ignore() public var daysOfWeek:[DaysOfWeek]? // @Ignore() public var rebateCodeStatus:RebateCodeStatus? // @Ignore() public var rebateCodeType:RebateCodeType? // @Ignore() public var transactions:[RebateCodeTransaction]? // @Ignore() public var remainingAmount:Double? // @Ignore() public var remainingUsage:Int? // @Ignore() public var currentNumberOfUsesPerCustomer:Int? // @Ignore() public var isSpecificByDayOfWeek:Bool? // @Ignore() public var active:Bool? // @Ignore() public var activeByStatus:Bool? // @Ignore() public var rebateCodeCurrencySign:String? // @Ignore() public var paymentReceived:Bool? // @Required() public var validFrom:Date? // @Required() public var validTo:Date? // @Required() public var rebateCodeSign:String? // @Required() public var rebateCodeValue:Int? // @Required() public var maxNumberOfUses:Int? // @Required() public var maxNumberOfUsesPerCustomer:Int? // @Required() public var numberOfUsesUsed:Int? public var personalNote:String? // @Required() public var createdBy:String? // @Required() public var updatedBy:String? // @Required() @TimeSpan public var fromTime:TimeInterval? // @Required() @TimeSpan public var toTime:TimeInterval? public var modifiedDate:Date? public var id:Int? public var articleId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case rebateCodeTypeId case rebateCodeTypeInfo case rebateCodeStatusId case rebateCodeStatusInfo case rebateCodeDayOfWeekRelation case rebateCodeServiceRelation case rebateCodeBookingPriceRelation case rebateCodeCustomerRelation case daysOfWeek case rebateCodeStatus case rebateCodeType case transactions case remainingAmount case remainingUsage case currentNumberOfUsesPerCustomer case isSpecificByDayOfWeek case active case activeByStatus case rebateCodeCurrencySign case paymentReceived case internalReferenceId case validFrom case validTo case rebateCodeSign case rebateCodeValue case maxNumberOfUses case maxNumberOfUsesPerCustomer case numberOfUsesUsed case personalNote case createdBy case updatedBy case fromTime case toTime case modifiedDate case id case articleId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) rebateCodeTypeId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeTypeId) rebateCodeTypeInfo = try container.decodeIfPresent(RebateCodeType.self, forKey: .rebateCodeTypeInfo) rebateCodeStatusId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeStatusId) rebateCodeStatusInfo = try container.decodeIfPresent(RebateCodeStatus.self, forKey: .rebateCodeStatusInfo) rebateCodeDayOfWeekRelation = try container.decodeIfPresent([RebateCodeDayOfWeekRelation].self, forKey: .rebateCodeDayOfWeekRelation) ?? [] rebateCodeServiceRelation = try container.decodeIfPresent([RebateCodeServiceRelation].self, forKey: .rebateCodeServiceRelation) ?? [] rebateCodeBookingPriceRelation = try container.decodeIfPresent([RebateCodeBookingPriceRelation].self, forKey: .rebateCodeBookingPriceRelation) ?? [] rebateCodeCustomerRelation = try container.decodeIfPresent([RebateCodeCustomerRelation].self, forKey: .rebateCodeCustomerRelation) ?? [] daysOfWeek = try container.decodeIfPresent([DaysOfWeek].self, forKey: .daysOfWeek) ?? [] rebateCodeStatus = try container.decodeIfPresent(RebateCodeStatus.self, forKey: .rebateCodeStatus) rebateCodeType = try container.decodeIfPresent(RebateCodeType.self, forKey: .rebateCodeType) transactions = try container.decodeIfPresent([RebateCodeTransaction].self, forKey: .transactions) ?? [] remainingAmount = try container.decodeIfPresent(Double.self, forKey: .remainingAmount) remainingUsage = try container.decodeIfPresent(Int.self, forKey: .remainingUsage) currentNumberOfUsesPerCustomer = try container.decodeIfPresent(Int.self, forKey: .currentNumberOfUsesPerCustomer) isSpecificByDayOfWeek = try container.decodeIfPresent(Bool.self, forKey: .isSpecificByDayOfWeek) active = try container.decodeIfPresent(Bool.self, forKey: .active) activeByStatus = try container.decodeIfPresent(Bool.self, forKey: .activeByStatus) rebateCodeCurrencySign = try container.decodeIfPresent(String.self, forKey: .rebateCodeCurrencySign) paymentReceived = try container.decodeIfPresent(Bool.self, forKey: .paymentReceived) internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) validFrom = try container.decodeIfPresent(Date.self, forKey: .validFrom) validTo = try container.decodeIfPresent(Date.self, forKey: .validTo) rebateCodeSign = try container.decodeIfPresent(String.self, forKey: .rebateCodeSign) rebateCodeValue = try container.decodeIfPresent(Int.self, forKey: .rebateCodeValue) maxNumberOfUses = try container.decodeIfPresent(Int.self, forKey: .maxNumberOfUses) maxNumberOfUsesPerCustomer = try container.decodeIfPresent(Int.self, forKey: .maxNumberOfUsesPerCustomer) numberOfUsesUsed = try container.decodeIfPresent(Int.self, forKey: .numberOfUsesUsed) personalNote = try container.decodeIfPresent(String.self, forKey: .personalNote) createdBy = try container.decodeIfPresent(String.self, forKey: .createdBy) updatedBy = try container.decodeIfPresent(String.self, forKey: .updatedBy) fromTime = try container.convertIfPresent(TimeInterval.self, forKey: .fromTime) toTime = try container.convertIfPresent(TimeInterval.self, forKey: .toTime) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) articleId = try container.decodeIfPresent(Int.self, forKey: .articleId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if rebateCodeTypeId != nil { try container.encode(rebateCodeTypeId, forKey: .rebateCodeTypeId) } if rebateCodeTypeInfo != nil { try container.encode(rebateCodeTypeInfo, forKey: .rebateCodeTypeInfo) } if rebateCodeStatusId != nil { try container.encode(rebateCodeStatusId, forKey: .rebateCodeStatusId) } if rebateCodeStatusInfo != nil { try container.encode(rebateCodeStatusInfo, forKey: .rebateCodeStatusInfo) } if rebateCodeDayOfWeekRelation != nil { try container.encode(rebateCodeDayOfWeekRelation, forKey: .rebateCodeDayOfWeekRelation) } if rebateCodeServiceRelation != nil { try container.encode(rebateCodeServiceRelation, forKey: .rebateCodeServiceRelation) } if rebateCodeBookingPriceRelation != nil { try container.encode(rebateCodeBookingPriceRelation, forKey: .rebateCodeBookingPriceRelation) } if rebateCodeCustomerRelation != nil { try container.encode(rebateCodeCustomerRelation, forKey: .rebateCodeCustomerRelation) } if daysOfWeek != nil { try container.encode(daysOfWeek, forKey: .daysOfWeek) } if rebateCodeStatus != nil { try container.encode(rebateCodeStatus, forKey: .rebateCodeStatus) } if rebateCodeType != nil { try container.encode(rebateCodeType, forKey: .rebateCodeType) } if transactions != nil { try container.encode(transactions, forKey: .transactions) } if remainingAmount != nil { try container.encode(remainingAmount, forKey: .remainingAmount) } if remainingUsage != nil { try container.encode(remainingUsage, forKey: .remainingUsage) } if currentNumberOfUsesPerCustomer != nil { try container.encode(currentNumberOfUsesPerCustomer, forKey: .currentNumberOfUsesPerCustomer) } if isSpecificByDayOfWeek != nil { try container.encode(isSpecificByDayOfWeek, forKey: .isSpecificByDayOfWeek) } if active != nil { try container.encode(active, forKey: .active) } if activeByStatus != nil { try container.encode(activeByStatus, forKey: .activeByStatus) } if rebateCodeCurrencySign != nil { try container.encode(rebateCodeCurrencySign, forKey: .rebateCodeCurrencySign) } if paymentReceived != nil { try container.encode(paymentReceived, forKey: .paymentReceived) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if validFrom != nil { try container.encode(validFrom, forKey: .validFrom) } if validTo != nil { try container.encode(validTo, forKey: .validTo) } if rebateCodeSign != nil { try container.encode(rebateCodeSign, forKey: .rebateCodeSign) } if rebateCodeValue != nil { try container.encode(rebateCodeValue, forKey: .rebateCodeValue) } if maxNumberOfUses != nil { try container.encode(maxNumberOfUses, forKey: .maxNumberOfUses) } if maxNumberOfUsesPerCustomer != nil { try container.encode(maxNumberOfUsesPerCustomer, forKey: .maxNumberOfUsesPerCustomer) } if numberOfUsesUsed != nil { try container.encode(numberOfUsesUsed, forKey: .numberOfUsesUsed) } if personalNote != nil { try container.encode(personalNote, forKey: .personalNote) } if createdBy != nil { try container.encode(createdBy, forKey: .createdBy) } if updatedBy != nil { try container.encode(updatedBy, forKey: .updatedBy) } if fromTime != nil { try container.encode(fromTime, forKey: .fromTime) } if toTime != nil { try container.encode(toTime, forKey: .toTime) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } if articleId != nil { try container.encode(articleId, forKey: .articleId) } } } public class RebateCodeTransaction : BaseModel, IBaseModelCreated, IBaseModelUpdated { // @Ignore() public var booking:Booking? // @Ignore() public var rebateCode:RebateCode? // @Ignore() public var customer:Customer? public var id:Int? public var companyId:String? public var note:String? // @Required() public var rebateCodeId:Int? // @Required() public var amount:Double? // @Required() public var usage:Int? public var bookingId:Int? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case booking case rebateCode case customer case id case companyId case note case rebateCodeId case amount case usage case bookingId case updatedDate case createdDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) booking = try container.decodeIfPresent(Booking.self, forKey: .booking) rebateCode = try container.decodeIfPresent(RebateCode.self, forKey: .rebateCode) customer = try container.decodeIfPresent(Customer.self, forKey: .customer) id = try container.decodeIfPresent(Int.self, forKey: .id) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) note = try container.decodeIfPresent(String.self, forKey: .note) rebateCodeId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeId) amount = try container.decodeIfPresent(Double.self, forKey: .amount) usage = try container.decodeIfPresent(Int.self, forKey: .usage) bookingId = try container.decodeIfPresent(Int.self, forKey: .bookingId) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if booking != nil { try container.encode(booking, forKey: .booking) } if rebateCode != nil { try container.encode(rebateCode, forKey: .rebateCode) } if customer != nil { try container.encode(customer, forKey: .customer) } if id != nil { try container.encode(id, forKey: .id) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if note != nil { try container.encode(note, forKey: .note) } if rebateCodeId != nil { try container.encode(rebateCodeId, forKey: .rebateCodeId) } if amount != nil { try container.encode(amount, forKey: .amount) } if usage != nil { try container.encode(usage, forKey: .usage) } if bookingId != nil { try container.encode(bookingId, forKey: .bookingId) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } } } public class ExternalReference : BaseModel { // @Required() public var companyId:String? // @Required() public var id:String? // @Required() public var ownerId:String? // @Required() public var referenceType:String? public var externalData:String? public var createdBy:String? // @Required() public var updated:Date? // @Required() public var created:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case id case ownerId case referenceType case externalData case createdBy case updated case created case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(String.self, forKey: .id) ownerId = try container.decodeIfPresent(String.self, forKey: .ownerId) referenceType = try container.decodeIfPresent(String.self, forKey: .referenceType) externalData = try container.decodeIfPresent(String.self, forKey: .externalData) createdBy = try container.decodeIfPresent(String.self, forKey: .createdBy) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if ownerId != nil { try container.encode(ownerId, forKey: .ownerId) } if referenceType != nil { try container.encode(referenceType, forKey: .referenceType) } if externalData != nil { try container.encode(externalData, forKey: .externalData) } if createdBy != nil { try container.encode(createdBy, forKey: .createdBy) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class Resource : BaseModel, ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated { // @Ignore() public var priority:Int? // @Ignore() public var schedules:IList? // @Ignore() public var exceptions:IList? // @Ignore() public var bookings:IList? // @Ignore() public var customFieldsConfig:IList? // @Ignore() public var customFieldsData:IList? // @Required() public var companyId:String? public var id:Int? // @Required() public var name:String? // @Required() public var active:Bool? public var Description:String? public var imageUrl:String? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? // @Required() public var color:String? public var email:String? public var mobilePhone:String? public var emailNotification:Bool? public var smsNotification:Bool? // @Required() public var sendSMSReminder:Bool? // @Required() public var sendEmailReminder:Bool? public var modifiedDate:Date? public var accessGroup:String? public var textField1:String? public var textField2:String? public var textField3:String? public var textField4:String? public var textField5:String? public var textField6:String? public var textField7:String? public var textField8:String? public var textField9:String? public var textField10:String? public var textField11:String? public var textField12:String? public var textField13:String? public var textField14:String? public var textField15:String? public var textField16:String? public var textField17:String? public var textField18:String? public var textField19:String? public var textField20:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case priority case schedules case exceptions case bookings case customFieldsConfig case customFieldsData case companyId case id case name case active case Description case imageUrl case updatedDate case createdDate case color case email case mobilePhone case emailNotification case smsNotification case sendSMSReminder case sendEmailReminder case modifiedDate case accessGroup case textField1 case textField2 case textField3 case textField4 case textField5 case textField6 case textField7 case textField8 case textField9 case textField10 case textField11 case textField12 case textField13 case textField14 case textField15 case textField16 case textField17 case textField18 case textField19 case textField20 } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) priority = try container.decodeIfPresent(Int.self, forKey: .priority) schedules = try container.decodeIfPresent(IList.self, forKey: .schedules) exceptions = try container.decodeIfPresent(IList.self, forKey: .exceptions) bookings = try container.decodeIfPresent(IList.self, forKey: .bookings) customFieldsConfig = try container.decodeIfPresent(IList.self, forKey: .customFieldsConfig) customFieldsData = try container.decodeIfPresent(IList.self, forKey: .customFieldsData) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) name = try container.decodeIfPresent(String.self, forKey: .name) active = try container.decodeIfPresent(Bool.self, forKey: .active) Description = try container.decodeIfPresent(String.self, forKey: .Description) imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) color = try container.decodeIfPresent(String.self, forKey: .color) email = try container.decodeIfPresent(String.self, forKey: .email) mobilePhone = try container.decodeIfPresent(String.self, forKey: .mobilePhone) emailNotification = try container.decodeIfPresent(Bool.self, forKey: .emailNotification) smsNotification = try container.decodeIfPresent(Bool.self, forKey: .smsNotification) sendSMSReminder = try container.decodeIfPresent(Bool.self, forKey: .sendSMSReminder) sendEmailReminder = try container.decodeIfPresent(Bool.self, forKey: .sendEmailReminder) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) accessGroup = try container.decodeIfPresent(String.self, forKey: .accessGroup) textField1 = try container.decodeIfPresent(String.self, forKey: .textField1) textField2 = try container.decodeIfPresent(String.self, forKey: .textField2) textField3 = try container.decodeIfPresent(String.self, forKey: .textField3) textField4 = try container.decodeIfPresent(String.self, forKey: .textField4) textField5 = try container.decodeIfPresent(String.self, forKey: .textField5) textField6 = try container.decodeIfPresent(String.self, forKey: .textField6) textField7 = try container.decodeIfPresent(String.self, forKey: .textField7) textField8 = try container.decodeIfPresent(String.self, forKey: .textField8) textField9 = try container.decodeIfPresent(String.self, forKey: .textField9) textField10 = try container.decodeIfPresent(String.self, forKey: .textField10) textField11 = try container.decodeIfPresent(String.self, forKey: .textField11) textField12 = try container.decodeIfPresent(String.self, forKey: .textField12) textField13 = try container.decodeIfPresent(String.self, forKey: .textField13) textField14 = try container.decodeIfPresent(String.self, forKey: .textField14) textField15 = try container.decodeIfPresent(String.self, forKey: .textField15) textField16 = try container.decodeIfPresent(String.self, forKey: .textField16) textField17 = try container.decodeIfPresent(String.self, forKey: .textField17) textField18 = try container.decodeIfPresent(String.self, forKey: .textField18) textField19 = try container.decodeIfPresent(String.self, forKey: .textField19) textField20 = try container.decodeIfPresent(String.self, forKey: .textField20) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if priority != nil { try container.encode(priority, forKey: .priority) } if schedules != nil { try container.encode(schedules, forKey: .schedules) } if exceptions != nil { try container.encode(exceptions, forKey: .exceptions) } if bookings != nil { try container.encode(bookings, forKey: .bookings) } if customFieldsConfig != nil { try container.encode(customFieldsConfig, forKey: .customFieldsConfig) } if customFieldsData != nil { try container.encode(customFieldsData, forKey: .customFieldsData) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if name != nil { try container.encode(name, forKey: .name) } if active != nil { try container.encode(active, forKey: .active) } if Description != nil { try container.encode(Description, forKey: .Description) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if color != nil { try container.encode(color, forKey: .color) } if email != nil { try container.encode(email, forKey: .email) } if mobilePhone != nil { try container.encode(mobilePhone, forKey: .mobilePhone) } if emailNotification != nil { try container.encode(emailNotification, forKey: .emailNotification) } if smsNotification != nil { try container.encode(smsNotification, forKey: .smsNotification) } if sendSMSReminder != nil { try container.encode(sendSMSReminder, forKey: .sendSMSReminder) } if sendEmailReminder != nil { try container.encode(sendEmailReminder, forKey: .sendEmailReminder) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if accessGroup != nil { try container.encode(accessGroup, forKey: .accessGroup) } if textField1 != nil { try container.encode(textField1, forKey: .textField1) } if textField2 != nil { try container.encode(textField2, forKey: .textField2) } if textField3 != nil { try container.encode(textField3, forKey: .textField3) } if textField4 != nil { try container.encode(textField4, forKey: .textField4) } if textField5 != nil { try container.encode(textField5, forKey: .textField5) } if textField6 != nil { try container.encode(textField6, forKey: .textField6) } if textField7 != nil { try container.encode(textField7, forKey: .textField7) } if textField8 != nil { try container.encode(textField8, forKey: .textField8) } if textField9 != nil { try container.encode(textField9, forKey: .textField9) } if textField10 != nil { try container.encode(textField10, forKey: .textField10) } if textField11 != nil { try container.encode(textField11, forKey: .textField11) } if textField12 != nil { try container.encode(textField12, forKey: .textField12) } if textField13 != nil { try container.encode(textField13, forKey: .textField13) } if textField14 != nil { try container.encode(textField14, forKey: .textField14) } if textField15 != nil { try container.encode(textField15, forKey: .textField15) } if textField16 != nil { try container.encode(textField16, forKey: .textField16) } if textField17 != nil { try container.encode(textField17, forKey: .textField17) } if textField18 != nil { try container.encode(textField18, forKey: .textField18) } if textField19 != nil { try container.encode(textField19, forKey: .textField19) } if textField20 != nil { try container.encode(textField20, forKey: .textField20) } } } public class ResourceType : BaseModel, IBaseModelCreated, IBaseModelUpdated { // @Ignore() public var selectableByUser:Bool? // @Ignore() public var resources:[Resource]? // @Required() public var companyId:String? public var id:Int? // @Required() public var name:String? public var Description:String? // @Required() public var active:Bool? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case selectableByUser case resources case companyId case id case name case Description case active case updatedDate case createdDate case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) selectableByUser = try container.decodeIfPresent(Bool.self, forKey: .selectableByUser) resources = try container.decodeIfPresent([Resource].self, forKey: .resources) ?? [] companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) active = try container.decodeIfPresent(Bool.self, forKey: .active) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if selectableByUser != nil { try container.encode(selectableByUser, forKey: .selectableByUser) } if resources != nil { try container.encode(resources, forKey: .resources) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if active != nil { try container.encode(active, forKey: .active) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class ServicePrice : BaseModel, IInterval { // @References(typeof(Currency)) public var currencyId:String? public var currencyInfo:Currency? // @Ignore() public var service:Service? // @Ignore() public var priceMappings:[PriceMapping]? // @Ignore() public var isTimeSpecific:Bool? // @Ignore() public var isDaysOfWeekSpecific:Bool? public var dayOfWeeks:[ServicePriceDayOfWeekRelation]? // @Ignore() public var priceBeforeRebate:Double? // @Ignore() public var rebateCodesApplied:[RebateCode]? // @Ignore() public var priceText:String? // @Ignore() public var overlappingPrices:[ServicePrice]? // @Required() public var companyId:String? public var id:Int? // @Required() public var serviceId:Int? public var price:Double? // @Required() public var updated:Date? // @Required() public var created:Date? // @Required() @TimeSpan public var fromTime:TimeInterval? // @Required() @TimeSpan public var toTime:TimeInterval? // @Required() public var vat:Double? public var category:String? public var modifiedDate:Date? // @Required() public var from:Date? // @Required() public var to:Date? // @Required() public var calculationTypeId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currencyId case currencyInfo case service case priceMappings case isTimeSpecific case isDaysOfWeekSpecific case dayOfWeeks case priceBeforeRebate case rebateCodesApplied case priceText case overlappingPrices case companyId case id case serviceId case price case updated case created case fromTime case toTime case vat case category case modifiedDate case from case to case calculationTypeId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) service = try container.decodeIfPresent(Service.self, forKey: .service) priceMappings = try container.decodeIfPresent([PriceMapping].self, forKey: .priceMappings) ?? [] isTimeSpecific = try container.decodeIfPresent(Bool.self, forKey: .isTimeSpecific) isDaysOfWeekSpecific = try container.decodeIfPresent(Bool.self, forKey: .isDaysOfWeekSpecific) dayOfWeeks = try container.decodeIfPresent([ServicePriceDayOfWeekRelation].self, forKey: .dayOfWeeks) ?? [] priceBeforeRebate = try container.decodeIfPresent(Double.self, forKey: .priceBeforeRebate) rebateCodesApplied = try container.decodeIfPresent([RebateCode].self, forKey: .rebateCodesApplied) ?? [] priceText = try container.decodeIfPresent(String.self, forKey: .priceText) overlappingPrices = try container.decodeIfPresent([ServicePrice].self, forKey: .overlappingPrices) ?? [] companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) serviceId = try container.decodeIfPresent(Int.self, forKey: .serviceId) price = try container.decodeIfPresent(Double.self, forKey: .price) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) fromTime = try container.convertIfPresent(TimeInterval.self, forKey: .fromTime) toTime = try container.convertIfPresent(TimeInterval.self, forKey: .toTime) vat = try container.decodeIfPresent(Double.self, forKey: .vat) category = try container.decodeIfPresent(String.self, forKey: .category) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) from = try container.decodeIfPresent(Date.self, forKey: .from) to = try container.decodeIfPresent(Date.self, forKey: .to) calculationTypeId = try container.decodeIfPresent(Int.self, forKey: .calculationTypeId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if service != nil { try container.encode(service, forKey: .service) } if priceMappings != nil { try container.encode(priceMappings, forKey: .priceMappings) } if isTimeSpecific != nil { try container.encode(isTimeSpecific, forKey: .isTimeSpecific) } if isDaysOfWeekSpecific != nil { try container.encode(isDaysOfWeekSpecific, forKey: .isDaysOfWeekSpecific) } if dayOfWeeks != nil { try container.encode(dayOfWeeks, forKey: .dayOfWeeks) } if priceBeforeRebate != nil { try container.encode(priceBeforeRebate, forKey: .priceBeforeRebate) } if rebateCodesApplied != nil { try container.encode(rebateCodesApplied, forKey: .rebateCodesApplied) } if priceText != nil { try container.encode(priceText, forKey: .priceText) } if overlappingPrices != nil { try container.encode(overlappingPrices, forKey: .overlappingPrices) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if serviceId != nil { try container.encode(serviceId, forKey: .serviceId) } if price != nil { try container.encode(price, forKey: .price) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if fromTime != nil { try container.encode(fromTime, forKey: .fromTime) } if toTime != nil { try container.encode(toTime, forKey: .toTime) } if vat != nil { try container.encode(vat, forKey: .vat) } if category != nil { try container.encode(category, forKey: .category) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if from != nil { try container.encode(from, forKey: .from) } if to != nil { try container.encode(to, forKey: .to) } if calculationTypeId != nil { try container.encode(calculationTypeId, forKey: .calculationTypeId) } } } public class GroupBookingSettings : Codable { public var active:Bool? public var min:Int? public var max:Int? required public init(){} } public class MultipleResourceSettings : Codable { public var active:Bool? public var min:Int? public var max:Int? required public init(){} } public class AddResourceTypeService : ICompany, Codable { /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") public var companyId:String? /** * The resourcetype id */ // @ApiMember(Description="The resourcetype id") public var id:Int? /** * If the resources within the resourcetype should be selectable by customer when creating a booking */ // @ApiMember(Description="If the resources within the resourcetype should be selectable by customer when creating a booking") public var selectableByUser:Bool? required public init(){} } public class AddSchedulesToService : Codable { /** * The schedule id */ // @ApiMember(Description="The schedule id") public var recurringSchedules:[ServiceSchedule]? public var dateSchedules:[ServiceSchedule]? required public init(){} } public class ArticleServiceRelation : BaseModel { // @Required() public var companyId:String? public var id:Int? // @Required() public var serviceId:Int? // @Required() public var articleId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case id case serviceId case articleId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) serviceId = try container.decodeIfPresent(Int.self, forKey: .serviceId) articleId = try container.decodeIfPresent(Int.self, forKey: .articleId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if serviceId != nil { try container.encode(serviceId, forKey: .serviceId) } if articleId != nil { try container.encode(articleId, forKey: .articleId) } } } public class CustomFieldConfigData : Codable { /** * Custom field id */ // @ApiMember(Description="Custom field id") public var id:Int? /** * Configuration name. Example: 'Number of persons'. */ // @ApiMember(Description="Configuration name. Example: 'Number of persons'.") public var name:String? /** * Custom field description. Example: 'For how many persons is this booking?' */ // @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'") public var Description:String? /** * Field width. Example: 20 for 20px */ // @ApiMember(Description="Field width. Example: 20 for 20px") public var width:Int? /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") public var dataType:String? /** * Default value of the field. Example: '3' */ // @ApiMember(Description="Default value of the field. Example: '3'") public var defaultValue:String? /** * Determines if the field is required to have a value or not */ // @ApiMember(Description="Determines if the field is required to have a value or not") public var isMandatory:Bool? /** * Error message shown to the user if the field data is required but not entered */ // @ApiMember(Description="Error message shown to the user if the field data is required but not entered") public var mandatoryErrorMessage:String? /** * Max lenght of the field */ // @ApiMember(Description="Max lenght of the field") public var maxLength:Int? /** * If the field should have multiple lines */ // @ApiMember(Description="If the field should have multiple lines") public var multipleLineText:Bool? /** * Regular expression used for validation of the field */ // @ApiMember(Description="Regular expression used for validation of the field") public var regEx:String? /** * Error message shown if the regular expression validation failed */ // @ApiMember(Description="Error message shown if the regular expression validation failed") public var regExErrorMessage:String? /** * The values to select from if Datatype is DropDown for this custom field */ // @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field") public var values:[CustomFieldValueResponse]? required public init(){} } public class CustomFieldDataResponse : Codable { public var id:Int? public var column:String? public var name:String? public var Description:String? public var value:String? /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") public var dataType:String? required public init(){} } public class BookedResourceType : Codable { /** * The resource type id */ // @ApiMember(Description="The resource type id") public var id:Int? /** * The resource type name */ // @ApiMember(Description="The resource type name") public var name:String? /** * The resources inside resource type */ // @ApiMember(Description="The resources inside resource type") public var resources:[BookedResource]? required public init(){} } public class BookedCustomer : Codable { public var id:String? public var firstname:String? public var lastname:String? public var email:String? public var phone:String? public var facebookUserName:String? public var imageUrl:String? public var corporateIdentityNumber:String? public var invoiceAddress1:String? public var invoiceAddress2:String? public var invoiceCity:String? public var invoicePostalCode:String? public var invoiceCountryCode:String? required public init(){} } public class CompanyRatingSummary : Codable { /** * The average rating score */ // @ApiMember(Description="The average rating score") public var averageScore:Double? /** * The number of ratings of score 1 */ // @ApiMember(Description="The number of ratings of score 1") public var ratingScore1Count:Int? /** * The number of ratings of score 2 */ // @ApiMember(Description="The number of ratings of score 2") public var ratingScore2Count:Int? /** * The number of ratings of score 3 */ // @ApiMember(Description="The number of ratings of score 3") public var ratingScore3Count:Int? /** * The number of ratings of score 4 */ // @ApiMember(Description="The number of ratings of score 4") public var raingScore4Count:Int? /** * The number of ratings of score 5 */ // @ApiMember(Description="The number of ratings of score 5") public var ratingScore5Count:Int? /** * The number of ratings */ // @ApiMember(Description="The number of ratings") public var count:Int? required public init(){} } public enum Payson2CheckoutStatus : String, Codable { case None case Created case FormsFilled case ReadyToPay case ProcessingPayment case ReadyToShip case Shipped case PaidToAccount case Canceled case Credited case Expired case Denied } public enum ScheduleType : String, Codable { case NotDefined case RecurringSchedule case DateSchedule } public class BookingStatusOptionsResponse : Codable { public var id:Int? public var name:String? public var Description:String? required public init(){} } public class ServiceSchedules : Codable { public var scheduleType:ScheduleType? public var recurringSchedules:[ISchedule]? public var dateSchedules:[ISchedule]? required public init(){} } public class ServiceResourceTypeResponse : Codable { /** * The resourcetype id */ // @ApiMember(Description="The resourcetype id") public var id:Int? /** * The resourcetype is selectable by customer */ // @ApiMember(Description="The resourcetype is selectable by customer") public var selectableByUser:Bool? /** * The resourcetype name */ // @ApiMember(Description="The resourcetype name") public var name:String? /** * The resourcetype description */ // @ApiMember(Description="The resourcetype description") public var Description:String? /** * The resources in the resourcetype. Only shows active resources if not admin. */ // @ApiMember(Description="The resources in the resourcetype. Only shows active resources if not admin.") public var resources:[ServiceResourceTypeResource]? required public init(){} } public class BookingStatusOptions : Codable { public var id:Int? public var name:String? public var Description:String? required public init(){} } public class LanguageResponse : Codable { public var id:String? public var name:String? required public init(){} } public class BaseModel : Codable { required public init(){} } public enum ArticleTypeEnum : Int, Codable { case ServiceArticle = 1 case StandAloneArticle = 2 case RebateCodePunchTicketArticle = 3 case RebateCodeGiftCardArticle = 4 case RebateCodeValueCardArticle = 5 } public protocol IBaseModelCreated { var createdDate:Date? { get set } } public protocol IBaseModelUpdated { var updatedDate:Date? { get set } } public class BookingLogEventType : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class PaymentDetails : BaseModel, IBaseModelCreated, IBaseModelUpdated { // @Ignore() public var qvicklyCheckoutSerialized:QvicklyCustomCheckoutData? // @Ignore() public var payson2CheckoutSerialized:Payson2CheckoutResponse? // @Ignore() public var stripeCheckoutSerialized:CustomCheckoutData? // @Required() public var companyId:String? // @Required() public var internalReferenceId:String? // @Required() public var articleTypeId:Int? // @Required() public var externalResponseData:String? // @Required() public var externalResponseReference:String? // @Required() public var paymentProviderId:Int? // @Required() public var createdDate:Date? // @Required() public var updatedDate:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case qvicklyCheckoutSerialized case payson2CheckoutSerialized case stripeCheckoutSerialized case companyId case internalReferenceId case articleTypeId case externalResponseData case externalResponseReference case paymentProviderId case createdDate case updatedDate case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) qvicklyCheckoutSerialized = try container.decodeIfPresent(QvicklyCustomCheckoutData.self, forKey: .qvicklyCheckoutSerialized) payson2CheckoutSerialized = try container.decodeIfPresent(Payson2CheckoutResponse.self, forKey: .payson2CheckoutSerialized) stripeCheckoutSerialized = try container.decodeIfPresent(CustomCheckoutData.self, forKey: .stripeCheckoutSerialized) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) articleTypeId = try container.decodeIfPresent(Int.self, forKey: .articleTypeId) externalResponseData = try container.decodeIfPresent(String.self, forKey: .externalResponseData) externalResponseReference = try container.decodeIfPresent(String.self, forKey: .externalResponseReference) paymentProviderId = try container.decodeIfPresent(Int.self, forKey: .paymentProviderId) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if qvicklyCheckoutSerialized != nil { try container.encode(qvicklyCheckoutSerialized, forKey: .qvicklyCheckoutSerialized) } if payson2CheckoutSerialized != nil { try container.encode(payson2CheckoutSerialized, forKey: .payson2CheckoutSerialized) } if stripeCheckoutSerialized != nil { try container.encode(stripeCheckoutSerialized, forKey: .stripeCheckoutSerialized) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if articleTypeId != nil { try container.encode(articleTypeId, forKey: .articleTypeId) } if externalResponseData != nil { try container.encode(externalResponseData, forKey: .externalResponseData) } if externalResponseReference != nil { try container.encode(externalResponseReference, forKey: .externalResponseReference) } if paymentProviderId != nil { try container.encode(paymentProviderId, forKey: .paymentProviderId) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class BookingPrice : BaseModel { // @References(typeof(Currency)) public var currencyId:String? public var servicePriceId:Int? public var servicePrice:ServicePrice? public var currencyInfo:Currency? // @Ignore() public var priceText:String? // @Ignore() public var appliedCodes:[AppliedRebateCodes]? // @Ignore() public var isRebate:Bool? // @Required() public var companyId:String? // @Required() public var bookingId:Int? // @Required() public var quantity:Int? public var price:Double? public var vat:Double? public var category:String? // @Required() public var updated:Date? // @Required() public var created:Date? // @Required() public var invoiced:Bool? // @Required() public var occupiesSpot:Bool? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currencyId case servicePriceId case servicePrice case currencyInfo case priceText case appliedCodes case isRebate case companyId case bookingId case quantity case price case vat case category case updated case created case invoiced case occupiesSpot case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) servicePriceId = try container.decodeIfPresent(Int.self, forKey: .servicePriceId) servicePrice = try container.decodeIfPresent(ServicePrice.self, forKey: .servicePrice) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) priceText = try container.decodeIfPresent(String.self, forKey: .priceText) appliedCodes = try container.decodeIfPresent([AppliedRebateCodes].self, forKey: .appliedCodes) ?? [] isRebate = try container.decodeIfPresent(Bool.self, forKey: .isRebate) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) bookingId = try container.decodeIfPresent(Int.self, forKey: .bookingId) quantity = try container.decodeIfPresent(Int.self, forKey: .quantity) price = try container.decodeIfPresent(Double.self, forKey: .price) vat = try container.decodeIfPresent(Double.self, forKey: .vat) category = try container.decodeIfPresent(String.self, forKey: .category) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) invoiced = try container.decodeIfPresent(Bool.self, forKey: .invoiced) occupiesSpot = try container.decodeIfPresent(Bool.self, forKey: .occupiesSpot) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if servicePriceId != nil { try container.encode(servicePriceId, forKey: .servicePriceId) } if servicePrice != nil { try container.encode(servicePrice, forKey: .servicePrice) } if currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if priceText != nil { try container.encode(priceText, forKey: .priceText) } if appliedCodes != nil { try container.encode(appliedCodes, forKey: .appliedCodes) } if isRebate != nil { try container.encode(isRebate, forKey: .isRebate) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if bookingId != nil { try container.encode(bookingId, forKey: .bookingId) } if quantity != nil { try container.encode(quantity, forKey: .quantity) } if price != nil { try container.encode(price, forKey: .price) } if vat != nil { try container.encode(vat, forKey: .vat) } if category != nil { try container.encode(category, forKey: .category) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if invoiced != nil { try container.encode(invoiced, forKey: .invoiced) } if occupiesSpot != nil { try container.encode(occupiesSpot, forKey: .occupiesSpot) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class PriceMapping : BaseModel { // @Required() public var companyId:String? // @Required() public var id:String? // @Required() public var servicePriceId:Int? public var referenceType:String? public var externalReference:String? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case id case servicePriceId case referenceType case externalReference case updatedDate case createdDate case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(String.self, forKey: .id) servicePriceId = try container.decodeIfPresent(Int.self, forKey: .servicePriceId) referenceType = try container.decodeIfPresent(String.self, forKey: .referenceType) externalReference = try container.decodeIfPresent(String.self, forKey: .externalReference) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if servicePriceId != nil { try container.encode(servicePriceId, forKey: .servicePriceId) } if referenceType != nil { try container.encode(referenceType, forKey: .referenceType) } if externalReference != nil { try container.encode(externalReference, forKey: .externalReference) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public protocol IDbConnectionFactory { } public class ArticlePaymentSettings : Codable { public var weeksBeforeArticleIsCancelled:String? required public init(){} } public protocol IBokameraPaymentManager { associatedtype TCreatedCheckoutResponse associatedtype TCheckoutResponse associatedtype TPaymentResponse } public class InitCheckoutRequestBody : Codable { public var credentials:Credentials? public var data:InitCheckoutData? public var function:String? required public init(){} } public class QvicklyCustomCheckoutData : Codable { public var qvicklyCheckoutResponse:GetCheckoutResponse? public var initCheckoutResponse:InitCheckoutResponse? public var qvicklyPaymentResponse:QvicklyPaymentResponse? required public init(){} } public class Payson2CheckoutResponse : Codable { public var id:String? public var expirationTime:Date? public var snippet:String? public var status:Payson2CheckoutStatus? public var customer:Customer? public var order:Order? public var merchant:Merchant? public var gui:Gui? public var history:History? public var purchaseId:Int? required public init(){} } public class StripeCreateCheckoutQuery : Codable { public var checkoutData:StripeCreatePaymentOptions? public var requestOptions:RequestOptions? required public init(){} } public class CustomCheckoutData : Codable { public var customSessionData:CustomSessionData? public var customPaymentIntentData:CustomPaymentIntentData? required public init(){} } public protocol IPaysonPaymentCheckout1 { } public protocol ILogger_1 : ILogger { associatedtype TCategoryName } public class PayableEntity : BaseModel { //dbFactory:IDbConnectionFactory ignored. Swift doesn't support interface properties // @Ignore() public var articlePaymentSettings:ArticlePaymentSettings? //qvicklyPaymentManager:IBokameraPaymentManager ignored. Swift doesn't support interface properties //payson2PaymentManager:IBokameraPaymentManager ignored. Swift doesn't support interface properties //stripePaymentManager:IBokameraPaymentManager ignored. Swift doesn't support interface properties //paysonPaymentCheckout1:IPaysonPaymentCheckout1 ignored. Swift doesn't support interface properties //logger:ILogger_1 ignored. Swift doesn't support interface properties // @Ignore() public var cacheProvider:CacheDataProvider? // @Ignore() public var servicesNames:String? // @Ignore() public var internalReferenceId:String? // @Ignore() public var paymentLog:[PaymentLog]? // @Ignore() public var articleType:ArticleType? public var companyId:String? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? public var priceVat:Double? // @References(typeof(Currency)) public var currencyId:String? public var currencyInfo:Currency? // @Ignore() public var customer:Customer? // @Ignore() public var customers:[Customer]? // @Ignore() public var company:Company? // @Ignore() public var services:[Service]? // @Ignore() public var article:Article? // @Ignore() public var invoiceAddress:ArticleInvoiceAddress? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dbFactory case articlePaymentSettings case qvicklyPaymentManager case payson2PaymentManager case stripePaymentManager case paysonPaymentCheckout1 case logger case cacheProvider case servicesNames case internalReferenceId case paymentLog case articleType case companyId case updatedDate case createdDate case priceVat case currencyId case currencyInfo case customer case customers case company case services case article case invoiceAddress } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dbFactory = try container.decodeIfPresent(IDbConnectionFactory.self, forKey: .dbFactory) articlePaymentSettings = try container.decodeIfPresent(ArticlePaymentSettings.self, forKey: .articlePaymentSettings) qvicklyPaymentManager = try container.decodeIfPresent(IBokameraPaymentManager.self, forKey: .qvicklyPaymentManager) payson2PaymentManager = try container.decodeIfPresent(IBokameraPaymentManager.self, forKey: .payson2PaymentManager) stripePaymentManager = try container.decodeIfPresent(IBokameraPaymentManager.self, forKey: .stripePaymentManager) paysonPaymentCheckout1 = try container.decodeIfPresent(IPaysonPaymentCheckout1.self, forKey: .paysonPaymentCheckout1) logger = try container.decodeIfPresent(ILogger_1.self, forKey: .logger) cacheProvider = try container.decodeIfPresent(CacheDataProvider.self, forKey: .cacheProvider) servicesNames = try container.decodeIfPresent(String.self, forKey: .servicesNames) internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) paymentLog = try container.decodeIfPresent([PaymentLog].self, forKey: .paymentLog) ?? [] articleType = try container.decodeIfPresent(ArticleType.self, forKey: .articleType) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) priceVat = try container.decodeIfPresent(Double.self, forKey: .priceVat) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) customer = try container.decodeIfPresent(Customer.self, forKey: .customer) customers = try container.decodeIfPresent([Customer].self, forKey: .customers) ?? [] company = try container.decodeIfPresent(Company.self, forKey: .company) services = try container.decodeIfPresent([Service].self, forKey: .services) ?? [] article = try container.decodeIfPresent(Article.self, forKey: .article) invoiceAddress = try container.decodeIfPresent(ArticleInvoiceAddress.self, forKey: .invoiceAddress) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dbFactory != nil { try container.encode(dbFactory, forKey: .dbFactory) } if articlePaymentSettings != nil { try container.encode(articlePaymentSettings, forKey: .articlePaymentSettings) } if qvicklyPaymentManager != nil { try container.encode(qvicklyPaymentManager, forKey: .qvicklyPaymentManager) } if payson2PaymentManager != nil { try container.encode(payson2PaymentManager, forKey: .payson2PaymentManager) } if stripePaymentManager != nil { try container.encode(stripePaymentManager, forKey: .stripePaymentManager) } if paysonPaymentCheckout1 != nil { try container.encode(paysonPaymentCheckout1, forKey: .paysonPaymentCheckout1) } if logger != nil { try container.encode(logger, forKey: .logger) } if cacheProvider != nil { try container.encode(cacheProvider, forKey: .cacheProvider) } if servicesNames != nil { try container.encode(servicesNames, forKey: .servicesNames) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if paymentLog != nil { try container.encode(paymentLog, forKey: .paymentLog) } if articleType != nil { try container.encode(articleType, forKey: .articleType) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } if priceVat != nil { try container.encode(priceVat, forKey: .priceVat) } if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if customer != nil { try container.encode(customer, forKey: .customer) } if customers != nil { try container.encode(customers, forKey: .customers) } if company != nil { try container.encode(company, forKey: .company) } if services != nil { try container.encode(services, forKey: .services) } if article != nil { try container.encode(article, forKey: .article) } if invoiceAddress != nil { try container.encode(invoiceAddress, forKey: .invoiceAddress) } } } public class CacheDataProvider : Codable { public var dist:DataCacheStore? public var `static`:DataCacheStore? required public init(){} } public class PaymentLog : BaseModel { // @References(typeof(Currency)) public var currencyId:String? public var currencyInfo:Currency? // @Required() public var companyId:String? public var id:Int? // @Required() public var internalReferenceId:String? // @Required() public var articleTypeId:Int? public var paymentReferenceId:String? public var paymentProviderId:Int? public var orderItemReferenceId:String? public var amount:Double? public var vat:Double? public var amountCredited:Double? public var comments:String? // @Required() public var created:Date? // @Required() public var updated:Date? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currencyId case currencyInfo case companyId case id case internalReferenceId case articleTypeId case paymentReferenceId case paymentProviderId case orderItemReferenceId case amount case vat case amountCredited case comments case created case updated case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) articleTypeId = try container.decodeIfPresent(Int.self, forKey: .articleTypeId) paymentReferenceId = try container.decodeIfPresent(String.self, forKey: .paymentReferenceId) paymentProviderId = try container.decodeIfPresent(Int.self, forKey: .paymentProviderId) orderItemReferenceId = try container.decodeIfPresent(String.self, forKey: .orderItemReferenceId) amount = try container.decodeIfPresent(Double.self, forKey: .amount) vat = try container.decodeIfPresent(Double.self, forKey: .vat) amountCredited = try container.decodeIfPresent(Double.self, forKey: .amountCredited) comments = try container.decodeIfPresent(String.self, forKey: .comments) created = try container.decodeIfPresent(Date.self, forKey: .created) updated = try container.decodeIfPresent(Date.self, forKey: .updated) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if articleTypeId != nil { try container.encode(articleTypeId, forKey: .articleTypeId) } if paymentReferenceId != nil { try container.encode(paymentReferenceId, forKey: .paymentReferenceId) } if paymentProviderId != nil { try container.encode(paymentProviderId, forKey: .paymentProviderId) } if orderItemReferenceId != nil { try container.encode(orderItemReferenceId, forKey: .orderItemReferenceId) } if amount != nil { try container.encode(amount, forKey: .amount) } if vat != nil { try container.encode(vat, forKey: .vat) } if amountCredited != nil { try container.encode(amountCredited, forKey: .amountCredited) } if comments != nil { try container.encode(comments, forKey: .comments) } if created != nil { try container.encode(created, forKey: .created) } if updated != nil { try container.encode(updated, forKey: .updated) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class ArticleType : BaseModel { public var articleTypeId:Int? // @Required() public var articleTypeName:String? public var articleTypeDescription:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case articleTypeId case articleTypeName case articleTypeDescription } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) articleTypeId = try container.decodeIfPresent(Int.self, forKey: .articleTypeId) articleTypeName = try container.decodeIfPresent(String.self, forKey: .articleTypeName) articleTypeDescription = try container.decodeIfPresent(String.self, forKey: .articleTypeDescription) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if articleTypeId != nil { try container.encode(articleTypeId, forKey: .articleTypeId) } if articleTypeName != nil { try container.encode(articleTypeName, forKey: .articleTypeName) } if articleTypeDescription != nil { try container.encode(articleTypeDescription, forKey: .articleTypeDescription) } } } public class ArticleInvoiceAddress : BaseModel, IBaseModelCreated, IBaseModelUpdated { // @Required() public var articleInvoiceAddressId:String? // @Required() public var companyId:String? // @Required() public var internalReferenceId:String? // @Required() public var articleTypeId:Int? public var corporateIdentityNumber:String? public var invoiceAddress1:String? public var invoiceAddress2:String? public var invoiceCity:String? public var invoicePostalCode:String? public var invoiceCountryCode:String? // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case articleInvoiceAddressId case companyId case internalReferenceId case articleTypeId case corporateIdentityNumber case invoiceAddress1 case invoiceAddress2 case invoiceCity case invoicePostalCode case invoiceCountryCode case updatedDate case createdDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) articleInvoiceAddressId = try container.decodeIfPresent(String.self, forKey: .articleInvoiceAddressId) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) articleTypeId = try container.decodeIfPresent(Int.self, forKey: .articleTypeId) corporateIdentityNumber = try container.decodeIfPresent(String.self, forKey: .corporateIdentityNumber) invoiceAddress1 = try container.decodeIfPresent(String.self, forKey: .invoiceAddress1) invoiceAddress2 = try container.decodeIfPresent(String.self, forKey: .invoiceAddress2) invoiceCity = try container.decodeIfPresent(String.self, forKey: .invoiceCity) invoicePostalCode = try container.decodeIfPresent(String.self, forKey: .invoicePostalCode) invoiceCountryCode = try container.decodeIfPresent(String.self, forKey: .invoiceCountryCode) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if articleInvoiceAddressId != nil { try container.encode(articleInvoiceAddressId, forKey: .articleInvoiceAddressId) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if articleTypeId != nil { try container.encode(articleTypeId, forKey: .articleTypeId) } if corporateIdentityNumber != nil { try container.encode(corporateIdentityNumber, forKey: .corporateIdentityNumber) } if invoiceAddress1 != nil { try container.encode(invoiceAddress1, forKey: .invoiceAddress1) } if invoiceAddress2 != nil { try container.encode(invoiceAddress2, forKey: .invoiceAddress2) } if invoiceCity != nil { try container.encode(invoiceCity, forKey: .invoiceCity) } if invoicePostalCode != nil { try container.encode(invoicePostalCode, forKey: .invoicePostalCode) } if invoiceCountryCode != nil { try container.encode(invoiceCountryCode, forKey: .invoiceCountryCode) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } } } public protocol ICustomFieldTable { var customFieldsConfig:IList? { get set } var customFieldsData:IList? { get set } var textField1:String? { get set } var textField2:String? { get set } var textField3:String? { get set } var textField4:String? { get set } var textField5:String? { get set } var textField6:String? { get set } var textField7:String? { get set } var textField8:String? { get set } var textField9:String? { get set } var textField10:String? { get set } var textField11:String? { get set } var textField12:String? { get set } var textField13:String? { get set } var textField14:String? { get set } var textField15:String? { get set } var textField16:String? { get set } var textField17:String? { get set } var textField18:String? { get set } var textField19:String? { get set } var textField20:String? { get set } } public enum CompanyStatus : Int, Codable { case Registered = 1 case AwaitingApproval = 2 case Approved = 3 case Inactive = 4 case ClosedDown = 5 case NotApproved = 6 } public class BookingSettings : BaseModel { // @References(typeof(FreeSpotTexts)) public var freeSpotTextsId:Int? // @Ignore() public var sendEmailConfirmation:Bool? // @Ignore() public var scheduleViewOptions:[ScheduleView]? // @Ignore() public var weekNumberSettingOptions:[WeekNumberSetting]? // @Ignore() public var bookingTemplateOptions:[BookingTemplate]? // @Ignore() public var calendarTypeOptions:[CalendarType]? // @Ignore() public var freeSpotTextOptions:[FreeSpotTexts]? // @Ignore() public var bookingStatusOptions:[BookingStatusOptions]? public var freeSpotTextsInfo:FreeSpotTexts? // @Ignore() public var freeSpotsTextSingular:String? // @Ignore() public var freeSpotsTextPlural:String? // @Required() public var bookingStatusId:Int? // @Required() public var scheduleViewId:Int? // @Required() public var bookingTemplateId:Int? // @Required() public var calendarTypeId:Int? // @Required() public var allowBookingOnUnbookedTimes:Bool? // @Required() public var sendEmailReminder:Bool? // @Required() public var sendSmsReminder:Bool? // @Required() public var sendSmsConfirmation:Bool? // @Required() public var emailReminderTime:Int? // @Required() public var smsReminderTime:Int? // @Required() public var sendPushNotification:Bool? // @Required() public var sendPushNotificationReminder:Bool? // @Required() public var pushNotificationReminderTime:Int? // @Required() public var maxActiveBookings:Int? // @Required() public var sendNotifications:Bool? public var sendNotificationsEmail:String? // @Required() public var enableMobileApp:Bool? @TimeSpan public var scheduleStartTime:TimeInterval? @TimeSpan public var scheduleEndTime:TimeInterval? public var receiptTemplate:String? // @Required() public var scheduleTimeSlotMinutes:Int? // @Required() public var showFreeTimesLeft:Bool? // @Required() public var enableICalGroupBookings:Bool? public var agreementTemplate:String? // @Required() public var scheduleShowTimeExeptions:Bool? // @Required() public var enableBookingsOnSameTime:Bool? // @Required() public var showWeekNumberSettingId:Int? // @Required() public var enableShowBookedTimes:Bool? // @Required() public var enableSendFollowUpMessage:Bool? // @Required() public var followUpMessageTime:Int? public var messageText:String? // @Required() public var scheduleGroupResources:Bool? // @Required() public var bookSpotUserResponseMinutes:Int? // @Required() public var isBookSpotDirectly:Bool? // @Required() public var bookSpotDirectlyTimeLeftMinutes:Int? // @Required() public var sendEmailNotificationQueue:Bool? // @Required() public var sendSMSNotificationQueue:Bool? // @Required() public var schedulerDisableHorizontalScrolling:Bool? // @Required() public var bookOnlyOnExistingCustomers:Bool? // @Required() public var autoGenerateUniquePinCode:Bool? // @Required() public var weightedPrices:Bool? public var modifiedDate:Date? // @Required() public var autoCreateUserProfile:Bool? public var showMultipleResourcesAsOne:Bool? public var showMultiDayAsTime:Bool? public var bookingPinCodeRestriction:String? public var customerInvoiceAdressRequired:Bool? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case freeSpotTextsId case sendEmailConfirmation case scheduleViewOptions case weekNumberSettingOptions case bookingTemplateOptions case calendarTypeOptions case freeSpotTextOptions case bookingStatusOptions case freeSpotTextsInfo case freeSpotsTextSingular case freeSpotsTextPlural case bookingStatusId case scheduleViewId case bookingTemplateId case calendarTypeId case allowBookingOnUnbookedTimes case sendEmailReminder case sendSmsReminder case sendSmsConfirmation case emailReminderTime case smsReminderTime case sendPushNotification case sendPushNotificationReminder case pushNotificationReminderTime case maxActiveBookings case sendNotifications case sendNotificationsEmail case enableMobileApp case scheduleStartTime case scheduleEndTime case receiptTemplate case scheduleTimeSlotMinutes case showFreeTimesLeft case enableICalGroupBookings case agreementTemplate case scheduleShowTimeExeptions case enableBookingsOnSameTime case showWeekNumberSettingId case enableShowBookedTimes case enableSendFollowUpMessage case followUpMessageTime case messageText case scheduleGroupResources case bookSpotUserResponseMinutes case isBookSpotDirectly case bookSpotDirectlyTimeLeftMinutes case sendEmailNotificationQueue case sendSMSNotificationQueue case schedulerDisableHorizontalScrolling case bookOnlyOnExistingCustomers case autoGenerateUniquePinCode case weightedPrices case modifiedDate case autoCreateUserProfile case showMultipleResourcesAsOne case showMultiDayAsTime case bookingPinCodeRestriction case customerInvoiceAdressRequired case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) freeSpotTextsId = try container.decodeIfPresent(Int.self, forKey: .freeSpotTextsId) sendEmailConfirmation = try container.decodeIfPresent(Bool.self, forKey: .sendEmailConfirmation) scheduleViewOptions = try container.decodeIfPresent([ScheduleView].self, forKey: .scheduleViewOptions) ?? [] weekNumberSettingOptions = try container.decodeIfPresent([WeekNumberSetting].self, forKey: .weekNumberSettingOptions) ?? [] bookingTemplateOptions = try container.decodeIfPresent([BookingTemplate].self, forKey: .bookingTemplateOptions) ?? [] calendarTypeOptions = try container.decodeIfPresent([CalendarType].self, forKey: .calendarTypeOptions) ?? [] freeSpotTextOptions = try container.decodeIfPresent([FreeSpotTexts].self, forKey: .freeSpotTextOptions) ?? [] bookingStatusOptions = try container.decodeIfPresent([BookingStatusOptions].self, forKey: .bookingStatusOptions) ?? [] freeSpotTextsInfo = try container.decodeIfPresent(FreeSpotTexts.self, forKey: .freeSpotTextsInfo) freeSpotsTextSingular = try container.decodeIfPresent(String.self, forKey: .freeSpotsTextSingular) freeSpotsTextPlural = try container.decodeIfPresent(String.self, forKey: .freeSpotsTextPlural) bookingStatusId = try container.decodeIfPresent(Int.self, forKey: .bookingStatusId) scheduleViewId = try container.decodeIfPresent(Int.self, forKey: .scheduleViewId) bookingTemplateId = try container.decodeIfPresent(Int.self, forKey: .bookingTemplateId) calendarTypeId = try container.decodeIfPresent(Int.self, forKey: .calendarTypeId) allowBookingOnUnbookedTimes = try container.decodeIfPresent(Bool.self, forKey: .allowBookingOnUnbookedTimes) sendEmailReminder = try container.decodeIfPresent(Bool.self, forKey: .sendEmailReminder) sendSmsReminder = try container.decodeIfPresent(Bool.self, forKey: .sendSmsReminder) sendSmsConfirmation = try container.decodeIfPresent(Bool.self, forKey: .sendSmsConfirmation) emailReminderTime = try container.decodeIfPresent(Int.self, forKey: .emailReminderTime) smsReminderTime = try container.decodeIfPresent(Int.self, forKey: .smsReminderTime) sendPushNotification = try container.decodeIfPresent(Bool.self, forKey: .sendPushNotification) sendPushNotificationReminder = try container.decodeIfPresent(Bool.self, forKey: .sendPushNotificationReminder) pushNotificationReminderTime = try container.decodeIfPresent(Int.self, forKey: .pushNotificationReminderTime) maxActiveBookings = try container.decodeIfPresent(Int.self, forKey: .maxActiveBookings) sendNotifications = try container.decodeIfPresent(Bool.self, forKey: .sendNotifications) sendNotificationsEmail = try container.decodeIfPresent(String.self, forKey: .sendNotificationsEmail) enableMobileApp = try container.decodeIfPresent(Bool.self, forKey: .enableMobileApp) scheduleStartTime = try container.convertIfPresent(TimeInterval.self, forKey: .scheduleStartTime) scheduleEndTime = try container.convertIfPresent(TimeInterval.self, forKey: .scheduleEndTime) receiptTemplate = try container.decodeIfPresent(String.self, forKey: .receiptTemplate) scheduleTimeSlotMinutes = try container.decodeIfPresent(Int.self, forKey: .scheduleTimeSlotMinutes) showFreeTimesLeft = try container.decodeIfPresent(Bool.self, forKey: .showFreeTimesLeft) enableICalGroupBookings = try container.decodeIfPresent(Bool.self, forKey: .enableICalGroupBookings) agreementTemplate = try container.decodeIfPresent(String.self, forKey: .agreementTemplate) scheduleShowTimeExeptions = try container.decodeIfPresent(Bool.self, forKey: .scheduleShowTimeExeptions) enableBookingsOnSameTime = try container.decodeIfPresent(Bool.self, forKey: .enableBookingsOnSameTime) showWeekNumberSettingId = try container.decodeIfPresent(Int.self, forKey: .showWeekNumberSettingId) enableShowBookedTimes = try container.decodeIfPresent(Bool.self, forKey: .enableShowBookedTimes) enableSendFollowUpMessage = try container.decodeIfPresent(Bool.self, forKey: .enableSendFollowUpMessage) followUpMessageTime = try container.decodeIfPresent(Int.self, forKey: .followUpMessageTime) messageText = try container.decodeIfPresent(String.self, forKey: .messageText) scheduleGroupResources = try container.decodeIfPresent(Bool.self, forKey: .scheduleGroupResources) bookSpotUserResponseMinutes = try container.decodeIfPresent(Int.self, forKey: .bookSpotUserResponseMinutes) isBookSpotDirectly = try container.decodeIfPresent(Bool.self, forKey: .isBookSpotDirectly) bookSpotDirectlyTimeLeftMinutes = try container.decodeIfPresent(Int.self, forKey: .bookSpotDirectlyTimeLeftMinutes) sendEmailNotificationQueue = try container.decodeIfPresent(Bool.self, forKey: .sendEmailNotificationQueue) sendSMSNotificationQueue = try container.decodeIfPresent(Bool.self, forKey: .sendSMSNotificationQueue) schedulerDisableHorizontalScrolling = try container.decodeIfPresent(Bool.self, forKey: .schedulerDisableHorizontalScrolling) bookOnlyOnExistingCustomers = try container.decodeIfPresent(Bool.self, forKey: .bookOnlyOnExistingCustomers) autoGenerateUniquePinCode = try container.decodeIfPresent(Bool.self, forKey: .autoGenerateUniquePinCode) weightedPrices = try container.decodeIfPresent(Bool.self, forKey: .weightedPrices) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) autoCreateUserProfile = try container.decodeIfPresent(Bool.self, forKey: .autoCreateUserProfile) showMultipleResourcesAsOne = try container.decodeIfPresent(Bool.self, forKey: .showMultipleResourcesAsOne) showMultiDayAsTime = try container.decodeIfPresent(Bool.self, forKey: .showMultiDayAsTime) bookingPinCodeRestriction = try container.decodeIfPresent(String.self, forKey: .bookingPinCodeRestriction) customerInvoiceAdressRequired = try container.decodeIfPresent(Bool.self, forKey: .customerInvoiceAdressRequired) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if freeSpotTextsId != nil { try container.encode(freeSpotTextsId, forKey: .freeSpotTextsId) } if sendEmailConfirmation != nil { try container.encode(sendEmailConfirmation, forKey: .sendEmailConfirmation) } if scheduleViewOptions != nil { try container.encode(scheduleViewOptions, forKey: .scheduleViewOptions) } if weekNumberSettingOptions != nil { try container.encode(weekNumberSettingOptions, forKey: .weekNumberSettingOptions) } if bookingTemplateOptions != nil { try container.encode(bookingTemplateOptions, forKey: .bookingTemplateOptions) } if calendarTypeOptions != nil { try container.encode(calendarTypeOptions, forKey: .calendarTypeOptions) } if freeSpotTextOptions != nil { try container.encode(freeSpotTextOptions, forKey: .freeSpotTextOptions) } if bookingStatusOptions != nil { try container.encode(bookingStatusOptions, forKey: .bookingStatusOptions) } if freeSpotTextsInfo != nil { try container.encode(freeSpotTextsInfo, forKey: .freeSpotTextsInfo) } if freeSpotsTextSingular != nil { try container.encode(freeSpotsTextSingular, forKey: .freeSpotsTextSingular) } if freeSpotsTextPlural != nil { try container.encode(freeSpotsTextPlural, forKey: .freeSpotsTextPlural) } if bookingStatusId != nil { try container.encode(bookingStatusId, forKey: .bookingStatusId) } if scheduleViewId != nil { try container.encode(scheduleViewId, forKey: .scheduleViewId) } if bookingTemplateId != nil { try container.encode(bookingTemplateId, forKey: .bookingTemplateId) } if calendarTypeId != nil { try container.encode(calendarTypeId, forKey: .calendarTypeId) } if allowBookingOnUnbookedTimes != nil { try container.encode(allowBookingOnUnbookedTimes, forKey: .allowBookingOnUnbookedTimes) } if sendEmailReminder != nil { try container.encode(sendEmailReminder, forKey: .sendEmailReminder) } if sendSmsReminder != nil { try container.encode(sendSmsReminder, forKey: .sendSmsReminder) } if sendSmsConfirmation != nil { try container.encode(sendSmsConfirmation, forKey: .sendSmsConfirmation) } if emailReminderTime != nil { try container.encode(emailReminderTime, forKey: .emailReminderTime) } if smsReminderTime != nil { try container.encode(smsReminderTime, forKey: .smsReminderTime) } if sendPushNotification != nil { try container.encode(sendPushNotification, forKey: .sendPushNotification) } if sendPushNotificationReminder != nil { try container.encode(sendPushNotificationReminder, forKey: .sendPushNotificationReminder) } if pushNotificationReminderTime != nil { try container.encode(pushNotificationReminderTime, forKey: .pushNotificationReminderTime) } if maxActiveBookings != nil { try container.encode(maxActiveBookings, forKey: .maxActiveBookings) } if sendNotifications != nil { try container.encode(sendNotifications, forKey: .sendNotifications) } if sendNotificationsEmail != nil { try container.encode(sendNotificationsEmail, forKey: .sendNotificationsEmail) } if enableMobileApp != nil { try container.encode(enableMobileApp, forKey: .enableMobileApp) } if scheduleStartTime != nil { try container.encode(scheduleStartTime, forKey: .scheduleStartTime) } if scheduleEndTime != nil { try container.encode(scheduleEndTime, forKey: .scheduleEndTime) } if receiptTemplate != nil { try container.encode(receiptTemplate, forKey: .receiptTemplate) } if scheduleTimeSlotMinutes != nil { try container.encode(scheduleTimeSlotMinutes, forKey: .scheduleTimeSlotMinutes) } if showFreeTimesLeft != nil { try container.encode(showFreeTimesLeft, forKey: .showFreeTimesLeft) } if enableICalGroupBookings != nil { try container.encode(enableICalGroupBookings, forKey: .enableICalGroupBookings) } if agreementTemplate != nil { try container.encode(agreementTemplate, forKey: .agreementTemplate) } if scheduleShowTimeExeptions != nil { try container.encode(scheduleShowTimeExeptions, forKey: .scheduleShowTimeExeptions) } if enableBookingsOnSameTime != nil { try container.encode(enableBookingsOnSameTime, forKey: .enableBookingsOnSameTime) } if showWeekNumberSettingId != nil { try container.encode(showWeekNumberSettingId, forKey: .showWeekNumberSettingId) } if enableShowBookedTimes != nil { try container.encode(enableShowBookedTimes, forKey: .enableShowBookedTimes) } if enableSendFollowUpMessage != nil { try container.encode(enableSendFollowUpMessage, forKey: .enableSendFollowUpMessage) } if followUpMessageTime != nil { try container.encode(followUpMessageTime, forKey: .followUpMessageTime) } if messageText != nil { try container.encode(messageText, forKey: .messageText) } if scheduleGroupResources != nil { try container.encode(scheduleGroupResources, forKey: .scheduleGroupResources) } if bookSpotUserResponseMinutes != nil { try container.encode(bookSpotUserResponseMinutes, forKey: .bookSpotUserResponseMinutes) } if isBookSpotDirectly != nil { try container.encode(isBookSpotDirectly, forKey: .isBookSpotDirectly) } if bookSpotDirectlyTimeLeftMinutes != nil { try container.encode(bookSpotDirectlyTimeLeftMinutes, forKey: .bookSpotDirectlyTimeLeftMinutes) } if sendEmailNotificationQueue != nil { try container.encode(sendEmailNotificationQueue, forKey: .sendEmailNotificationQueue) } if sendSMSNotificationQueue != nil { try container.encode(sendSMSNotificationQueue, forKey: .sendSMSNotificationQueue) } if schedulerDisableHorizontalScrolling != nil { try container.encode(schedulerDisableHorizontalScrolling, forKey: .schedulerDisableHorizontalScrolling) } if bookOnlyOnExistingCustomers != nil { try container.encode(bookOnlyOnExistingCustomers, forKey: .bookOnlyOnExistingCustomers) } if autoGenerateUniquePinCode != nil { try container.encode(autoGenerateUniquePinCode, forKey: .autoGenerateUniquePinCode) } if weightedPrices != nil { try container.encode(weightedPrices, forKey: .weightedPrices) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if autoCreateUserProfile != nil { try container.encode(autoCreateUserProfile, forKey: .autoCreateUserProfile) } if showMultipleResourcesAsOne != nil { try container.encode(showMultipleResourcesAsOne, forKey: .showMultipleResourcesAsOne) } if showMultiDayAsTime != nil { try container.encode(showMultiDayAsTime, forKey: .showMultiDayAsTime) } if bookingPinCodeRestriction != nil { try container.encode(bookingPinCodeRestriction, forKey: .bookingPinCodeRestriction) } if customerInvoiceAdressRequired != nil { try container.encode(customerInvoiceAdressRequired, forKey: .customerInvoiceAdressRequired) } if id != nil { try container.encode(id, forKey: .id) } } } public class CodeLockSetting : BaseModel { // @Ignore() public var codeLockSystemOptions:[CodeLockSystem]? // @Required() public var active:Bool? // @Required() public var codeLockSystemsId:Int? // @Required() public var validBeforeMinutes:Int? // @Required() public var validAfterMinutes:Int? // @Required() public var deleteOldBySchedule:Bool? // @Required() public var created:Date? // @Required() public var updated:Date? public var modifiedDate:Date? // @Required() public var sendEmailNotification:Bool? // @Required() public var sendSMSNotification:Bool? // @Required() public var emailNotificationTime:Int16? // @Required() public var smsNotificationTime:Int16? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case codeLockSystemOptions case active case codeLockSystemsId case validBeforeMinutes case validAfterMinutes case deleteOldBySchedule case created case updated case modifiedDate case sendEmailNotification case sendSMSNotification case emailNotificationTime case smsNotificationTime case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) codeLockSystemOptions = try container.decodeIfPresent([CodeLockSystem].self, forKey: .codeLockSystemOptions) ?? [] active = try container.decodeIfPresent(Bool.self, forKey: .active) codeLockSystemsId = try container.decodeIfPresent(Int.self, forKey: .codeLockSystemsId) validBeforeMinutes = try container.decodeIfPresent(Int.self, forKey: .validBeforeMinutes) validAfterMinutes = try container.decodeIfPresent(Int.self, forKey: .validAfterMinutes) deleteOldBySchedule = try container.decodeIfPresent(Bool.self, forKey: .deleteOldBySchedule) created = try container.decodeIfPresent(Date.self, forKey: .created) updated = try container.decodeIfPresent(Date.self, forKey: .updated) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) sendEmailNotification = try container.decodeIfPresent(Bool.self, forKey: .sendEmailNotification) sendSMSNotification = try container.decodeIfPresent(Bool.self, forKey: .sendSMSNotification) emailNotificationTime = try container.decodeIfPresent(Int16.self, forKey: .emailNotificationTime) smsNotificationTime = try container.decodeIfPresent(Int16.self, forKey: .smsNotificationTime) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if codeLockSystemOptions != nil { try container.encode(codeLockSystemOptions, forKey: .codeLockSystemOptions) } if active != nil { try container.encode(active, forKey: .active) } if codeLockSystemsId != nil { try container.encode(codeLockSystemsId, forKey: .codeLockSystemsId) } if validBeforeMinutes != nil { try container.encode(validBeforeMinutes, forKey: .validBeforeMinutes) } if validAfterMinutes != nil { try container.encode(validAfterMinutes, forKey: .validAfterMinutes) } if deleteOldBySchedule != nil { try container.encode(deleteOldBySchedule, forKey: .deleteOldBySchedule) } if created != nil { try container.encode(created, forKey: .created) } if updated != nil { try container.encode(updated, forKey: .updated) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if sendEmailNotification != nil { try container.encode(sendEmailNotification, forKey: .sendEmailNotification) } if sendSMSNotification != nil { try container.encode(sendSMSNotification, forKey: .sendSMSNotification) } if emailNotificationTime != nil { try container.encode(emailNotificationTime, forKey: .emailNotificationTime) } if smsNotificationTime != nil { try container.encode(smsNotificationTime, forKey: .smsNotificationTime) } if id != nil { try container.encode(id, forKey: .id) } } } public class PaymentSetting : BaseModel { public var adminPaymentOption:AdminPaymentOptions? // @Ignore() public var adminPaymentOptions:[AdminPaymentOptions]? // @Ignore() public var paymentProviderOptions:[PaymentProviders]? // @Required() public var enabled:Bool? // @Required() public var invoiceFee:Int? // @Required() public var allowCreditCardPayment:Bool? // @Required() public var allowInvoicePayment:Bool? // @Required() public var allowBankPayment:Bool? // @Required() public var guaranteeOffered:Bool? // @Required() public var refundOnCancelBooking:Bool? public var defaultPaymentOptionId:Int? // @Required() public var paymentProviderId:Int? // @Required() public var sendPaymentRequestDirectly:Bool? public var modifiedDate:Date? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case adminPaymentOption case adminPaymentOptions case paymentProviderOptions case enabled case invoiceFee case allowCreditCardPayment case allowInvoicePayment case allowBankPayment case guaranteeOffered case refundOnCancelBooking case defaultPaymentOptionId case paymentProviderId case sendPaymentRequestDirectly case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) adminPaymentOption = try container.decodeIfPresent(AdminPaymentOptions.self, forKey: .adminPaymentOption) adminPaymentOptions = try container.decodeIfPresent([AdminPaymentOptions].self, forKey: .adminPaymentOptions) ?? [] paymentProviderOptions = try container.decodeIfPresent([PaymentProviders].self, forKey: .paymentProviderOptions) ?? [] enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) invoiceFee = try container.decodeIfPresent(Int.self, forKey: .invoiceFee) allowCreditCardPayment = try container.decodeIfPresent(Bool.self, forKey: .allowCreditCardPayment) allowInvoicePayment = try container.decodeIfPresent(Bool.self, forKey: .allowInvoicePayment) allowBankPayment = try container.decodeIfPresent(Bool.self, forKey: .allowBankPayment) guaranteeOffered = try container.decodeIfPresent(Bool.self, forKey: .guaranteeOffered) refundOnCancelBooking = try container.decodeIfPresent(Bool.self, forKey: .refundOnCancelBooking) defaultPaymentOptionId = try container.decodeIfPresent(Int.self, forKey: .defaultPaymentOptionId) paymentProviderId = try container.decodeIfPresent(Int.self, forKey: .paymentProviderId) sendPaymentRequestDirectly = try container.decodeIfPresent(Bool.self, forKey: .sendPaymentRequestDirectly) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if adminPaymentOption != nil { try container.encode(adminPaymentOption, forKey: .adminPaymentOption) } if adminPaymentOptions != nil { try container.encode(adminPaymentOptions, forKey: .adminPaymentOptions) } if paymentProviderOptions != nil { try container.encode(paymentProviderOptions, forKey: .paymentProviderOptions) } if enabled != nil { try container.encode(enabled, forKey: .enabled) } if invoiceFee != nil { try container.encode(invoiceFee, forKey: .invoiceFee) } if allowCreditCardPayment != nil { try container.encode(allowCreditCardPayment, forKey: .allowCreditCardPayment) } if allowInvoicePayment != nil { try container.encode(allowInvoicePayment, forKey: .allowInvoicePayment) } if allowBankPayment != nil { try container.encode(allowBankPayment, forKey: .allowBankPayment) } if guaranteeOffered != nil { try container.encode(guaranteeOffered, forKey: .guaranteeOffered) } if refundOnCancelBooking != nil { try container.encode(refundOnCancelBooking, forKey: .refundOnCancelBooking) } if defaultPaymentOptionId != nil { try container.encode(defaultPaymentOptionId, forKey: .defaultPaymentOptionId) } if paymentProviderId != nil { try container.encode(paymentProviderId, forKey: .paymentProviderId) } if sendPaymentRequestDirectly != nil { try container.encode(sendPaymentRequestDirectly, forKey: .sendPaymentRequestDirectly) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class CompanySetting : BaseModel { // @Ignore() public var languages:[LanguageResponse]? // @Required() public var active:Bool? public var inactiveMessage:String? // @Required() public var searchable:Bool? public var gaTrackingId:String? public var facebookPixelId:String? // @Required() public var multiLanguage:Bool? // @Required() public var enableAPITranslation:Bool? // @Required() public var defaultLanguage:String? public var modifiedDate:Date? public var gtmTrackingId:String? // @Required() public var showOnMarketPlace:Bool? public var googleAdsConversionId:String? public var linkedinTagId:String? public var googleAdsConversionLabel:String? public var sendCustomerInformationToExternalProviders:Bool? // @Required() public var id:String? public var isWebhookFeatureEnabled:Bool? public var smsMessageSendLimit:Int? public var emailMessageSendLimit:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case languages case active case inactiveMessage case searchable case gaTrackingId case facebookPixelId case multiLanguage case enableAPITranslation case defaultLanguage case modifiedDate case gtmTrackingId case showOnMarketPlace case googleAdsConversionId case linkedinTagId case googleAdsConversionLabel case sendCustomerInformationToExternalProviders case id case isWebhookFeatureEnabled case smsMessageSendLimit case emailMessageSendLimit } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) languages = try container.decodeIfPresent([LanguageResponse].self, forKey: .languages) ?? [] active = try container.decodeIfPresent(Bool.self, forKey: .active) inactiveMessage = try container.decodeIfPresent(String.self, forKey: .inactiveMessage) searchable = try container.decodeIfPresent(Bool.self, forKey: .searchable) gaTrackingId = try container.decodeIfPresent(String.self, forKey: .gaTrackingId) facebookPixelId = try container.decodeIfPresent(String.self, forKey: .facebookPixelId) multiLanguage = try container.decodeIfPresent(Bool.self, forKey: .multiLanguage) enableAPITranslation = try container.decodeIfPresent(Bool.self, forKey: .enableAPITranslation) defaultLanguage = try container.decodeIfPresent(String.self, forKey: .defaultLanguage) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) gtmTrackingId = try container.decodeIfPresent(String.self, forKey: .gtmTrackingId) showOnMarketPlace = try container.decodeIfPresent(Bool.self, forKey: .showOnMarketPlace) googleAdsConversionId = try container.decodeIfPresent(String.self, forKey: .googleAdsConversionId) linkedinTagId = try container.decodeIfPresent(String.self, forKey: .linkedinTagId) googleAdsConversionLabel = try container.decodeIfPresent(String.self, forKey: .googleAdsConversionLabel) sendCustomerInformationToExternalProviders = try container.decodeIfPresent(Bool.self, forKey: .sendCustomerInformationToExternalProviders) id = try container.decodeIfPresent(String.self, forKey: .id) isWebhookFeatureEnabled = try container.decodeIfPresent(Bool.self, forKey: .isWebhookFeatureEnabled) smsMessageSendLimit = try container.decodeIfPresent(Int.self, forKey: .smsMessageSendLimit) emailMessageSendLimit = try container.decodeIfPresent(Int.self, forKey: .emailMessageSendLimit) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if languages != nil { try container.encode(languages, forKey: .languages) } if active != nil { try container.encode(active, forKey: .active) } if inactiveMessage != nil { try container.encode(inactiveMessage, forKey: .inactiveMessage) } if searchable != nil { try container.encode(searchable, forKey: .searchable) } if gaTrackingId != nil { try container.encode(gaTrackingId, forKey: .gaTrackingId) } if facebookPixelId != nil { try container.encode(facebookPixelId, forKey: .facebookPixelId) } if multiLanguage != nil { try container.encode(multiLanguage, forKey: .multiLanguage) } if enableAPITranslation != nil { try container.encode(enableAPITranslation, forKey: .enableAPITranslation) } if defaultLanguage != nil { try container.encode(defaultLanguage, forKey: .defaultLanguage) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if gtmTrackingId != nil { try container.encode(gtmTrackingId, forKey: .gtmTrackingId) } if showOnMarketPlace != nil { try container.encode(showOnMarketPlace, forKey: .showOnMarketPlace) } if googleAdsConversionId != nil { try container.encode(googleAdsConversionId, forKey: .googleAdsConversionId) } if linkedinTagId != nil { try container.encode(linkedinTagId, forKey: .linkedinTagId) } if googleAdsConversionLabel != nil { try container.encode(googleAdsConversionLabel, forKey: .googleAdsConversionLabel) } if sendCustomerInformationToExternalProviders != nil { try container.encode(sendCustomerInformationToExternalProviders, forKey: .sendCustomerInformationToExternalProviders) } if id != nil { try container.encode(id, forKey: .id) } if isWebhookFeatureEnabled != nil { try container.encode(isWebhookFeatureEnabled, forKey: .isWebhookFeatureEnabled) } if smsMessageSendLimit != nil { try container.encode(smsMessageSendLimit, forKey: .smsMessageSendLimit) } if emailMessageSendLimit != nil { try container.encode(emailMessageSendLimit, forKey: .emailMessageSendLimit) } } } public class HomepageWidgetSetting : BaseModel { // @Ignore() public var widgetServiceLayoutOptions:[WidgetServiceLayouts]? // @Ignore() public var widgetTimeLayoutOptions:[WidgetTimeLayouts]? // @Ignore() public var widgetBookingLayoutOptions:[WidgetBookingLayouts]? // @Ignore() public var widgetBookingMethodOptions:[WidgetBookingMethods]? // @Required() public var serviceLayoutId:Int? // @Required() public var timeLayoutId:Int? // @Required() public var bookingLayoutId:Int? // @Required() public var primaryColor:String? // @Required() public var showServiceImage:Bool? // @Required() public var showNextAvailableTime:Bool? // @Required() public var showEndTime:Bool? public var bookedTimeSlotText:String? // @Required() public var darkTheme:Bool? // @Required() public var showRebateCodeField:Bool? public var modifiedDate:Date? // @Required() public var enableCreateAccount:Bool? // @Required() public var enableLogin:Bool? // @Required() public var enableDirectBooking:Bool? // @Required() public var enableFacebookLogin:Bool? // @Required() public var showSubscribeToNewsletter:Bool? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case widgetServiceLayoutOptions case widgetTimeLayoutOptions case widgetBookingLayoutOptions case widgetBookingMethodOptions case serviceLayoutId case timeLayoutId case bookingLayoutId case primaryColor case showServiceImage case showNextAvailableTime case showEndTime case bookedTimeSlotText case darkTheme case showRebateCodeField case modifiedDate case enableCreateAccount case enableLogin case enableDirectBooking case enableFacebookLogin case showSubscribeToNewsletter case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) widgetServiceLayoutOptions = try container.decodeIfPresent([WidgetServiceLayouts].self, forKey: .widgetServiceLayoutOptions) ?? [] widgetTimeLayoutOptions = try container.decodeIfPresent([WidgetTimeLayouts].self, forKey: .widgetTimeLayoutOptions) ?? [] widgetBookingLayoutOptions = try container.decodeIfPresent([WidgetBookingLayouts].self, forKey: .widgetBookingLayoutOptions) ?? [] widgetBookingMethodOptions = try container.decodeIfPresent([WidgetBookingMethods].self, forKey: .widgetBookingMethodOptions) ?? [] serviceLayoutId = try container.decodeIfPresent(Int.self, forKey: .serviceLayoutId) timeLayoutId = try container.decodeIfPresent(Int.self, forKey: .timeLayoutId) bookingLayoutId = try container.decodeIfPresent(Int.self, forKey: .bookingLayoutId) primaryColor = try container.decodeIfPresent(String.self, forKey: .primaryColor) showServiceImage = try container.decodeIfPresent(Bool.self, forKey: .showServiceImage) showNextAvailableTime = try container.decodeIfPresent(Bool.self, forKey: .showNextAvailableTime) showEndTime = try container.decodeIfPresent(Bool.self, forKey: .showEndTime) bookedTimeSlotText = try container.decodeIfPresent(String.self, forKey: .bookedTimeSlotText) darkTheme = try container.decodeIfPresent(Bool.self, forKey: .darkTheme) showRebateCodeField = try container.decodeIfPresent(Bool.self, forKey: .showRebateCodeField) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) enableCreateAccount = try container.decodeIfPresent(Bool.self, forKey: .enableCreateAccount) enableLogin = try container.decodeIfPresent(Bool.self, forKey: .enableLogin) enableDirectBooking = try container.decodeIfPresent(Bool.self, forKey: .enableDirectBooking) enableFacebookLogin = try container.decodeIfPresent(Bool.self, forKey: .enableFacebookLogin) showSubscribeToNewsletter = try container.decodeIfPresent(Bool.self, forKey: .showSubscribeToNewsletter) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if widgetServiceLayoutOptions != nil { try container.encode(widgetServiceLayoutOptions, forKey: .widgetServiceLayoutOptions) } if widgetTimeLayoutOptions != nil { try container.encode(widgetTimeLayoutOptions, forKey: .widgetTimeLayoutOptions) } if widgetBookingLayoutOptions != nil { try container.encode(widgetBookingLayoutOptions, forKey: .widgetBookingLayoutOptions) } if widgetBookingMethodOptions != nil { try container.encode(widgetBookingMethodOptions, forKey: .widgetBookingMethodOptions) } if serviceLayoutId != nil { try container.encode(serviceLayoutId, forKey: .serviceLayoutId) } if timeLayoutId != nil { try container.encode(timeLayoutId, forKey: .timeLayoutId) } if bookingLayoutId != nil { try container.encode(bookingLayoutId, forKey: .bookingLayoutId) } if primaryColor != nil { try container.encode(primaryColor, forKey: .primaryColor) } if showServiceImage != nil { try container.encode(showServiceImage, forKey: .showServiceImage) } if showNextAvailableTime != nil { try container.encode(showNextAvailableTime, forKey: .showNextAvailableTime) } if showEndTime != nil { try container.encode(showEndTime, forKey: .showEndTime) } if bookedTimeSlotText != nil { try container.encode(bookedTimeSlotText, forKey: .bookedTimeSlotText) } if darkTheme != nil { try container.encode(darkTheme, forKey: .darkTheme) } if showRebateCodeField != nil { try container.encode(showRebateCodeField, forKey: .showRebateCodeField) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if enableCreateAccount != nil { try container.encode(enableCreateAccount, forKey: .enableCreateAccount) } if enableLogin != nil { try container.encode(enableLogin, forKey: .enableLogin) } if enableDirectBooking != nil { try container.encode(enableDirectBooking, forKey: .enableDirectBooking) } if enableFacebookLogin != nil { try container.encode(enableFacebookLogin, forKey: .enableFacebookLogin) } if showSubscribeToNewsletter != nil { try container.encode(showSubscribeToNewsletter, forKey: .showSubscribeToNewsletter) } if id != nil { try container.encode(id, forKey: .id) } } } public class HomepageSetting : BaseModel, ICompany { // @Ignore() public var homepageTemplateOptions:[HomepageTemplate]? // @Ignore() public var homepageHeroSectionStyleOptions:[HeroSectionStyle]? // @Ignore() public var companyId:String? public var welcomePageHeading:String? public var welcomePageBody:String? public var aboutUsPageHeading:String? public var aboutUsPageBody:String? // @Required() public var homePageTemplateId:Int? public var imageUrl:String? // @Required() public var updated:Date? // @Required() public var created:Date? public var homepageHeading:String? // @Required() public var heroSectionStyleId:Int? public var modifiedDate:Date? // @Required() public var showRating:Bool? // @Required() public var enableHomepage:Bool? // @Required() public var id:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case homepageTemplateOptions case homepageHeroSectionStyleOptions case companyId case welcomePageHeading case welcomePageBody case aboutUsPageHeading case aboutUsPageBody case homePageTemplateId case imageUrl case updated case created case homepageHeading case heroSectionStyleId case modifiedDate case showRating case enableHomepage case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) homepageTemplateOptions = try container.decodeIfPresent([HomepageTemplate].self, forKey: .homepageTemplateOptions) ?? [] homepageHeroSectionStyleOptions = try container.decodeIfPresent([HeroSectionStyle].self, forKey: .homepageHeroSectionStyleOptions) ?? [] companyId = try container.decodeIfPresent(String.self, forKey: .companyId) welcomePageHeading = try container.decodeIfPresent(String.self, forKey: .welcomePageHeading) welcomePageBody = try container.decodeIfPresent(String.self, forKey: .welcomePageBody) aboutUsPageHeading = try container.decodeIfPresent(String.self, forKey: .aboutUsPageHeading) aboutUsPageBody = try container.decodeIfPresent(String.self, forKey: .aboutUsPageBody) homePageTemplateId = try container.decodeIfPresent(Int.self, forKey: .homePageTemplateId) imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) updated = try container.decodeIfPresent(Date.self, forKey: .updated) created = try container.decodeIfPresent(Date.self, forKey: .created) homepageHeading = try container.decodeIfPresent(String.self, forKey: .homepageHeading) heroSectionStyleId = try container.decodeIfPresent(Int.self, forKey: .heroSectionStyleId) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) showRating = try container.decodeIfPresent(Bool.self, forKey: .showRating) enableHomepage = try container.decodeIfPresent(Bool.self, forKey: .enableHomepage) id = try container.decodeIfPresent(String.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if homepageTemplateOptions != nil { try container.encode(homepageTemplateOptions, forKey: .homepageTemplateOptions) } if homepageHeroSectionStyleOptions != nil { try container.encode(homepageHeroSectionStyleOptions, forKey: .homepageHeroSectionStyleOptions) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if welcomePageHeading != nil { try container.encode(welcomePageHeading, forKey: .welcomePageHeading) } if welcomePageBody != nil { try container.encode(welcomePageBody, forKey: .welcomePageBody) } if aboutUsPageHeading != nil { try container.encode(aboutUsPageHeading, forKey: .aboutUsPageHeading) } if aboutUsPageBody != nil { try container.encode(aboutUsPageBody, forKey: .aboutUsPageBody) } if homePageTemplateId != nil { try container.encode(homePageTemplateId, forKey: .homePageTemplateId) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if updated != nil { try container.encode(updated, forKey: .updated) } if created != nil { try container.encode(created, forKey: .created) } if homepageHeading != nil { try container.encode(homepageHeading, forKey: .homepageHeading) } if heroSectionStyleId != nil { try container.encode(heroSectionStyleId, forKey: .heroSectionStyleId) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if showRating != nil { try container.encode(showRating, forKey: .showRating) } if enableHomepage != nil { try container.encode(enableHomepage, forKey: .enableHomepage) } if id != nil { try container.encode(id, forKey: .id) } } } public class AverageRatingScore : Codable { public var averageScore:Double? public var score1Count:Int? public var score2Count:Int? public var score3Count:Int? public var score4Count:Int? public var score5Count:Int? public var count:Int? required public init(){} } public class KeyCloakRole : Codable { public var id:String? public var name:String? required public init(){} } public protocol IUser { var id:String? { get set } var userId:String? { get set } var email:String? { get set } var firstname:String? { get set } var lastname:String? { get set } var phone:String? { get set } } public class CustomFieldValue : BaseModel { // @Required() public var companyId:String? public var id:Int? // @Required() public var value:String? // @Required() public var active:Bool? public var sortOrder:Int16? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case id case value case active case sortOrder case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) value = try container.decodeIfPresent(String.self, forKey: .value) active = try container.decodeIfPresent(Bool.self, forKey: .active) sortOrder = try container.decodeIfPresent(Int16.self, forKey: .sortOrder) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if value != nil { try container.encode(value, forKey: .value) } if active != nil { try container.encode(active, forKey: .active) } if sortOrder != nil { try container.encode(sortOrder, forKey: .sortOrder) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class CustomField : BaseModel { // @Required() public var table:String? // @Required() public var column:String? // @Required() public var dataType:String? // @Required() public var Description:String? // @Required() public var active:Bool? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case table case column case dataType case Description case active case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) table = try container.decodeIfPresent(String.self, forKey: .table) column = try container.decodeIfPresent(String.self, forKey: .column) dataType = try container.decodeIfPresent(String.self, forKey: .dataType) Description = try container.decodeIfPresent(String.self, forKey: .Description) active = try container.decodeIfPresent(Bool.self, forKey: .active) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if table != nil { try container.encode(table, forKey: .table) } if column != nil { try container.encode(column, forKey: .column) } if dataType != nil { try container.encode(dataType, forKey: .dataType) } if Description != nil { try container.encode(Description, forKey: .Description) } if active != nil { try container.encode(active, forKey: .active) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class RegEx : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var regExCode:String? public var errorMessage:String? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case regExCode case errorMessage case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) regExCode = try container.decodeIfPresent(String.self, forKey: .regExCode) errorMessage = try container.decodeIfPresent(String.self, forKey: .errorMessage) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if regExCode != nil { try container.encode(regExCode, forKey: .regExCode) } if errorMessage != nil { try container.encode(errorMessage, forKey: .errorMessage) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class CustomFieldServiceRelation : BaseModel { // @Required() public var companyId:String? public var id:Int? // @Required() public var customFieldConfigId:Int? // @Required() public var serviceId:Int? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case id case customFieldConfigId case serviceId case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) customFieldConfigId = try container.decodeIfPresent(Int.self, forKey: .customFieldConfigId) serviceId = try container.decodeIfPresent(Int.self, forKey: .serviceId) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if customFieldConfigId != nil { try container.encode(customFieldConfigId, forKey: .customFieldConfigId) } if serviceId != nil { try container.encode(serviceId, forKey: .serviceId) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class LicensePrice : BaseModel { // @Ignore() public var country:Country? // @Ignore() public var monthlyPayment:Bool? // @Required() public var licenseTypeId:Int? // @Required() public var countryId:String? // @Required() public var price:Int? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case country case monthlyPayment case licenseTypeId case countryId case price case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) country = try container.decodeIfPresent(Country.self, forKey: .country) monthlyPayment = try container.decodeIfPresent(Bool.self, forKey: .monthlyPayment) licenseTypeId = try container.decodeIfPresent(Int.self, forKey: .licenseTypeId) countryId = try container.decodeIfPresent(String.self, forKey: .countryId) price = try container.decodeIfPresent(Int.self, forKey: .price) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if country != nil { try container.encode(country, forKey: .country) } if monthlyPayment != nil { try container.encode(monthlyPayment, forKey: .monthlyPayment) } if licenseTypeId != nil { try container.encode(licenseTypeId, forKey: .licenseTypeId) } if countryId != nil { try container.encode(countryId, forKey: .countryId) } if price != nil { try container.encode(price, forKey: .price) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class LicenseTypeItem : BaseModel { // @Ignore() public var name:String? // @Ignore() public var licenseType:LicenseType? // @Required() public var licenseTypesId:Int? // @Required() public var licenseItemsId:Int? // @Required() public var numberOfItems:Int? public var id:Int? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case licenseType case licenseTypesId case licenseItemsId case numberOfItems case id case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) licenseType = try container.decodeIfPresent(LicenseType.self, forKey: .licenseType) licenseTypesId = try container.decodeIfPresent(Int.self, forKey: .licenseTypesId) licenseItemsId = try container.decodeIfPresent(Int.self, forKey: .licenseItemsId) numberOfItems = try container.decodeIfPresent(Int.self, forKey: .numberOfItems) id = try container.decodeIfPresent(Int.self, forKey: .id) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if licenseType != nil { try container.encode(licenseType, forKey: .licenseType) } if licenseTypesId != nil { try container.encode(licenseTypesId, forKey: .licenseTypesId) } if licenseItemsId != nil { try container.encode(licenseItemsId, forKey: .licenseItemsId) } if numberOfItems != nil { try container.encode(numberOfItems, forKey: .numberOfItems) } if id != nil { try container.encode(id, forKey: .id) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class RebateCodeType : BaseModel { // @Required() public var name:String? public var Description:String? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class RebateCodeStatus : BaseModel { // @Required() public var name:String? public var Description:String? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class RebateCodeDayOfWeekRelation : BaseModel { // @Ignore() public var dayOfWeek:BokaMeraDayOfWeek? // @Required() public var dayOfWeekId:Int? // @Required() public var rebateCodeId:Int? // @Required() public var companyId:String? public var id:Int? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dayOfWeek case dayOfWeekId case rebateCodeId case companyId case id case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dayOfWeek = try container.decodeIfPresent(BokaMeraDayOfWeek.self, forKey: .dayOfWeek) dayOfWeekId = try container.decodeIfPresent(Int.self, forKey: .dayOfWeekId) rebateCodeId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeId) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) id = try container.decodeIfPresent(Int.self, forKey: .id) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dayOfWeek != nil { try container.encode(dayOfWeek, forKey: .dayOfWeek) } if dayOfWeekId != nil { try container.encode(dayOfWeekId, forKey: .dayOfWeekId) } if rebateCodeId != nil { try container.encode(rebateCodeId, forKey: .rebateCodeId) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if id != nil { try container.encode(id, forKey: .id) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class RebateCodeServiceRelation : BaseModel { // @Required() public var companyId:String? // @Required() public var serviceId:Int? // @Required() public var rebateCodeId:Int? public var id:Int? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case serviceId case rebateCodeId case id case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) serviceId = try container.decodeIfPresent(Int.self, forKey: .serviceId) rebateCodeId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeId) id = try container.decodeIfPresent(Int.self, forKey: .id) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if serviceId != nil { try container.encode(serviceId, forKey: .serviceId) } if rebateCodeId != nil { try container.encode(rebateCodeId, forKey: .rebateCodeId) } if id != nil { try container.encode(id, forKey: .id) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class RebateCodeBookingPriceRelation : BaseModel { // @Required() public var companyId:String? // @Required() public var priceId:Int? // @Required() public var rebateCodeId:Int? public var id:Int? public var modifiedDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case priceId case rebateCodeId case id case modifiedDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) priceId = try container.decodeIfPresent(Int.self, forKey: .priceId) rebateCodeId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeId) id = try container.decodeIfPresent(Int.self, forKey: .id) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if priceId != nil { try container.encode(priceId, forKey: .priceId) } if rebateCodeId != nil { try container.encode(rebateCodeId, forKey: .rebateCodeId) } if id != nil { try container.encode(id, forKey: .id) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } } } public class RebateCodeCustomerRelation : BaseModel { // @Required() public var companyId:String? // @Required() public var customerId:String? // @Required() public var rebateCodeId:Int? public var id:Int? public var modifiedDate:Date? public var rebateCodeEmailSentToCustomer:Bool? public var messageToReceiver:String? public var buyer:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case customerId case rebateCodeId case id case modifiedDate case rebateCodeEmailSentToCustomer case messageToReceiver case buyer } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) rebateCodeId = try container.decodeIfPresent(Int.self, forKey: .rebateCodeId) id = try container.decodeIfPresent(Int.self, forKey: .id) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) rebateCodeEmailSentToCustomer = try container.decodeIfPresent(Bool.self, forKey: .rebateCodeEmailSentToCustomer) messageToReceiver = try container.decodeIfPresent(String.self, forKey: .messageToReceiver) buyer = try container.decodeIfPresent(Bool.self, forKey: .buyer) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if companyId != nil { try container.encode(companyId, forKey: .companyId) } if customerId != nil { try container.encode(customerId, forKey: .customerId) } if rebateCodeId != nil { try container.encode(rebateCodeId, forKey: .rebateCodeId) } if id != nil { try container.encode(id, forKey: .id) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if rebateCodeEmailSentToCustomer != nil { try container.encode(rebateCodeEmailSentToCustomer, forKey: .rebateCodeEmailSentToCustomer) } if messageToReceiver != nil { try container.encode(messageToReceiver, forKey: .messageToReceiver) } if buyer != nil { try container.encode(buyer, forKey: .buyer) } } } public class DaysOfWeek : BaseModel { // @Required() public var dayOfWeek:String? // @Required() public var dayOfWeekTranslation:String? public var dayOfWeekActive:Bool? public var dayOfWeekSortOrder:Int16? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dayOfWeek case dayOfWeekTranslation case dayOfWeekActive case dayOfWeekSortOrder case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dayOfWeek = try container.decodeIfPresent(String.self, forKey: .dayOfWeek) dayOfWeekTranslation = try container.decodeIfPresent(String.self, forKey: .dayOfWeekTranslation) dayOfWeekActive = try container.decodeIfPresent(Bool.self, forKey: .dayOfWeekActive) dayOfWeekSortOrder = try container.decodeIfPresent(Int16.self, forKey: .dayOfWeekSortOrder) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dayOfWeek != nil { try container.encode(dayOfWeek, forKey: .dayOfWeek) } if dayOfWeekTranslation != nil { try container.encode(dayOfWeekTranslation, forKey: .dayOfWeekTranslation) } if dayOfWeekActive != nil { try container.encode(dayOfWeekActive, forKey: .dayOfWeekActive) } if dayOfWeekSortOrder != nil { try container.encode(dayOfWeekSortOrder, forKey: .dayOfWeekSortOrder) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public protocol ISchedule { var companyId:String? { get set } var resources:IList? { get set } var type:ScheduleType? { get set } var active:Bool? { get set } var isResourceSpecific:Bool? { get set } } public protocol ITimeException : IInterval { var id:Int? { get set } var reasonText:String? { get set } var isBlock:Bool? { get set } var reasonTextPublic:String? { get set } var isRecurring:Bool? { get set } var resourceIds:[Int]? { get set } } public protocol IBookedTime : IInterval { var id:Int? { get set } var serviceId:Int? { get set } var bookedSpots:Int? { get set } var totalSpots:Int? { get set } var pauseAfterInMinutes:Int? { get set } var status:BookingStatusEnum? { get set } var statusId:Int? { get set } var customer:BookedCustomer? { get set } } public class ServicePriceDayOfWeekRelation : BaseModel { // @Ignore() public var dayOfWeek:BokaMeraDayOfWeek? // @Required() public var companyId:String? // @Required() public var servicePriceId:Int? // @Required() public var dayOfWeekId:Int? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dayOfWeek case companyId case servicePriceId case dayOfWeekId case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dayOfWeek = try container.decodeIfPresent(BokaMeraDayOfWeek.self, forKey: .dayOfWeek) companyId = try container.decodeIfPresent(String.self, forKey: .companyId) servicePriceId = try container.decodeIfPresent(Int.self, forKey: .servicePriceId) dayOfWeekId = try container.decodeIfPresent(Int.self, forKey: .dayOfWeekId) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dayOfWeek != nil { try container.encode(dayOfWeek, forKey: .dayOfWeek) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if servicePriceId != nil { try container.encode(servicePriceId, forKey: .servicePriceId) } if dayOfWeekId != nil { try container.encode(dayOfWeekId, forKey: .dayOfWeekId) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class ServiceSchedule : Codable { /** * The schedule id */ // @ApiMember(Description="The schedule id") public var id:Int? required public init(){} } public class TotalPriceInformation : Codable { public var totalPrice:Double? public var totalVATAmount:Double? public var totalRebate:Double? public var totalPriceBeforeRebate:Double? public var appliedCodes:[AppliedRebateCodes]? public var priceSign:String? public var currencyId:String? public var vat:Double? required public init(){} } public class CustomFieldValueResponse : Codable { public var value:String? required public init(){} } public class BookedResource : Codable { public var id:Int? public var name:String? public var color:String? public var imageUrl:Uri? public var email:String? public var mobilePhone:String? public var accessGroup:String? public var emailNotification:Bool? public var smsNotification:Bool? public var emailReminder:Bool? public var smsReminder:Bool? required public init(){} } public class ServiceResourceTypeResource : Codable { /** * The resource id */ // @ApiMember(Description="The resource id") public var id:Int? /** * The resource name */ // @ApiMember(Description="The resource name") public var name:String? /** * The resource description */ // @ApiMember(Description="The resource description") public var Description:String? /** * The resource email */ // @ApiMember(Description="The resource email") public var email:String? /** * The resource phone */ // @ApiMember(Description="The resource phone") public var phone:String? /** * The resource color */ // @ApiMember(Description="The resource color") public var color:String? /** * The resource image */ // @ApiMember(Description="The resource image") public var imageUrl:Uri? /** * The priority of the resource */ // @ApiMember(Description="The priority of the resource") public var priority:Int? /** * If the resource want to receive email notifications */ // @ApiMember(Description="If the resource want to receive email notifications") public var emailNotification:Bool? /** * If the resource want to receive sms notifications */ // @ApiMember(Description="If the resource want to receive sms notifications") public var smsNotification:Bool? /** * If the resource want to receive email reminders */ // @ApiMember(Description="If the resource want to receive email reminders") public var emailReminder:Bool? /** * If the resource want to receive sms reminders */ // @ApiMember(Description="If the resource want to receive sms reminders") public var smsReminder:Bool? required public init(){} } public class AppliedRebateCodes : Codable { public var rebateCodeId:Int? public var rebateCodeSign:String? public var rebateCodeValue:Int? public var rebateAmount:Double? public var rebateCodeType:RebateCodeType? required public init(){} } public class Credentials : Codable { public var hash:String? public var id:String? public var version:String? public var client:String? public var serverdata:ServerData? public var time:String? public var test:String? public var language:String? required public init(){} } public class InitCheckoutData : Codable { public var checkoutData:CheckoutData? public var paymentData:CheckoutPaymentData? public var paymentInfo:PaymentInfo? public var articles:[QvicklyArticle]? public var cart:Cart? public var qvicklyCustomer:QvicklyCustomer? required public init(){} } public class GetCheckoutResponse : Codable { public var credentials:Credentials? public var data:Data? required public init(){} } public class InitCheckoutResponse : Codable { public var number:Int? public var status:String? public var orderId:String? public var url:String? required public init(){} } public class QvicklyPaymentResponse : Codable { public var paymentData:QvikclyPaymentData? public var paymentInfo:PaymentInfo? public var card:Card? public var settlement:Settlement? public var qvicklyCustomer:QvicklyCustomer? public var articles:[QvicklyArticle]? public var cart:Cart? required public init(){} } public class Customer : Codable { public var city:String? public var countryCode:String? public var identityNumber:String? public var email:String? public var firstName:String? public var lastName:String? public var phone:String? public var postalCode:String? public var street:String? public var reference:String? public var type:CustomerType? required public init(){} } public class Order : Codable { public var currency:Currency? public var totalFeeExcludingTax:Double? public var totalFeeIncludingTax:Double? public var totalPriceExcludingTax:Double? public var totalPriceIncludingTax:Double? public var totalTaxAmount:Double? public var totalCreditedAmount:Double? public var items:IList? required public init(){} } public class Merchant : Codable { public var checkoutUri:String? public var confirmationUri:String? public var notificationUri:Uri? public var validationUri:Uri? public var termsUri:Uri? public var reference:String? public var partnerId:String? required public init(){} } public class Gui : Codable { public var colorScheme:ColorScheme? public var locale:String? public var requestPhone:Bool? public var phoneOptional:Bool? required public init(){} } public class History : Codable { public var created:Date? public var readyToPay:Date? public var readyToShip:Date? public var shipped:Date? public var paidToAccount:Date? public var canceled:Date? public var expired:Date? public var denied:Date? required public init(){} } public class StripeCreatePaymentOptions : Codable { public var sessionCreateOptions:SessionCreateOptions? public var paymentIntentCreateOptions:PaymentIntentCreateOptions? public var customerCreateOptions:CustomerCreateOptions? required public init(){} } public class RequestOptions : Codable { public var apiKey:String? public var idempotencyKey:String? public var stripeAccount:String? public var stripeContext:String? required public init(){} } public class CustomSessionData : Codable { public var session:Session? public var lineItems:[LineItem]? public var paymentIntent:PaymentIntent? required public init(){} } public class CustomPaymentIntentData : Codable { public var paymentIntent:PaymentIntent? required public init(){} } public protocol ILogger { } public class DataCacheStore : Codable { required public init(){} } public class ScheduleView : BaseModel { // @Required() public var name:String? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class WeekNumberSetting : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class BookingTemplate : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var usedByApplication:String? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case usedByApplication case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) usedByApplication = try container.decodeIfPresent(String.self, forKey: .usedByApplication) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if usedByApplication != nil { try container.encode(usedByApplication, forKey: .usedByApplication) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class CalendarType : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var active:Bool? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case active case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) active = try container.decodeIfPresent(Bool.self, forKey: .active) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if active != nil { try container.encode(active, forKey: .active) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class FreeSpotTexts : BaseModel { // @Required() public var textSingular:String? // @Required() public var textPlural:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case textSingular case textPlural case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) textSingular = try container.decodeIfPresent(String.self, forKey: .textSingular) textPlural = try container.decodeIfPresent(String.self, forKey: .textPlural) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if textSingular != nil { try container.encode(textSingular, forKey: .textSingular) } if textPlural != nil { try container.encode(textPlural, forKey: .textPlural) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class CodeLockSystem : BaseModel { // @Required() public var name:String? // @Required() public var supplier:String? public var logoType:String? // @Required() public var Description:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case supplier case logoType case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) supplier = try container.decodeIfPresent(String.self, forKey: .supplier) logoType = try container.decodeIfPresent(String.self, forKey: .logoType) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if supplier != nil { try container.encode(supplier, forKey: .supplier) } if logoType != nil { try container.encode(logoType, forKey: .logoType) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class AdminPaymentOptions : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class PaymentProviders : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var category:String? public var url:String? // @Required() public var active:Bool? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case category case url case active case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) category = try container.decodeIfPresent(String.self, forKey: .category) url = try container.decodeIfPresent(String.self, forKey: .url) active = try container.decodeIfPresent(Bool.self, forKey: .active) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if category != nil { try container.encode(category, forKey: .category) } if url != nil { try container.encode(url, forKey: .url) } if active != nil { try container.encode(active, forKey: .active) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class WidgetServiceLayouts : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var code:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case code case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) code = try container.decodeIfPresent(String.self, forKey: .code) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if code != nil { try container.encode(code, forKey: .code) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class WidgetTimeLayouts : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var code:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case code case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) code = try container.decodeIfPresent(String.self, forKey: .code) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if code != nil { try container.encode(code, forKey: .code) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class WidgetBookingLayouts : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var code:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case code case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) code = try container.decodeIfPresent(String.self, forKey: .code) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if code != nil { try container.encode(code, forKey: .code) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class WidgetBookingMethods : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? // @Required() public var code:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case code case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) code = try container.decodeIfPresent(String.self, forKey: .code) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if code != nil { try container.encode(code, forKey: .code) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class HomepageTemplate : BaseModel { // @Required() public var name:String? // @Required() public var Description:String? public var imageUrl:Uri? // @Required() public var premium:Bool? public var modifiedDate:Date? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case imageUrl case premium case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) imageUrl = try container.decodeIfPresent(Uri.self, forKey: .imageUrl) premium = try container.decodeIfPresent(Bool.self, forKey: .premium) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if imageUrl != nil { try container.encode(imageUrl, forKey: .imageUrl) } if premium != nil { try container.encode(premium, forKey: .premium) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public class HeroSectionStyle : BaseModel { // @Required() public var name:String? public var Description:String? public var modifiedDate:Date? // @Required() public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case Description case modifiedDate case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) Description = try container.decodeIfPresent(String.self, forKey: .Description) modifiedDate = try container.decodeIfPresent(Date.self, forKey: .modifiedDate) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if Description != nil { try container.encode(Description, forKey: .Description) } if modifiedDate != nil { try container.encode(modifiedDate, forKey: .modifiedDate) } if id != nil { try container.encode(id, forKey: .id) } } } public enum BokaMeraDayOfWeek : Int, Codable { case Monday = 1 case Tuesday = 2 case Wednesday = 3 case Thursday = 4 case Friday = 5 case Saturday = 6 case Sunday = 7 } public class CheckoutData : Codable { public var terms:Uri? public var privacyPolicy:Uri? public var redirectOnSuccess:String? required public init(){} } public class CheckoutPaymentData : Codable { public var currency:String? public var language:String? public var country:String? public var autoactivate:String? public var orderid:String? public var returnmethod:String? public var accepturl:String? public var cancelurl:String? public var callbackurl:Uri? public var invoice:CheckoutInvoice? required public init(){} } public class PaymentInfo : Codable { public var paymentdate:String? public var paymentterms:String? public var yourreference:String? public var ourreference:String? public var projectname:String? public var deliverymethod:String? public var deliveryterms:String? required public init(){} } public class QvicklyArticle : Codable { public var artnr:String? public var title:String? public var quantity:Int? public var aprice:Int? public var tax:Int? public var discount:Int? public var withouttax:Int? public var taxrate:Int? required public init(){} } public class Cart : Codable { public var handling:CartHandling? public var total:CartTotal? public var shipping:Shipping? required public init(){} } public class QvicklyCustomer : Codable { public var nr:String? public var pno:String? public var billing:CustomerBilling? required public init(){} } public class Credentials : Codable { public var hash:String? public var logid:String? required public init(){} } public class Data : Codable { public var checkoutData:CheckoutData? public var paymentData:CheckoutPaymentData? public var articles:[QvicklyArticle]? required public init(){} } public class QvikclyPaymentData : Codable { public var method:String? public var paymentplanid:String? public var currency:String? public var country:String? public var language:String? public var autoactivate:String? public var orderid:String? public var status:String? public var paymentid_related:String? public var url:String? required public init(){} } public class Card : Codable { public var promptname:String? public var recurring:String? public var recurringnr:String? public var accepturl:String? public var cancelurl:String? public var callbackurl:String? public var returnmethod:String? required public init(){} } public class Settlement : Codable { public var number:Int? public var date:String? required public init(){} } public enum Currency : Int, Codable { case SEK = 1 case EUR = 2 } public class Item : Codable { public var itemId:String? public var discountRate:Double? public var ean:String? public var imageUri:Uri? public var name:String? public var quantity:Double? public var reference:String? public var taxRate:Double? public var totalPriceExcludingTax:Double? public var totalPriceIncludingTax:Double? public var totalTaxAmount:Double? public var creditedAmount:Double? public var type:ItemType? public var unitPrice:Double? public var uri:Uri? required public init(){} } public enum ColorScheme : String, Codable { case White case Blue case Gray case GrayTextLogos case BlueTextLogos case WhiteTextLogos case WhiteNoFooter case GrayNoFooter case BlueNoFooter } public class SessionCreateOptions : BaseOptions, IHasMetadata { public var adaptivePricing:SessionAdaptivePricingOptions? public var afterExpiration:SessionAfterExpirationOptions? public var allowPromotionCodes:Bool? public var automaticTax:SessionAutomaticTaxOptions? public var billingAddressCollection:String? public var cancelUrl:String? public var clientReferenceId:String? public var consentCollection:SessionConsentCollectionOptions? public var currency:String? public var customFields:[SessionCustomFieldOptions]? public var customText:SessionCustomTextOptions? public var customer:String? public var customerCreation:String? public var customerEmail:String? public var customerUpdate:SessionCustomerUpdateOptions? public var discounts:[SessionDiscountOptions]? public var expiresAt:Date? public var invoiceCreation:SessionInvoiceCreationOptions? public var lineItems:[SessionLineItemOptions]? public var locale:String? public var metadata:[String:String]? public var mode:String? public var optionalItems:[SessionOptionalItemOptions]? public var paymentIntentData:SessionPaymentIntentDataOptions? public var paymentMethodCollection:String? public var paymentMethodConfiguration:String? public var paymentMethodData:SessionPaymentMethodDataOptions? public var paymentMethodOptions:SessionPaymentMethodOptionsOptions? public var paymentMethodTypes:[String]? public var permissions:SessionPermissionsOptions? public var phoneNumberCollection:SessionPhoneNumberCollectionOptions? public var redirectOnCompletion:String? public var returnUrl:String? public var savedPaymentMethodOptions:SessionSavedPaymentMethodOptionsOptions? public var setupIntentData:SessionSetupIntentDataOptions? public var shippingAddressCollection:SessionShippingAddressCollectionOptions? public var shippingOptions:[SessionShippingOptionOptions]? public var submitType:String? public var subscriptionData:SessionSubscriptionDataOptions? public var successUrl:String? public var taxIdCollection:SessionTaxIdCollectionOptions? public var uiMode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case adaptivePricing case afterExpiration case allowPromotionCodes case automaticTax case billingAddressCollection case cancelUrl case clientReferenceId case consentCollection case currency case customFields case customText case customer case customerCreation case customerEmail case customerUpdate case discounts case expiresAt case invoiceCreation case lineItems case locale case metadata case mode case optionalItems case paymentIntentData case paymentMethodCollection case paymentMethodConfiguration case paymentMethodData case paymentMethodOptions case paymentMethodTypes case permissions case phoneNumberCollection case redirectOnCompletion case returnUrl case savedPaymentMethodOptions case setupIntentData case shippingAddressCollection case shippingOptions case submitType case subscriptionData case successUrl case taxIdCollection case uiMode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) adaptivePricing = try container.decodeIfPresent(SessionAdaptivePricingOptions.self, forKey: .adaptivePricing) afterExpiration = try container.decodeIfPresent(SessionAfterExpirationOptions.self, forKey: .afterExpiration) allowPromotionCodes = try container.decodeIfPresent(Bool.self, forKey: .allowPromotionCodes) automaticTax = try container.decodeIfPresent(SessionAutomaticTaxOptions.self, forKey: .automaticTax) billingAddressCollection = try container.decodeIfPresent(String.self, forKey: .billingAddressCollection) cancelUrl = try container.decodeIfPresent(String.self, forKey: .cancelUrl) clientReferenceId = try container.decodeIfPresent(String.self, forKey: .clientReferenceId) consentCollection = try container.decodeIfPresent(SessionConsentCollectionOptions.self, forKey: .consentCollection) currency = try container.decodeIfPresent(String.self, forKey: .currency) customFields = try container.decodeIfPresent([SessionCustomFieldOptions].self, forKey: .customFields) ?? [] customText = try container.decodeIfPresent(SessionCustomTextOptions.self, forKey: .customText) customer = try container.decodeIfPresent(String.self, forKey: .customer) customerCreation = try container.decodeIfPresent(String.self, forKey: .customerCreation) customerEmail = try container.decodeIfPresent(String.self, forKey: .customerEmail) customerUpdate = try container.decodeIfPresent(SessionCustomerUpdateOptions.self, forKey: .customerUpdate) discounts = try container.decodeIfPresent([SessionDiscountOptions].self, forKey: .discounts) ?? [] expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) invoiceCreation = try container.decodeIfPresent(SessionInvoiceCreationOptions.self, forKey: .invoiceCreation) lineItems = try container.decodeIfPresent([SessionLineItemOptions].self, forKey: .lineItems) ?? [] locale = try container.decodeIfPresent(String.self, forKey: .locale) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] mode = try container.decodeIfPresent(String.self, forKey: .mode) optionalItems = try container.decodeIfPresent([SessionOptionalItemOptions].self, forKey: .optionalItems) ?? [] paymentIntentData = try container.decodeIfPresent(SessionPaymentIntentDataOptions.self, forKey: .paymentIntentData) paymentMethodCollection = try container.decodeIfPresent(String.self, forKey: .paymentMethodCollection) paymentMethodConfiguration = try container.decodeIfPresent(String.self, forKey: .paymentMethodConfiguration) paymentMethodData = try container.decodeIfPresent(SessionPaymentMethodDataOptions.self, forKey: .paymentMethodData) paymentMethodOptions = try container.decodeIfPresent(SessionPaymentMethodOptionsOptions.self, forKey: .paymentMethodOptions) paymentMethodTypes = try container.decodeIfPresent([String].self, forKey: .paymentMethodTypes) ?? [] permissions = try container.decodeIfPresent(SessionPermissionsOptions.self, forKey: .permissions) phoneNumberCollection = try container.decodeIfPresent(SessionPhoneNumberCollectionOptions.self, forKey: .phoneNumberCollection) redirectOnCompletion = try container.decodeIfPresent(String.self, forKey: .redirectOnCompletion) returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) savedPaymentMethodOptions = try container.decodeIfPresent(SessionSavedPaymentMethodOptionsOptions.self, forKey: .savedPaymentMethodOptions) setupIntentData = try container.decodeIfPresent(SessionSetupIntentDataOptions.self, forKey: .setupIntentData) shippingAddressCollection = try container.decodeIfPresent(SessionShippingAddressCollectionOptions.self, forKey: .shippingAddressCollection) shippingOptions = try container.decodeIfPresent([SessionShippingOptionOptions].self, forKey: .shippingOptions) ?? [] submitType = try container.decodeIfPresent(String.self, forKey: .submitType) subscriptionData = try container.decodeIfPresent(SessionSubscriptionDataOptions.self, forKey: .subscriptionData) successUrl = try container.decodeIfPresent(String.self, forKey: .successUrl) taxIdCollection = try container.decodeIfPresent(SessionTaxIdCollectionOptions.self, forKey: .taxIdCollection) uiMode = try container.decodeIfPresent(String.self, forKey: .uiMode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if adaptivePricing != nil { try container.encode(adaptivePricing, forKey: .adaptivePricing) } if afterExpiration != nil { try container.encode(afterExpiration, forKey: .afterExpiration) } if allowPromotionCodes != nil { try container.encode(allowPromotionCodes, forKey: .allowPromotionCodes) } if automaticTax != nil { try container.encode(automaticTax, forKey: .automaticTax) } if billingAddressCollection != nil { try container.encode(billingAddressCollection, forKey: .billingAddressCollection) } if cancelUrl != nil { try container.encode(cancelUrl, forKey: .cancelUrl) } if clientReferenceId != nil { try container.encode(clientReferenceId, forKey: .clientReferenceId) } if consentCollection != nil { try container.encode(consentCollection, forKey: .consentCollection) } if currency != nil { try container.encode(currency, forKey: .currency) } if customFields != nil { try container.encode(customFields, forKey: .customFields) } if customText != nil { try container.encode(customText, forKey: .customText) } if customer != nil { try container.encode(customer, forKey: .customer) } if customerCreation != nil { try container.encode(customerCreation, forKey: .customerCreation) } if customerEmail != nil { try container.encode(customerEmail, forKey: .customerEmail) } if customerUpdate != nil { try container.encode(customerUpdate, forKey: .customerUpdate) } if discounts != nil { try container.encode(discounts, forKey: .discounts) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if invoiceCreation != nil { try container.encode(invoiceCreation, forKey: .invoiceCreation) } if lineItems != nil { try container.encode(lineItems, forKey: .lineItems) } if locale != nil { try container.encode(locale, forKey: .locale) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if mode != nil { try container.encode(mode, forKey: .mode) } if optionalItems != nil { try container.encode(optionalItems, forKey: .optionalItems) } if paymentIntentData != nil { try container.encode(paymentIntentData, forKey: .paymentIntentData) } if paymentMethodCollection != nil { try container.encode(paymentMethodCollection, forKey: .paymentMethodCollection) } if paymentMethodConfiguration != nil { try container.encode(paymentMethodConfiguration, forKey: .paymentMethodConfiguration) } if paymentMethodData != nil { try container.encode(paymentMethodData, forKey: .paymentMethodData) } if paymentMethodOptions != nil { try container.encode(paymentMethodOptions, forKey: .paymentMethodOptions) } if paymentMethodTypes != nil { try container.encode(paymentMethodTypes, forKey: .paymentMethodTypes) } if permissions != nil { try container.encode(permissions, forKey: .permissions) } if phoneNumberCollection != nil { try container.encode(phoneNumberCollection, forKey: .phoneNumberCollection) } if redirectOnCompletion != nil { try container.encode(redirectOnCompletion, forKey: .redirectOnCompletion) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } if savedPaymentMethodOptions != nil { try container.encode(savedPaymentMethodOptions, forKey: .savedPaymentMethodOptions) } if setupIntentData != nil { try container.encode(setupIntentData, forKey: .setupIntentData) } if shippingAddressCollection != nil { try container.encode(shippingAddressCollection, forKey: .shippingAddressCollection) } if shippingOptions != nil { try container.encode(shippingOptions, forKey: .shippingOptions) } if submitType != nil { try container.encode(submitType, forKey: .submitType) } if subscriptionData != nil { try container.encode(subscriptionData, forKey: .subscriptionData) } if successUrl != nil { try container.encode(successUrl, forKey: .successUrl) } if taxIdCollection != nil { try container.encode(taxIdCollection, forKey: .taxIdCollection) } if uiMode != nil { try container.encode(uiMode, forKey: .uiMode) } } } public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata { public var amount:Int? public var applicationFeeAmount:Int? public var automaticPaymentMethods:PaymentIntentAutomaticPaymentMethodsOptions? public var captureMethod:String? public var confirm:Bool? public var confirmationMethod:String? public var confirmationToken:String? public var currency:String? public var customer:String? public var Description:String? public var errorOnRequiresAction:Bool? public var mandate:String? public var mandateData:PaymentIntentMandateDataOptions? public var metadata:[String:String]? public var offSession:Bool? public var onBehalfOf:String? public var paymentMethod:String? public var paymentMethodConfiguration:String? public var paymentMethodData:PaymentIntentPaymentMethodDataOptions? public var paymentMethodOptions:PaymentIntentPaymentMethodOptionsOptions? public var paymentMethodTypes:[String]? public var radarOptions:PaymentIntentRadarOptionsOptions? public var receiptEmail:String? public var returnUrl:String? public var setupFutureUsage:String? public var shipping:ChargeShippingOptions? public var statementDescriptor:String? public var statementDescriptorSuffix:String? public var transferData:PaymentIntentTransferDataOptions? public var transferGroup:String? public var useStripeSdk:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case applicationFeeAmount case automaticPaymentMethods case captureMethod case confirm case confirmationMethod case confirmationToken case currency case customer case Description case errorOnRequiresAction case mandate case mandateData case metadata case offSession case onBehalfOf case paymentMethod case paymentMethodConfiguration case paymentMethodData case paymentMethodOptions case paymentMethodTypes case radarOptions case receiptEmail case returnUrl case setupFutureUsage case shipping case statementDescriptor case statementDescriptorSuffix case transferData case transferGroup case useStripeSdk } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) applicationFeeAmount = try container.decodeIfPresent(Int.self, forKey: .applicationFeeAmount) automaticPaymentMethods = try container.decodeIfPresent(PaymentIntentAutomaticPaymentMethodsOptions.self, forKey: .automaticPaymentMethods) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) confirm = try container.decodeIfPresent(Bool.self, forKey: .confirm) confirmationMethod = try container.decodeIfPresent(String.self, forKey: .confirmationMethod) confirmationToken = try container.decodeIfPresent(String.self, forKey: .confirmationToken) currency = try container.decodeIfPresent(String.self, forKey: .currency) customer = try container.decodeIfPresent(String.self, forKey: .customer) Description = try container.decodeIfPresent(String.self, forKey: .Description) errorOnRequiresAction = try container.decodeIfPresent(Bool.self, forKey: .errorOnRequiresAction) mandate = try container.decodeIfPresent(String.self, forKey: .mandate) mandateData = try container.decodeIfPresent(PaymentIntentMandateDataOptions.self, forKey: .mandateData) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] offSession = try container.decodeIfPresent(Bool.self, forKey: .offSession) onBehalfOf = try container.decodeIfPresent(String.self, forKey: .onBehalfOf) paymentMethod = try container.decodeIfPresent(String.self, forKey: .paymentMethod) paymentMethodConfiguration = try container.decodeIfPresent(String.self, forKey: .paymentMethodConfiguration) paymentMethodData = try container.decodeIfPresent(PaymentIntentPaymentMethodDataOptions.self, forKey: .paymentMethodData) paymentMethodOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsOptions.self, forKey: .paymentMethodOptions) paymentMethodTypes = try container.decodeIfPresent([String].self, forKey: .paymentMethodTypes) ?? [] radarOptions = try container.decodeIfPresent(PaymentIntentRadarOptionsOptions.self, forKey: .radarOptions) receiptEmail = try container.decodeIfPresent(String.self, forKey: .receiptEmail) returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) shipping = try container.decodeIfPresent(ChargeShippingOptions.self, forKey: .shipping) statementDescriptor = try container.decodeIfPresent(String.self, forKey: .statementDescriptor) statementDescriptorSuffix = try container.decodeIfPresent(String.self, forKey: .statementDescriptorSuffix) transferData = try container.decodeIfPresent(PaymentIntentTransferDataOptions.self, forKey: .transferData) transferGroup = try container.decodeIfPresent(String.self, forKey: .transferGroup) useStripeSdk = try container.decodeIfPresent(Bool.self, forKey: .useStripeSdk) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if applicationFeeAmount != nil { try container.encode(applicationFeeAmount, forKey: .applicationFeeAmount) } if automaticPaymentMethods != nil { try container.encode(automaticPaymentMethods, forKey: .automaticPaymentMethods) } if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if confirm != nil { try container.encode(confirm, forKey: .confirm) } if confirmationMethod != nil { try container.encode(confirmationMethod, forKey: .confirmationMethod) } if confirmationToken != nil { try container.encode(confirmationToken, forKey: .confirmationToken) } if currency != nil { try container.encode(currency, forKey: .currency) } if customer != nil { try container.encode(customer, forKey: .customer) } if Description != nil { try container.encode(Description, forKey: .Description) } if errorOnRequiresAction != nil { try container.encode(errorOnRequiresAction, forKey: .errorOnRequiresAction) } if mandate != nil { try container.encode(mandate, forKey: .mandate) } if mandateData != nil { try container.encode(mandateData, forKey: .mandateData) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if offSession != nil { try container.encode(offSession, forKey: .offSession) } if onBehalfOf != nil { try container.encode(onBehalfOf, forKey: .onBehalfOf) } if paymentMethod != nil { try container.encode(paymentMethod, forKey: .paymentMethod) } if paymentMethodConfiguration != nil { try container.encode(paymentMethodConfiguration, forKey: .paymentMethodConfiguration) } if paymentMethodData != nil { try container.encode(paymentMethodData, forKey: .paymentMethodData) } if paymentMethodOptions != nil { try container.encode(paymentMethodOptions, forKey: .paymentMethodOptions) } if paymentMethodTypes != nil { try container.encode(paymentMethodTypes, forKey: .paymentMethodTypes) } if radarOptions != nil { try container.encode(radarOptions, forKey: .radarOptions) } if receiptEmail != nil { try container.encode(receiptEmail, forKey: .receiptEmail) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if shipping != nil { try container.encode(shipping, forKey: .shipping) } if statementDescriptor != nil { try container.encode(statementDescriptor, forKey: .statementDescriptor) } if statementDescriptorSuffix != nil { try container.encode(statementDescriptorSuffix, forKey: .statementDescriptorSuffix) } if transferData != nil { try container.encode(transferData, forKey: .transferData) } if transferGroup != nil { try container.encode(transferGroup, forKey: .transferGroup) } if useStripeSdk != nil { try container.encode(useStripeSdk, forKey: .useStripeSdk) } } } public class CustomerCreateOptions : BaseOptions, IHasMetadata { public var address:AddressOptions? public var balance:Int? public var cashBalance:CustomerCashBalanceOptions? public var Description:String? public var email:String? public var invoicePrefix:String? public var invoiceSettings:CustomerInvoiceSettingsOptions? public var metadata:[String:String]? public var name:String? public var nextInvoiceSequence:Int? public var paymentMethod:String? public var phone:String? public var plan:String? public var preferredLocales:[String]? public var shipping:ShippingOptions? public var source:AnyOf_2? public var tax:CustomerTaxOptions? public var taxExempt:String? public var taxIdData:[CustomerTaxIdDataOptions]? public var testClock:String? public var validate:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case address case balance case cashBalance case Description case email case invoicePrefix case invoiceSettings case metadata case name case nextInvoiceSequence case paymentMethod case phone case plan case preferredLocales case shipping case source case tax case taxExempt case taxIdData case testClock case validate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) address = try container.decodeIfPresent(AddressOptions.self, forKey: .address) balance = try container.decodeIfPresent(Int.self, forKey: .balance) cashBalance = try container.decodeIfPresent(CustomerCashBalanceOptions.self, forKey: .cashBalance) Description = try container.decodeIfPresent(String.self, forKey: .Description) email = try container.decodeIfPresent(String.self, forKey: .email) invoicePrefix = try container.decodeIfPresent(String.self, forKey: .invoicePrefix) invoiceSettings = try container.decodeIfPresent(CustomerInvoiceSettingsOptions.self, forKey: .invoiceSettings) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] name = try container.decodeIfPresent(String.self, forKey: .name) nextInvoiceSequence = try container.decodeIfPresent(Int.self, forKey: .nextInvoiceSequence) paymentMethod = try container.decodeIfPresent(String.self, forKey: .paymentMethod) phone = try container.decodeIfPresent(String.self, forKey: .phone) plan = try container.decodeIfPresent(String.self, forKey: .plan) preferredLocales = try container.decodeIfPresent([String].self, forKey: .preferredLocales) ?? [] shipping = try container.decodeIfPresent(ShippingOptions.self, forKey: .shipping) source = try container.decodeIfPresent(AnyOf_2.self, forKey: .source) tax = try container.decodeIfPresent(CustomerTaxOptions.self, forKey: .tax) taxExempt = try container.decodeIfPresent(String.self, forKey: .taxExempt) taxIdData = try container.decodeIfPresent([CustomerTaxIdDataOptions].self, forKey: .taxIdData) ?? [] testClock = try container.decodeIfPresent(String.self, forKey: .testClock) validate = try container.decodeIfPresent(Bool.self, forKey: .validate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if address != nil { try container.encode(address, forKey: .address) } if balance != nil { try container.encode(balance, forKey: .balance) } if cashBalance != nil { try container.encode(cashBalance, forKey: .cashBalance) } if Description != nil { try container.encode(Description, forKey: .Description) } if email != nil { try container.encode(email, forKey: .email) } if invoicePrefix != nil { try container.encode(invoicePrefix, forKey: .invoicePrefix) } if invoiceSettings != nil { try container.encode(invoiceSettings, forKey: .invoiceSettings) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if name != nil { try container.encode(name, forKey: .name) } if nextInvoiceSequence != nil { try container.encode(nextInvoiceSequence, forKey: .nextInvoiceSequence) } if paymentMethod != nil { try container.encode(paymentMethod, forKey: .paymentMethod) } if phone != nil { try container.encode(phone, forKey: .phone) } if plan != nil { try container.encode(plan, forKey: .plan) } if preferredLocales != nil { try container.encode(preferredLocales, forKey: .preferredLocales) } if shipping != nil { try container.encode(shipping, forKey: .shipping) } if source != nil { try container.encode(source, forKey: .source) } if tax != nil { try container.encode(tax, forKey: .tax) } if taxExempt != nil { try container.encode(taxExempt, forKey: .taxExempt) } if taxIdData != nil { try container.encode(taxIdData, forKey: .taxIdData) } if testClock != nil { try container.encode(testClock, forKey: .testClock) } if validate != nil { try container.encode(validate, forKey: .validate) } } } public class Session : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var adaptivePricing:SessionAdaptivePricing? public var afterExpiration:SessionAfterExpiration? public var allowPromotionCodes:Bool? public var amountSubtotal:Int? public var amountTotal:Int? public var automaticTax:SessionAutomaticTax? public var billingAddressCollection:String? public var cancelUrl:String? public var clientReferenceId:String? public var clientSecret:String? public var collectedInformation:SessionCollectedInformation? public var consent:SessionConsent? public var consentCollection:SessionConsentCollection? public var created:Date? public var currency:String? public var currencyConversion:SessionCurrencyConversion? public var customFields:[SessionCustomField]? public var customText:SessionCustomText? public var customerCreation:String? public var customerDetails:SessionCustomerDetails? public var customerEmail:String? public var discounts:[SessionDiscount]? public var expiresAt:Date? public var invoiceCreation:SessionInvoiceCreation? public var lineItems:StripeList? public var livemode:Bool? public var locale:String? public var metadata:[String:String]? public var mode:String? public var optionalItems:[SessionOptionalItem]? public var paymentMethodCollection:String? public var paymentMethodConfigurationDetails:SessionPaymentMethodConfigurationDetails? public var paymentMethodOptions:SessionPaymentMethodOptions? public var paymentMethodTypes:[String]? public var paymentStatus:String? public var permissions:SessionPermissions? public var phoneNumberCollection:SessionPhoneNumberCollection? public var presentmentDetails:SessionPresentmentDetails? public var recoveredFrom:String? public var redirectOnCompletion:String? public var returnUrl:String? public var savedPaymentMethodOptions:SessionSavedPaymentMethodOptions? public var shippingAddressCollection:SessionShippingAddressCollection? public var shippingCost:SessionShippingCost? public var shippingOptions:[SessionShippingOption]? public var status:String? public var submitType:String? public var successUrl:String? public var taxIdCollection:SessionTaxIdCollection? public var totalDetails:SessionTotalDetails? public var uiMode:String? public var url:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case adaptivePricing case afterExpiration case allowPromotionCodes case amountSubtotal case amountTotal case automaticTax case billingAddressCollection case cancelUrl case clientReferenceId case clientSecret case collectedInformation case consent case consentCollection case created case currency case currencyConversion case customFields case customText case customerCreation case customerDetails case customerEmail case discounts case expiresAt case invoiceCreation case lineItems case livemode case locale case metadata case mode case optionalItems case paymentMethodCollection case paymentMethodConfigurationDetails case paymentMethodOptions case paymentMethodTypes case paymentStatus case permissions case phoneNumberCollection case presentmentDetails case recoveredFrom case redirectOnCompletion case returnUrl case savedPaymentMethodOptions case shippingAddressCollection case shippingCost case shippingOptions case status case submitType case successUrl case taxIdCollection case totalDetails case uiMode case url } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) adaptivePricing = try container.decodeIfPresent(SessionAdaptivePricing.self, forKey: .adaptivePricing) afterExpiration = try container.decodeIfPresent(SessionAfterExpiration.self, forKey: .afterExpiration) allowPromotionCodes = try container.decodeIfPresent(Bool.self, forKey: .allowPromotionCodes) amountSubtotal = try container.decodeIfPresent(Int.self, forKey: .amountSubtotal) amountTotal = try container.decodeIfPresent(Int.self, forKey: .amountTotal) automaticTax = try container.decodeIfPresent(SessionAutomaticTax.self, forKey: .automaticTax) billingAddressCollection = try container.decodeIfPresent(String.self, forKey: .billingAddressCollection) cancelUrl = try container.decodeIfPresent(String.self, forKey: .cancelUrl) clientReferenceId = try container.decodeIfPresent(String.self, forKey: .clientReferenceId) clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) collectedInformation = try container.decodeIfPresent(SessionCollectedInformation.self, forKey: .collectedInformation) consent = try container.decodeIfPresent(SessionConsent.self, forKey: .consent) consentCollection = try container.decodeIfPresent(SessionConsentCollection.self, forKey: .consentCollection) created = try container.decodeIfPresent(Date.self, forKey: .created) currency = try container.decodeIfPresent(String.self, forKey: .currency) currencyConversion = try container.decodeIfPresent(SessionCurrencyConversion.self, forKey: .currencyConversion) customFields = try container.decodeIfPresent([SessionCustomField].self, forKey: .customFields) ?? [] customText = try container.decodeIfPresent(SessionCustomText.self, forKey: .customText) customerCreation = try container.decodeIfPresent(String.self, forKey: .customerCreation) customerDetails = try container.decodeIfPresent(SessionCustomerDetails.self, forKey: .customerDetails) customerEmail = try container.decodeIfPresent(String.self, forKey: .customerEmail) discounts = try container.decodeIfPresent([SessionDiscount].self, forKey: .discounts) ?? [] expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) invoiceCreation = try container.decodeIfPresent(SessionInvoiceCreation.self, forKey: .invoiceCreation) lineItems = try container.decodeIfPresent(StripeList.self, forKey: .lineItems) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) locale = try container.decodeIfPresent(String.self, forKey: .locale) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] mode = try container.decodeIfPresent(String.self, forKey: .mode) optionalItems = try container.decodeIfPresent([SessionOptionalItem].self, forKey: .optionalItems) ?? [] paymentMethodCollection = try container.decodeIfPresent(String.self, forKey: .paymentMethodCollection) paymentMethodConfigurationDetails = try container.decodeIfPresent(SessionPaymentMethodConfigurationDetails.self, forKey: .paymentMethodConfigurationDetails) paymentMethodOptions = try container.decodeIfPresent(SessionPaymentMethodOptions.self, forKey: .paymentMethodOptions) paymentMethodTypes = try container.decodeIfPresent([String].self, forKey: .paymentMethodTypes) ?? [] paymentStatus = try container.decodeIfPresent(String.self, forKey: .paymentStatus) permissions = try container.decodeIfPresent(SessionPermissions.self, forKey: .permissions) phoneNumberCollection = try container.decodeIfPresent(SessionPhoneNumberCollection.self, forKey: .phoneNumberCollection) presentmentDetails = try container.decodeIfPresent(SessionPresentmentDetails.self, forKey: .presentmentDetails) recoveredFrom = try container.decodeIfPresent(String.self, forKey: .recoveredFrom) redirectOnCompletion = try container.decodeIfPresent(String.self, forKey: .redirectOnCompletion) returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) savedPaymentMethodOptions = try container.decodeIfPresent(SessionSavedPaymentMethodOptions.self, forKey: .savedPaymentMethodOptions) shippingAddressCollection = try container.decodeIfPresent(SessionShippingAddressCollection.self, forKey: .shippingAddressCollection) shippingCost = try container.decodeIfPresent(SessionShippingCost.self, forKey: .shippingCost) shippingOptions = try container.decodeIfPresent([SessionShippingOption].self, forKey: .shippingOptions) ?? [] status = try container.decodeIfPresent(String.self, forKey: .status) submitType = try container.decodeIfPresent(String.self, forKey: .submitType) successUrl = try container.decodeIfPresent(String.self, forKey: .successUrl) taxIdCollection = try container.decodeIfPresent(SessionTaxIdCollection.self, forKey: .taxIdCollection) totalDetails = try container.decodeIfPresent(SessionTotalDetails.self, forKey: .totalDetails) uiMode = try container.decodeIfPresent(String.self, forKey: .uiMode) url = try container.decodeIfPresent(String.self, forKey: .url) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if adaptivePricing != nil { try container.encode(adaptivePricing, forKey: .adaptivePricing) } if afterExpiration != nil { try container.encode(afterExpiration, forKey: .afterExpiration) } if allowPromotionCodes != nil { try container.encode(allowPromotionCodes, forKey: .allowPromotionCodes) } if amountSubtotal != nil { try container.encode(amountSubtotal, forKey: .amountSubtotal) } if amountTotal != nil { try container.encode(amountTotal, forKey: .amountTotal) } if automaticTax != nil { try container.encode(automaticTax, forKey: .automaticTax) } if billingAddressCollection != nil { try container.encode(billingAddressCollection, forKey: .billingAddressCollection) } if cancelUrl != nil { try container.encode(cancelUrl, forKey: .cancelUrl) } if clientReferenceId != nil { try container.encode(clientReferenceId, forKey: .clientReferenceId) } if clientSecret != nil { try container.encode(clientSecret, forKey: .clientSecret) } if collectedInformation != nil { try container.encode(collectedInformation, forKey: .collectedInformation) } if consent != nil { try container.encode(consent, forKey: .consent) } if consentCollection != nil { try container.encode(consentCollection, forKey: .consentCollection) } if created != nil { try container.encode(created, forKey: .created) } if currency != nil { try container.encode(currency, forKey: .currency) } if currencyConversion != nil { try container.encode(currencyConversion, forKey: .currencyConversion) } if customFields != nil { try container.encode(customFields, forKey: .customFields) } if customText != nil { try container.encode(customText, forKey: .customText) } if customerCreation != nil { try container.encode(customerCreation, forKey: .customerCreation) } if customerDetails != nil { try container.encode(customerDetails, forKey: .customerDetails) } if customerEmail != nil { try container.encode(customerEmail, forKey: .customerEmail) } if discounts != nil { try container.encode(discounts, forKey: .discounts) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if invoiceCreation != nil { try container.encode(invoiceCreation, forKey: .invoiceCreation) } if lineItems != nil { try container.encode(lineItems, forKey: .lineItems) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if locale != nil { try container.encode(locale, forKey: .locale) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if mode != nil { try container.encode(mode, forKey: .mode) } if optionalItems != nil { try container.encode(optionalItems, forKey: .optionalItems) } if paymentMethodCollection != nil { try container.encode(paymentMethodCollection, forKey: .paymentMethodCollection) } if paymentMethodConfigurationDetails != nil { try container.encode(paymentMethodConfigurationDetails, forKey: .paymentMethodConfigurationDetails) } if paymentMethodOptions != nil { try container.encode(paymentMethodOptions, forKey: .paymentMethodOptions) } if paymentMethodTypes != nil { try container.encode(paymentMethodTypes, forKey: .paymentMethodTypes) } if paymentStatus != nil { try container.encode(paymentStatus, forKey: .paymentStatus) } if permissions != nil { try container.encode(permissions, forKey: .permissions) } if phoneNumberCollection != nil { try container.encode(phoneNumberCollection, forKey: .phoneNumberCollection) } if presentmentDetails != nil { try container.encode(presentmentDetails, forKey: .presentmentDetails) } if recoveredFrom != nil { try container.encode(recoveredFrom, forKey: .recoveredFrom) } if redirectOnCompletion != nil { try container.encode(redirectOnCompletion, forKey: .redirectOnCompletion) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } if savedPaymentMethodOptions != nil { try container.encode(savedPaymentMethodOptions, forKey: .savedPaymentMethodOptions) } if shippingAddressCollection != nil { try container.encode(shippingAddressCollection, forKey: .shippingAddressCollection) } if shippingCost != nil { try container.encode(shippingCost, forKey: .shippingCost) } if shippingOptions != nil { try container.encode(shippingOptions, forKey: .shippingOptions) } if status != nil { try container.encode(status, forKey: .status) } if submitType != nil { try container.encode(submitType, forKey: .submitType) } if successUrl != nil { try container.encode(successUrl, forKey: .successUrl) } if taxIdCollection != nil { try container.encode(taxIdCollection, forKey: .taxIdCollection) } if totalDetails != nil { try container.encode(totalDetails, forKey: .totalDetails) } if uiMode != nil { try container.encode(uiMode, forKey: .uiMode) } if url != nil { try container.encode(url, forKey: .url) } } } public class LineItem : StripeEntity_1, IHasId, IHasObject { public var id:String? public var object:String? public var amountDiscount:Int? public var amountSubtotal:Int? public var amountTax:Int? public var amountTotal:Int? public var currency:String? public var Description:String? public var discounts:[LineItemDiscount]? public var price:Price? public var quantity:Int? public var taxes:[LineItemTax]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case amountDiscount case amountSubtotal case amountTax case amountTotal case currency case Description case discounts case price case quantity case taxes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) amountDiscount = try container.decodeIfPresent(Int.self, forKey: .amountDiscount) amountSubtotal = try container.decodeIfPresent(Int.self, forKey: .amountSubtotal) amountTax = try container.decodeIfPresent(Int.self, forKey: .amountTax) amountTotal = try container.decodeIfPresent(Int.self, forKey: .amountTotal) currency = try container.decodeIfPresent(String.self, forKey: .currency) Description = try container.decodeIfPresent(String.self, forKey: .Description) discounts = try container.decodeIfPresent([LineItemDiscount].self, forKey: .discounts) ?? [] price = try container.decodeIfPresent(Price.self, forKey: .price) quantity = try container.decodeIfPresent(Int.self, forKey: .quantity) taxes = try container.decodeIfPresent([LineItemTax].self, forKey: .taxes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if amountDiscount != nil { try container.encode(amountDiscount, forKey: .amountDiscount) } if amountSubtotal != nil { try container.encode(amountSubtotal, forKey: .amountSubtotal) } if amountTax != nil { try container.encode(amountTax, forKey: .amountTax) } if amountTotal != nil { try container.encode(amountTotal, forKey: .amountTotal) } if currency != nil { try container.encode(currency, forKey: .currency) } if Description != nil { try container.encode(Description, forKey: .Description) } if discounts != nil { try container.encode(discounts, forKey: .discounts) } if price != nil { try container.encode(price, forKey: .price) } if quantity != nil { try container.encode(quantity, forKey: .quantity) } if taxes != nil { try container.encode(taxes, forKey: .taxes) } } } public class PaymentIntent : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var amount:Int? public var amountCapturable:Int? public var amountDetails:PaymentIntentAmountDetails? public var amountReceived:Int? public var applicationFeeAmount:Int? public var automaticPaymentMethods:PaymentIntentAutomaticPaymentMethods? public var canceledAt:Date? public var cancellationReason:String? public var captureMethod:String? public var clientSecret:String? public var confirmationMethod:String? public var created:Date? public var currency:String? public var Description:String? public var lastPaymentError:StripeError? public var livemode:Bool? public var metadata:[String:String]? public var nextAction:PaymentIntentNextAction? public var paymentMethodConfigurationDetails:PaymentIntentPaymentMethodConfigurationDetails? public var paymentMethodOptions:PaymentIntentPaymentMethodOptions? public var paymentMethodTypes:[String]? public var presentmentDetails:PaymentIntentPresentmentDetails? public var processing:PaymentIntentProcessing? public var receiptEmail:String? public var setupFutureUsage:String? public var shipping:Shipping? public var statementDescriptor:String? public var statementDescriptorSuffix:String? public var status:String? public var transferData:PaymentIntentTransferData? public var transferGroup:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case amount case amountCapturable case amountDetails case amountReceived case applicationFeeAmount case automaticPaymentMethods case canceledAt case cancellationReason case captureMethod case clientSecret case confirmationMethod case created case currency case Description case lastPaymentError case livemode case metadata case nextAction case paymentMethodConfigurationDetails case paymentMethodOptions case paymentMethodTypes case presentmentDetails case processing case receiptEmail case setupFutureUsage case shipping case statementDescriptor case statementDescriptorSuffix case status case transferData case transferGroup } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) amount = try container.decodeIfPresent(Int.self, forKey: .amount) amountCapturable = try container.decodeIfPresent(Int.self, forKey: .amountCapturable) amountDetails = try container.decodeIfPresent(PaymentIntentAmountDetails.self, forKey: .amountDetails) amountReceived = try container.decodeIfPresent(Int.self, forKey: .amountReceived) applicationFeeAmount = try container.decodeIfPresent(Int.self, forKey: .applicationFeeAmount) automaticPaymentMethods = try container.decodeIfPresent(PaymentIntentAutomaticPaymentMethods.self, forKey: .automaticPaymentMethods) canceledAt = try container.decodeIfPresent(Date.self, forKey: .canceledAt) cancellationReason = try container.decodeIfPresent(String.self, forKey: .cancellationReason) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) confirmationMethod = try container.decodeIfPresent(String.self, forKey: .confirmationMethod) created = try container.decodeIfPresent(Date.self, forKey: .created) currency = try container.decodeIfPresent(String.self, forKey: .currency) Description = try container.decodeIfPresent(String.self, forKey: .Description) lastPaymentError = try container.decodeIfPresent(StripeError.self, forKey: .lastPaymentError) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] nextAction = try container.decodeIfPresent(PaymentIntentNextAction.self, forKey: .nextAction) paymentMethodConfigurationDetails = try container.decodeIfPresent(PaymentIntentPaymentMethodConfigurationDetails.self, forKey: .paymentMethodConfigurationDetails) paymentMethodOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptions.self, forKey: .paymentMethodOptions) paymentMethodTypes = try container.decodeIfPresent([String].self, forKey: .paymentMethodTypes) ?? [] presentmentDetails = try container.decodeIfPresent(PaymentIntentPresentmentDetails.self, forKey: .presentmentDetails) processing = try container.decodeIfPresent(PaymentIntentProcessing.self, forKey: .processing) receiptEmail = try container.decodeIfPresent(String.self, forKey: .receiptEmail) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) shipping = try container.decodeIfPresent(Shipping.self, forKey: .shipping) statementDescriptor = try container.decodeIfPresent(String.self, forKey: .statementDescriptor) statementDescriptorSuffix = try container.decodeIfPresent(String.self, forKey: .statementDescriptorSuffix) status = try container.decodeIfPresent(String.self, forKey: .status) transferData = try container.decodeIfPresent(PaymentIntentTransferData.self, forKey: .transferData) transferGroup = try container.decodeIfPresent(String.self, forKey: .transferGroup) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if amount != nil { try container.encode(amount, forKey: .amount) } if amountCapturable != nil { try container.encode(amountCapturable, forKey: .amountCapturable) } if amountDetails != nil { try container.encode(amountDetails, forKey: .amountDetails) } if amountReceived != nil { try container.encode(amountReceived, forKey: .amountReceived) } if applicationFeeAmount != nil { try container.encode(applicationFeeAmount, forKey: .applicationFeeAmount) } if automaticPaymentMethods != nil { try container.encode(automaticPaymentMethods, forKey: .automaticPaymentMethods) } if canceledAt != nil { try container.encode(canceledAt, forKey: .canceledAt) } if cancellationReason != nil { try container.encode(cancellationReason, forKey: .cancellationReason) } if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if clientSecret != nil { try container.encode(clientSecret, forKey: .clientSecret) } if confirmationMethod != nil { try container.encode(confirmationMethod, forKey: .confirmationMethod) } if created != nil { try container.encode(created, forKey: .created) } if currency != nil { try container.encode(currency, forKey: .currency) } if Description != nil { try container.encode(Description, forKey: .Description) } if lastPaymentError != nil { try container.encode(lastPaymentError, forKey: .lastPaymentError) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if nextAction != nil { try container.encode(nextAction, forKey: .nextAction) } if paymentMethodConfigurationDetails != nil { try container.encode(paymentMethodConfigurationDetails, forKey: .paymentMethodConfigurationDetails) } if paymentMethodOptions != nil { try container.encode(paymentMethodOptions, forKey: .paymentMethodOptions) } if paymentMethodTypes != nil { try container.encode(paymentMethodTypes, forKey: .paymentMethodTypes) } if presentmentDetails != nil { try container.encode(presentmentDetails, forKey: .presentmentDetails) } if processing != nil { try container.encode(processing, forKey: .processing) } if receiptEmail != nil { try container.encode(receiptEmail, forKey: .receiptEmail) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if shipping != nil { try container.encode(shipping, forKey: .shipping) } if statementDescriptor != nil { try container.encode(statementDescriptor, forKey: .statementDescriptor) } if statementDescriptorSuffix != nil { try container.encode(statementDescriptorSuffix, forKey: .statementDescriptorSuffix) } if status != nil { try container.encode(status, forKey: .status) } if transferData != nil { try container.encode(transferData, forKey: .transferData) } if transferGroup != nil { try container.encode(transferGroup, forKey: .transferGroup) } } } public class CheckoutInvoice : Codable { public var number:String? public var status:String? required public init(){} } public class CartHandling : Codable { public var withouttax:String? public var taxrate:String? required public init(){} } public class CartTotal : Codable { public var rounding:Double? public var withouttax:Int? public var tax:Int? public var withtax:Int? required public init(){} } public class Shipping : Codable { public var firstname:String? public var lastname:String? public var company:String? public var street:String? public var street2:String? public var zip:String? public var city:String? public var country:String? public var phone:String? public var withouttax:String? public var taxrate:String? required public init(){} } public class CustomerBilling : Codable { public var firstname:String? public var lastname:String? public var company:String? public var street:String? public var street2:String? public var zip:String? public var city:String? public var country:String? public var phone:String? public var email:String? required public init(){} } public enum ItemType : String, Codable { case Physical case Service case Fee case Discount } public class SessionAdaptivePricingOptions : INestedOptions, Codable { public var enabled:Bool? required public init(){} } public class SessionAfterExpirationOptions : INestedOptions, Codable { public var recovery:SessionAfterExpirationRecoveryOptions? required public init(){} } public class SessionAutomaticTaxOptions : INestedOptions, Codable { public var enabled:Bool? public var liability:SessionAutomaticTaxLiabilityOptions? required public init(){} } public class SessionConsentCollectionOptions : INestedOptions, Codable { public var paymentMethodReuseAgreement:SessionConsentCollectionPaymentMethodReuseAgreementOptions? public var promotions:String? public var termsOfService:String? required public init(){} } public class SessionCustomFieldOptions : INestedOptions, Codable { public var dropdown:SessionCustomFieldDropdownOptions? public var key:String? public var label:SessionCustomFieldLabelOptions? public var numeric:SessionCustomFieldNumericOptions? public var optional:Bool? public var text:SessionCustomFieldTextOptions? public var type:String? required public init(){} } public class SessionCustomTextOptions : INestedOptions, Codable { public var afterSubmit:SessionCustomTextAfterSubmitOptions? public var shippingAddress:SessionCustomTextShippingAddressOptions? public var submit:SessionCustomTextSubmitOptions? public var termsOfServiceAcceptance:SessionCustomTextTermsOfServiceAcceptanceOptions? required public init(){} } public class SessionCustomerUpdateOptions : INestedOptions, Codable { public var address:String? public var name:String? public var shipping:String? required public init(){} } public class SessionDiscountOptions : INestedOptions, Codable { public var coupon:String? public var promotionCode:String? required public init(){} } public class SessionInvoiceCreationOptions : INestedOptions, Codable { public var enabled:Bool? public var invoiceData:SessionInvoiceCreationInvoiceDataOptions? required public init(){} } public class SessionLineItemOptions : INestedOptions, Codable { public var adjustableQuantity:SessionLineItemAdjustableQuantityOptions? public var dynamicTaxRates:[String]? public var price:String? public var priceData:SessionLineItemPriceDataOptions? public var quantity:Int? public var taxRates:[String]? required public init(){} } public class SessionOptionalItemOptions : INestedOptions, Codable { public var adjustableQuantity:SessionOptionalItemAdjustableQuantityOptions? public var price:String? public var quantity:Int? required public init(){} } public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata, Codable { public var applicationFeeAmount:Int? public var captureMethod:String? public var Description:String? public var metadata:[String:String]? public var onBehalfOf:String? public var receiptEmail:String? public var setupFutureUsage:String? public var shipping:ChargeShippingOptions? public var statementDescriptor:String? public var statementDescriptorSuffix:String? public var transferData:SessionPaymentIntentDataTransferDataOptions? public var transferGroup:String? required public init(){} } public class SessionPaymentMethodDataOptions : INestedOptions, Codable { public var allowRedisplay:String? required public init(){} } public class SessionPaymentMethodOptionsOptions : INestedOptions, Codable { public var acssDebit:SessionPaymentMethodOptionsAcssDebitOptions? public var affirm:SessionPaymentMethodOptionsAffirmOptions? public var afterpayClearpay:SessionPaymentMethodOptionsAfterpayClearpayOptions? public var alipay:SessionPaymentMethodOptionsAlipayOptions? public var amazonPay:SessionPaymentMethodOptionsAmazonPayOptions? public var auBecsDebit:SessionPaymentMethodOptionsAuBecsDebitOptions? public var bacsDebit:SessionPaymentMethodOptionsBacsDebitOptions? public var bancontact:SessionPaymentMethodOptionsBancontactOptions? public var boleto:SessionPaymentMethodOptionsBoletoOptions? public var card:SessionPaymentMethodOptionsCardOptions? public var cashapp:SessionPaymentMethodOptionsCashappOptions? public var customerBalance:SessionPaymentMethodOptionsCustomerBalanceOptions? public var eps:SessionPaymentMethodOptionsEpsOptions? public var fpx:SessionPaymentMethodOptionsFpxOptions? public var giropay:SessionPaymentMethodOptionsGiropayOptions? public var grabpay:SessionPaymentMethodOptionsGrabpayOptions? public var ideal:SessionPaymentMethodOptionsIdealOptions? public var kakaoPay:SessionPaymentMethodOptionsKakaoPayOptions? public var klarna:SessionPaymentMethodOptionsKlarnaOptions? public var konbini:SessionPaymentMethodOptionsKonbiniOptions? public var krCard:SessionPaymentMethodOptionsKrCardOptions? public var link:SessionPaymentMethodOptionsLinkOptions? public var mobilepay:SessionPaymentMethodOptionsMobilepayOptions? public var multibanco:SessionPaymentMethodOptionsMultibancoOptions? public var naverPay:SessionPaymentMethodOptionsNaverPayOptions? public var oxxo:SessionPaymentMethodOptionsOxxoOptions? public var p24:SessionPaymentMethodOptionsP24Options? public var payByBank:SessionPaymentMethodOptionsPayByBankOptions? public var payco:SessionPaymentMethodOptionsPaycoOptions? public var paynow:SessionPaymentMethodOptionsPaynowOptions? public var paypal:SessionPaymentMethodOptionsPaypalOptions? public var pix:SessionPaymentMethodOptionsPixOptions? public var revolutPay:SessionPaymentMethodOptionsRevolutPayOptions? public var samsungPay:SessionPaymentMethodOptionsSamsungPayOptions? public var sepaDebit:SessionPaymentMethodOptionsSepaDebitOptions? public var sofort:SessionPaymentMethodOptionsSofortOptions? public var swish:SessionPaymentMethodOptionsSwishOptions? public var usBankAccount:SessionPaymentMethodOptionsUsBankAccountOptions? public var wechatPay:SessionPaymentMethodOptionsWechatPayOptions? required public init(){} } public class SessionPermissionsOptions : INestedOptions, Codable { public var updateShippingDetails:String? required public init(){} } public class SessionPhoneNumberCollectionOptions : INestedOptions, Codable { public var enabled:Bool? required public init(){} } public class SessionSavedPaymentMethodOptionsOptions : INestedOptions, Codable { public var allowRedisplayFilters:[String]? public var paymentMethodSave:String? required public init(){} } public class SessionSetupIntentDataOptions : INestedOptions, IHasMetadata, Codable { public var Description:String? public var metadata:[String:String]? public var onBehalfOf:String? required public init(){} } public class SessionShippingAddressCollectionOptions : INestedOptions, Codable { public var allowedCountries:[String]? required public init(){} } public class SessionShippingOptionOptions : INestedOptions, Codable { public var shippingRate:String? public var shippingRateData:SessionShippingOptionShippingRateDataOptions? required public init(){} } public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata, Codable { public var applicationFeePercent:Double? public var billingCycleAnchor:Date? public var defaultTaxRates:[String]? public var Description:String? public var invoiceSettings:SessionSubscriptionDataInvoiceSettingsOptions? public var metadata:[String:String]? public var onBehalfOf:String? public var prorationBehavior:String? public var transferData:SessionSubscriptionDataTransferDataOptions? public var trialEnd:Date? public var trialPeriodDays:Int? public var trialSettings:SessionSubscriptionDataTrialSettingsOptions? required public init(){} } public class SessionTaxIdCollectionOptions : INestedOptions, Codable { public var enabled:Bool? public var required:String? required public init(){} } public class BaseOptions : INestedOptions, Codable { public var extraParams:[String:String]? required public init(){} } public protocol INestedOptions { } public protocol IHasMetadata { var metadata:[String:String]? { get set } } public class PaymentIntentAutomaticPaymentMethodsOptions : INestedOptions, Codable { public var allowRedirects:String? public var enabled:Bool? required public init(){} } public class PaymentIntentMandateDataOptions : INestedOptions, Codable { public var customerAcceptance:PaymentIntentMandateDataCustomerAcceptanceOptions? required public init(){} } public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata, Codable { public var acssDebit:PaymentIntentPaymentMethodDataAcssDebitOptions? public var affirm:PaymentIntentPaymentMethodDataAffirmOptions? public var afterpayClearpay:PaymentIntentPaymentMethodDataAfterpayClearpayOptions? public var alipay:PaymentIntentPaymentMethodDataAlipayOptions? public var allowRedisplay:String? public var alma:PaymentIntentPaymentMethodDataAlmaOptions? public var amazonPay:PaymentIntentPaymentMethodDataAmazonPayOptions? public var auBecsDebit:PaymentIntentPaymentMethodDataAuBecsDebitOptions? public var bacsDebit:PaymentIntentPaymentMethodDataBacsDebitOptions? public var bancontact:PaymentIntentPaymentMethodDataBancontactOptions? public var billie:PaymentIntentPaymentMethodDataBillieOptions? public var billingDetails:PaymentIntentPaymentMethodDataBillingDetailsOptions? public var blik:PaymentIntentPaymentMethodDataBlikOptions? public var boleto:PaymentIntentPaymentMethodDataBoletoOptions? public var cashapp:PaymentIntentPaymentMethodDataCashappOptions? public var customerBalance:PaymentIntentPaymentMethodDataCustomerBalanceOptions? public var eps:PaymentIntentPaymentMethodDataEpsOptions? public var fpx:PaymentIntentPaymentMethodDataFpxOptions? public var giropay:PaymentIntentPaymentMethodDataGiropayOptions? public var grabpay:PaymentIntentPaymentMethodDataGrabpayOptions? public var ideal:PaymentIntentPaymentMethodDataIdealOptions? public var interacPresent:PaymentIntentPaymentMethodDataInteracPresentOptions? public var kakaoPay:PaymentIntentPaymentMethodDataKakaoPayOptions? public var klarna:PaymentIntentPaymentMethodDataKlarnaOptions? public var konbini:PaymentIntentPaymentMethodDataKonbiniOptions? public var krCard:PaymentIntentPaymentMethodDataKrCardOptions? public var link:PaymentIntentPaymentMethodDataLinkOptions? public var metadata:[String:String]? public var mobilepay:PaymentIntentPaymentMethodDataMobilepayOptions? public var multibanco:PaymentIntentPaymentMethodDataMultibancoOptions? public var naverPay:PaymentIntentPaymentMethodDataNaverPayOptions? public var nzBankAccount:PaymentIntentPaymentMethodDataNzBankAccountOptions? public var oxxo:PaymentIntentPaymentMethodDataOxxoOptions? public var p24:PaymentIntentPaymentMethodDataP24Options? public var payByBank:PaymentIntentPaymentMethodDataPayByBankOptions? public var payco:PaymentIntentPaymentMethodDataPaycoOptions? public var paynow:PaymentIntentPaymentMethodDataPaynowOptions? public var paypal:PaymentIntentPaymentMethodDataPaypalOptions? public var pix:PaymentIntentPaymentMethodDataPixOptions? public var promptpay:PaymentIntentPaymentMethodDataPromptpayOptions? public var radarOptions:PaymentIntentPaymentMethodDataRadarOptionsOptions? public var revolutPay:PaymentIntentPaymentMethodDataRevolutPayOptions? public var samsungPay:PaymentIntentPaymentMethodDataSamsungPayOptions? public var satispay:PaymentIntentPaymentMethodDataSatispayOptions? public var sepaDebit:PaymentIntentPaymentMethodDataSepaDebitOptions? public var sofort:PaymentIntentPaymentMethodDataSofortOptions? public var swish:PaymentIntentPaymentMethodDataSwishOptions? public var twint:PaymentIntentPaymentMethodDataTwintOptions? public var type:String? public var usBankAccount:PaymentIntentPaymentMethodDataUsBankAccountOptions? public var wechatPay:PaymentIntentPaymentMethodDataWechatPayOptions? public var zip:PaymentIntentPaymentMethodDataZipOptions? required public init(){} } public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions, Codable { public var acssDebit:PaymentIntentPaymentMethodOptionsAcssDebitOptions? public var affirm:PaymentIntentPaymentMethodOptionsAffirmOptions? public var afterpayClearpay:PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions? public var alipay:PaymentIntentPaymentMethodOptionsAlipayOptions? public var alma:PaymentIntentPaymentMethodOptionsAlmaOptions? public var amazonPay:PaymentIntentPaymentMethodOptionsAmazonPayOptions? public var auBecsDebit:PaymentIntentPaymentMethodOptionsAuBecsDebitOptions? public var bacsDebit:PaymentIntentPaymentMethodOptionsBacsDebitOptions? public var bancontact:PaymentIntentPaymentMethodOptionsBancontactOptions? public var blik:PaymentIntentPaymentMethodOptionsBlikOptions? public var boleto:PaymentIntentPaymentMethodOptionsBoletoOptions? public var card:PaymentIntentPaymentMethodOptionsCardOptions? public var cardPresent:PaymentIntentPaymentMethodOptionsCardPresentOptions? public var cashapp:PaymentIntentPaymentMethodOptionsCashappOptions? public var customerBalance:PaymentIntentPaymentMethodOptionsCustomerBalanceOptions? public var eps:PaymentIntentPaymentMethodOptionsEpsOptions? public var fpx:PaymentIntentPaymentMethodOptionsFpxOptions? public var giropay:PaymentIntentPaymentMethodOptionsGiropayOptions? public var grabpay:PaymentIntentPaymentMethodOptionsGrabpayOptions? public var ideal:PaymentIntentPaymentMethodOptionsIdealOptions? public var interacPresent:PaymentIntentPaymentMethodOptionsInteracPresentOptions? public var kakaoPay:PaymentIntentPaymentMethodOptionsKakaoPayOptions? public var klarna:PaymentIntentPaymentMethodOptionsKlarnaOptions? public var konbini:PaymentIntentPaymentMethodOptionsKonbiniOptions? public var krCard:PaymentIntentPaymentMethodOptionsKrCardOptions? public var link:PaymentIntentPaymentMethodOptionsLinkOptions? public var mobilepay:PaymentIntentPaymentMethodOptionsMobilepayOptions? public var multibanco:PaymentIntentPaymentMethodOptionsMultibancoOptions? public var naverPay:PaymentIntentPaymentMethodOptionsNaverPayOptions? public var nzBankAccount:PaymentIntentPaymentMethodOptionsNzBankAccountOptions? public var oxxo:PaymentIntentPaymentMethodOptionsOxxoOptions? public var p24:PaymentIntentPaymentMethodOptionsP24Options? public var payByBank:PaymentIntentPaymentMethodOptionsPayByBankOptions? public var payco:PaymentIntentPaymentMethodOptionsPaycoOptions? public var paynow:PaymentIntentPaymentMethodOptionsPaynowOptions? public var paypal:PaymentIntentPaymentMethodOptionsPaypalOptions? public var pix:PaymentIntentPaymentMethodOptionsPixOptions? public var promptpay:PaymentIntentPaymentMethodOptionsPromptpayOptions? public var revolutPay:PaymentIntentPaymentMethodOptionsRevolutPayOptions? public var samsungPay:PaymentIntentPaymentMethodOptionsSamsungPayOptions? public var sepaDebit:PaymentIntentPaymentMethodOptionsSepaDebitOptions? public var sofort:PaymentIntentPaymentMethodOptionsSofortOptions? public var swish:PaymentIntentPaymentMethodOptionsSwishOptions? public var twint:PaymentIntentPaymentMethodOptionsTwintOptions? public var usBankAccount:PaymentIntentPaymentMethodOptionsUsBankAccountOptions? public var wechatPay:PaymentIntentPaymentMethodOptionsWechatPayOptions? public var zip:PaymentIntentPaymentMethodOptionsZipOptions? required public init(){} } public class PaymentIntentRadarOptionsOptions : INestedOptions, Codable { public var session:String? required public init(){} } public class ChargeShippingOptions : INestedOptions, Codable { public var address:AddressOptions? public var carrier:String? public var name:String? public var phone:String? public var trackingNumber:String? required public init(){} } public class PaymentIntentTransferDataOptions : INestedOptions, Codable { public var amount:Int? public var destination:String? required public init(){} } public class AddressOptions : INestedOptions, Codable { public var city:String? public var country:String? public var line1:String? public var line2:String? public var postalCode:String? public var state:String? required public init(){} } public class CustomerCashBalanceOptions : INestedOptions, Codable { public var settings:CustomerCashBalanceSettingsOptions? required public init(){} } public class CustomerInvoiceSettingsOptions : INestedOptions, Codable { public var customFields:[CustomerInvoiceSettingsCustomFieldOptions]? public var defaultPaymentMethod:String? public var footer:String? public var renderingOptions:CustomerInvoiceSettingsRenderingOptionsOptions? required public init(){} } public class ShippingOptions : INestedOptions, Codable { public var address:AddressOptions? public var name:String? public var phone:String? required public init(){} } public class AnyOf_2 : AnyOf { required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(String.self, forKey: .value) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } if type != nil { try container.encode(type, forKey: .type) } } } public class CardCreateNestedOptions : INestedOptions, IHasMetadata, IHasObject, Codable { public var addressCity:String? public var addressCountry:String? public var addressLine1:String? public var addressLine2:String? public var addressState:String? public var addressZip:String? public var currency:String? public var cvc:String? public var expMonth:Int? public var expYear:Int? public var metadata:[String:String]? public var name:String? public var number:String? public var object:String? required public init(){} } public class CustomerTaxOptions : INestedOptions, Codable { public var ipAddress:String? public var validateLocation:String? required public init(){} } public class CustomerTaxIdDataOptions : INestedOptions, Codable { public var type:String? public var value:String? required public init(){} } public class SessionAdaptivePricing : StripeEntity_1 { public var enabled:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } } } public class SessionAfterExpiration : StripeEntity_1 { public var recovery:SessionAfterExpirationRecovery? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case recovery } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) recovery = try container.decodeIfPresent(SessionAfterExpirationRecovery.self, forKey: .recovery) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if recovery != nil { try container.encode(recovery, forKey: .recovery) } } } public class SessionAutomaticTax : StripeEntity_1 { public var enabled:Bool? public var liability:SessionAutomaticTaxLiability? public var status:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled case liability case status } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) liability = try container.decodeIfPresent(SessionAutomaticTaxLiability.self, forKey: .liability) status = try container.decodeIfPresent(String.self, forKey: .status) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } if liability != nil { try container.encode(liability, forKey: .liability) } if status != nil { try container.encode(status, forKey: .status) } } } public class SessionCollectedInformation : StripeEntity_1 { public var shippingDetails:SessionCollectedInformationShippingDetails? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case shippingDetails } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) shippingDetails = try container.decodeIfPresent(SessionCollectedInformationShippingDetails.self, forKey: .shippingDetails) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if shippingDetails != nil { try container.encode(shippingDetails, forKey: .shippingDetails) } } } public class SessionConsent : StripeEntity_1 { public var promotions:String? public var termsOfService:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case promotions case termsOfService } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) promotions = try container.decodeIfPresent(String.self, forKey: .promotions) termsOfService = try container.decodeIfPresent(String.self, forKey: .termsOfService) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if promotions != nil { try container.encode(promotions, forKey: .promotions) } if termsOfService != nil { try container.encode(termsOfService, forKey: .termsOfService) } } } public class SessionConsentCollection : StripeEntity_1 { public var paymentMethodReuseAgreement:SessionConsentCollectionPaymentMethodReuseAgreement? public var promotions:String? public var termsOfService:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case paymentMethodReuseAgreement case promotions case termsOfService } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) paymentMethodReuseAgreement = try container.decodeIfPresent(SessionConsentCollectionPaymentMethodReuseAgreement.self, forKey: .paymentMethodReuseAgreement) promotions = try container.decodeIfPresent(String.self, forKey: .promotions) termsOfService = try container.decodeIfPresent(String.self, forKey: .termsOfService) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if paymentMethodReuseAgreement != nil { try container.encode(paymentMethodReuseAgreement, forKey: .paymentMethodReuseAgreement) } if promotions != nil { try container.encode(promotions, forKey: .promotions) } if termsOfService != nil { try container.encode(termsOfService, forKey: .termsOfService) } } } public class SessionCurrencyConversion : StripeEntity_1 { public var amountSubtotal:Int? public var amountTotal:Int? public var fxRate:Double? public var sourceCurrency:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountSubtotal case amountTotal case fxRate case sourceCurrency } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountSubtotal = try container.decodeIfPresent(Int.self, forKey: .amountSubtotal) amountTotal = try container.decodeIfPresent(Int.self, forKey: .amountTotal) fxRate = try container.decodeIfPresent(Double.self, forKey: .fxRate) sourceCurrency = try container.decodeIfPresent(String.self, forKey: .sourceCurrency) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountSubtotal != nil { try container.encode(amountSubtotal, forKey: .amountSubtotal) } if amountTotal != nil { try container.encode(amountTotal, forKey: .amountTotal) } if fxRate != nil { try container.encode(fxRate, forKey: .fxRate) } if sourceCurrency != nil { try container.encode(sourceCurrency, forKey: .sourceCurrency) } } } public class SessionCustomField : StripeEntity_1 { public var dropdown:SessionCustomFieldDropdown? public var key:String? public var label:SessionCustomFieldLabel? public var numeric:SessionCustomFieldNumeric? public var optional:Bool? public var text:SessionCustomFieldText? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dropdown case key case label case numeric case optional case text case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dropdown = try container.decodeIfPresent(SessionCustomFieldDropdown.self, forKey: .dropdown) key = try container.decodeIfPresent(String.self, forKey: .key) label = try container.decodeIfPresent(SessionCustomFieldLabel.self, forKey: .label) numeric = try container.decodeIfPresent(SessionCustomFieldNumeric.self, forKey: .numeric) optional = try container.decodeIfPresent(Bool.self, forKey: .optional) text = try container.decodeIfPresent(SessionCustomFieldText.self, forKey: .text) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dropdown != nil { try container.encode(dropdown, forKey: .dropdown) } if key != nil { try container.encode(key, forKey: .key) } if label != nil { try container.encode(label, forKey: .label) } if numeric != nil { try container.encode(numeric, forKey: .numeric) } if optional != nil { try container.encode(optional, forKey: .optional) } if text != nil { try container.encode(text, forKey: .text) } if type != nil { try container.encode(type, forKey: .type) } } } public class SessionCustomText : StripeEntity_1 { public var afterSubmit:SessionCustomTextAfterSubmit? public var shippingAddress:SessionCustomTextShippingAddress? public var submit:SessionCustomTextSubmit? public var termsOfServiceAcceptance:SessionCustomTextTermsOfServiceAcceptance? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case afterSubmit case shippingAddress case submit case termsOfServiceAcceptance } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) afterSubmit = try container.decodeIfPresent(SessionCustomTextAfterSubmit.self, forKey: .afterSubmit) shippingAddress = try container.decodeIfPresent(SessionCustomTextShippingAddress.self, forKey: .shippingAddress) submit = try container.decodeIfPresent(SessionCustomTextSubmit.self, forKey: .submit) termsOfServiceAcceptance = try container.decodeIfPresent(SessionCustomTextTermsOfServiceAcceptance.self, forKey: .termsOfServiceAcceptance) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if afterSubmit != nil { try container.encode(afterSubmit, forKey: .afterSubmit) } if shippingAddress != nil { try container.encode(shippingAddress, forKey: .shippingAddress) } if submit != nil { try container.encode(submit, forKey: .submit) } if termsOfServiceAcceptance != nil { try container.encode(termsOfServiceAcceptance, forKey: .termsOfServiceAcceptance) } } } public class SessionCustomerDetails : StripeEntity_1 { public var address:Address? public var email:String? public var name:String? public var phone:String? public var taxExempt:String? public var taxIds:[SessionCustomerDetailsTaxId]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case address case email case name case phone case taxExempt case taxIds } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) address = try container.decodeIfPresent(Address.self, forKey: .address) email = try container.decodeIfPresent(String.self, forKey: .email) name = try container.decodeIfPresent(String.self, forKey: .name) phone = try container.decodeIfPresent(String.self, forKey: .phone) taxExempt = try container.decodeIfPresent(String.self, forKey: .taxExempt) taxIds = try container.decodeIfPresent([SessionCustomerDetailsTaxId].self, forKey: .taxIds) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if address != nil { try container.encode(address, forKey: .address) } if email != nil { try container.encode(email, forKey: .email) } if name != nil { try container.encode(name, forKey: .name) } if phone != nil { try container.encode(phone, forKey: .phone) } if taxExempt != nil { try container.encode(taxExempt, forKey: .taxExempt) } if taxIds != nil { try container.encode(taxIds, forKey: .taxIds) } } } public class SessionDiscount : StripeEntity_1 { 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 SessionInvoiceCreation : StripeEntity_1 { public var enabled:Bool? public var invoiceData:SessionInvoiceCreationInvoiceData? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled case invoiceData } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) invoiceData = try container.decodeIfPresent(SessionInvoiceCreationInvoiceData.self, forKey: .invoiceData) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } if invoiceData != nil { try container.encode(invoiceData, forKey: .invoiceData) } } } public class StripeList : StripeEntity_1>, IHasObject { 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 SessionOptionalItem : StripeEntity_1 { public var adjustableQuantity:SessionOptionalItemAdjustableQuantity? public var price:String? public var quantity:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case adjustableQuantity case price case quantity } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) adjustableQuantity = try container.decodeIfPresent(SessionOptionalItemAdjustableQuantity.self, forKey: .adjustableQuantity) price = try container.decodeIfPresent(String.self, forKey: .price) quantity = try container.decodeIfPresent(Int.self, forKey: .quantity) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if adjustableQuantity != nil { try container.encode(adjustableQuantity, forKey: .adjustableQuantity) } if price != nil { try container.encode(price, forKey: .price) } if quantity != nil { try container.encode(quantity, forKey: .quantity) } } } public class SessionPaymentMethodConfigurationDetails : StripeEntity_1, IHasId { public var id:String? public var parent:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case parent } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) parent = try container.decodeIfPresent(String.self, forKey: .parent) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if parent != nil { try container.encode(parent, forKey: .parent) } } } public class SessionPaymentMethodOptions : StripeEntity_1 { public var acssDebit:SessionPaymentMethodOptionsAcssDebit? public var affirm:SessionPaymentMethodOptionsAffirm? public var afterpayClearpay:SessionPaymentMethodOptionsAfterpayClearpay? public var alipay:SessionPaymentMethodOptionsAlipay? public var amazonPay:SessionPaymentMethodOptionsAmazonPay? public var auBecsDebit:SessionPaymentMethodOptionsAuBecsDebit? public var bacsDebit:SessionPaymentMethodOptionsBacsDebit? public var bancontact:SessionPaymentMethodOptionsBancontact? public var boleto:SessionPaymentMethodOptionsBoleto? public var card:SessionPaymentMethodOptionsCard? public var cashapp:SessionPaymentMethodOptionsCashapp? public var customerBalance:SessionPaymentMethodOptionsCustomerBalance? public var eps:SessionPaymentMethodOptionsEps? public var fpx:SessionPaymentMethodOptionsFpx? public var giropay:SessionPaymentMethodOptionsGiropay? public var grabpay:SessionPaymentMethodOptionsGrabpay? public var ideal:SessionPaymentMethodOptionsIdeal? public var kakaoPay:SessionPaymentMethodOptionsKakaoPay? public var klarna:SessionPaymentMethodOptionsKlarna? public var konbini:SessionPaymentMethodOptionsKonbini? public var krCard:SessionPaymentMethodOptionsKrCard? public var link:SessionPaymentMethodOptionsLink? public var mobilepay:SessionPaymentMethodOptionsMobilepay? public var multibanco:SessionPaymentMethodOptionsMultibanco? public var naverPay:SessionPaymentMethodOptionsNaverPay? public var oxxo:SessionPaymentMethodOptionsOxxo? public var p24:SessionPaymentMethodOptionsP24? public var payco:SessionPaymentMethodOptionsPayco? public var paynow:SessionPaymentMethodOptionsPaynow? public var paypal:SessionPaymentMethodOptionsPaypal? public var pix:SessionPaymentMethodOptionsPix? public var revolutPay:SessionPaymentMethodOptionsRevolutPay? public var samsungPay:SessionPaymentMethodOptionsSamsungPay? public var sepaDebit:SessionPaymentMethodOptionsSepaDebit? public var sofort:SessionPaymentMethodOptionsSofort? public var swish:SessionPaymentMethodOptionsSwish? public var usBankAccount:SessionPaymentMethodOptionsUsBankAccount? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case acssDebit case affirm case afterpayClearpay case alipay case amazonPay case auBecsDebit case bacsDebit case bancontact case boleto case card case cashapp case customerBalance case eps case fpx case giropay case grabpay case ideal case kakaoPay case klarna case konbini case krCard case link case mobilepay case multibanco case naverPay case oxxo case p24 case payco case paynow case paypal case pix case revolutPay case samsungPay case sepaDebit case sofort case swish case usBankAccount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) acssDebit = try container.decodeIfPresent(SessionPaymentMethodOptionsAcssDebit.self, forKey: .acssDebit) affirm = try container.decodeIfPresent(SessionPaymentMethodOptionsAffirm.self, forKey: .affirm) afterpayClearpay = try container.decodeIfPresent(SessionPaymentMethodOptionsAfterpayClearpay.self, forKey: .afterpayClearpay) alipay = try container.decodeIfPresent(SessionPaymentMethodOptionsAlipay.self, forKey: .alipay) amazonPay = try container.decodeIfPresent(SessionPaymentMethodOptionsAmazonPay.self, forKey: .amazonPay) auBecsDebit = try container.decodeIfPresent(SessionPaymentMethodOptionsAuBecsDebit.self, forKey: .auBecsDebit) bacsDebit = try container.decodeIfPresent(SessionPaymentMethodOptionsBacsDebit.self, forKey: .bacsDebit) bancontact = try container.decodeIfPresent(SessionPaymentMethodOptionsBancontact.self, forKey: .bancontact) boleto = try container.decodeIfPresent(SessionPaymentMethodOptionsBoleto.self, forKey: .boleto) card = try container.decodeIfPresent(SessionPaymentMethodOptionsCard.self, forKey: .card) cashapp = try container.decodeIfPresent(SessionPaymentMethodOptionsCashapp.self, forKey: .cashapp) customerBalance = try container.decodeIfPresent(SessionPaymentMethodOptionsCustomerBalance.self, forKey: .customerBalance) eps = try container.decodeIfPresent(SessionPaymentMethodOptionsEps.self, forKey: .eps) fpx = try container.decodeIfPresent(SessionPaymentMethodOptionsFpx.self, forKey: .fpx) giropay = try container.decodeIfPresent(SessionPaymentMethodOptionsGiropay.self, forKey: .giropay) grabpay = try container.decodeIfPresent(SessionPaymentMethodOptionsGrabpay.self, forKey: .grabpay) ideal = try container.decodeIfPresent(SessionPaymentMethodOptionsIdeal.self, forKey: .ideal) kakaoPay = try container.decodeIfPresent(SessionPaymentMethodOptionsKakaoPay.self, forKey: .kakaoPay) klarna = try container.decodeIfPresent(SessionPaymentMethodOptionsKlarna.self, forKey: .klarna) konbini = try container.decodeIfPresent(SessionPaymentMethodOptionsKonbini.self, forKey: .konbini) krCard = try container.decodeIfPresent(SessionPaymentMethodOptionsKrCard.self, forKey: .krCard) link = try container.decodeIfPresent(SessionPaymentMethodOptionsLink.self, forKey: .link) mobilepay = try container.decodeIfPresent(SessionPaymentMethodOptionsMobilepay.self, forKey: .mobilepay) multibanco = try container.decodeIfPresent(SessionPaymentMethodOptionsMultibanco.self, forKey: .multibanco) naverPay = try container.decodeIfPresent(SessionPaymentMethodOptionsNaverPay.self, forKey: .naverPay) oxxo = try container.decodeIfPresent(SessionPaymentMethodOptionsOxxo.self, forKey: .oxxo) p24 = try container.decodeIfPresent(SessionPaymentMethodOptionsP24.self, forKey: .p24) payco = try container.decodeIfPresent(SessionPaymentMethodOptionsPayco.self, forKey: .payco) paynow = try container.decodeIfPresent(SessionPaymentMethodOptionsPaynow.self, forKey: .paynow) paypal = try container.decodeIfPresent(SessionPaymentMethodOptionsPaypal.self, forKey: .paypal) pix = try container.decodeIfPresent(SessionPaymentMethodOptionsPix.self, forKey: .pix) revolutPay = try container.decodeIfPresent(SessionPaymentMethodOptionsRevolutPay.self, forKey: .revolutPay) samsungPay = try container.decodeIfPresent(SessionPaymentMethodOptionsSamsungPay.self, forKey: .samsungPay) sepaDebit = try container.decodeIfPresent(SessionPaymentMethodOptionsSepaDebit.self, forKey: .sepaDebit) sofort = try container.decodeIfPresent(SessionPaymentMethodOptionsSofort.self, forKey: .sofort) swish = try container.decodeIfPresent(SessionPaymentMethodOptionsSwish.self, forKey: .swish) usBankAccount = try container.decodeIfPresent(SessionPaymentMethodOptionsUsBankAccount.self, forKey: .usBankAccount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if acssDebit != nil { try container.encode(acssDebit, forKey: .acssDebit) } if affirm != nil { try container.encode(affirm, forKey: .affirm) } if afterpayClearpay != nil { try container.encode(afterpayClearpay, forKey: .afterpayClearpay) } if alipay != nil { try container.encode(alipay, forKey: .alipay) } if amazonPay != nil { try container.encode(amazonPay, forKey: .amazonPay) } if auBecsDebit != nil { try container.encode(auBecsDebit, forKey: .auBecsDebit) } if bacsDebit != nil { try container.encode(bacsDebit, forKey: .bacsDebit) } if bancontact != nil { try container.encode(bancontact, forKey: .bancontact) } if boleto != nil { try container.encode(boleto, forKey: .boleto) } if card != nil { try container.encode(card, forKey: .card) } if cashapp != nil { try container.encode(cashapp, forKey: .cashapp) } if customerBalance != nil { try container.encode(customerBalance, forKey: .customerBalance) } if eps != nil { try container.encode(eps, forKey: .eps) } if fpx != nil { try container.encode(fpx, forKey: .fpx) } if giropay != nil { try container.encode(giropay, forKey: .giropay) } if grabpay != nil { try container.encode(grabpay, forKey: .grabpay) } if ideal != nil { try container.encode(ideal, forKey: .ideal) } if kakaoPay != nil { try container.encode(kakaoPay, forKey: .kakaoPay) } if klarna != nil { try container.encode(klarna, forKey: .klarna) } if konbini != nil { try container.encode(konbini, forKey: .konbini) } if krCard != nil { try container.encode(krCard, forKey: .krCard) } if link != nil { try container.encode(link, forKey: .link) } if mobilepay != nil { try container.encode(mobilepay, forKey: .mobilepay) } if multibanco != nil { try container.encode(multibanco, forKey: .multibanco) } if naverPay != nil { try container.encode(naverPay, forKey: .naverPay) } if oxxo != nil { try container.encode(oxxo, forKey: .oxxo) } if p24 != nil { try container.encode(p24, forKey: .p24) } if payco != nil { try container.encode(payco, forKey: .payco) } if paynow != nil { try container.encode(paynow, forKey: .paynow) } if paypal != nil { try container.encode(paypal, forKey: .paypal) } if pix != nil { try container.encode(pix, forKey: .pix) } if revolutPay != nil { try container.encode(revolutPay, forKey: .revolutPay) } if samsungPay != nil { try container.encode(samsungPay, forKey: .samsungPay) } if sepaDebit != nil { try container.encode(sepaDebit, forKey: .sepaDebit) } if sofort != nil { try container.encode(sofort, forKey: .sofort) } if swish != nil { try container.encode(swish, forKey: .swish) } if usBankAccount != nil { try container.encode(usBankAccount, forKey: .usBankAccount) } } } public class SessionPermissions : StripeEntity_1 { public var updateShippingDetails:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case updateShippingDetails } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) updateShippingDetails = try container.decodeIfPresent(String.self, forKey: .updateShippingDetails) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if updateShippingDetails != nil { try container.encode(updateShippingDetails, forKey: .updateShippingDetails) } } } public class SessionPhoneNumberCollection : StripeEntity_1 { public var enabled:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } } } public class SessionPresentmentDetails : StripeEntity_1 { public var presentmentAmount:Int? public var presentmentCurrency:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case presentmentAmount case presentmentCurrency } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) presentmentAmount = try container.decodeIfPresent(Int.self, forKey: .presentmentAmount) presentmentCurrency = try container.decodeIfPresent(String.self, forKey: .presentmentCurrency) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if presentmentAmount != nil { try container.encode(presentmentAmount, forKey: .presentmentAmount) } if presentmentCurrency != nil { try container.encode(presentmentCurrency, forKey: .presentmentCurrency) } } } public class SessionSavedPaymentMethodOptions : StripeEntity_1 { public var allowRedisplayFilters:[String]? public var paymentMethodRemove:String? public var paymentMethodSave:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case allowRedisplayFilters case paymentMethodRemove case paymentMethodSave } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) allowRedisplayFilters = try container.decodeIfPresent([String].self, forKey: .allowRedisplayFilters) ?? [] paymentMethodRemove = try container.decodeIfPresent(String.self, forKey: .paymentMethodRemove) paymentMethodSave = try container.decodeIfPresent(String.self, forKey: .paymentMethodSave) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if allowRedisplayFilters != nil { try container.encode(allowRedisplayFilters, forKey: .allowRedisplayFilters) } if paymentMethodRemove != nil { try container.encode(paymentMethodRemove, forKey: .paymentMethodRemove) } if paymentMethodSave != nil { try container.encode(paymentMethodSave, forKey: .paymentMethodSave) } } } public class SessionShippingAddressCollection : StripeEntity_1 { public var allowedCountries:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case allowedCountries } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) allowedCountries = try container.decodeIfPresent([String].self, forKey: .allowedCountries) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if allowedCountries != nil { try container.encode(allowedCountries, forKey: .allowedCountries) } } } public class SessionShippingCost : StripeEntity_1 { public var amountSubtotal:Int? public var amountTax:Int? public var amountTotal:Int? public var taxes:[SessionShippingCostTax]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountSubtotal case amountTax case amountTotal case taxes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountSubtotal = try container.decodeIfPresent(Int.self, forKey: .amountSubtotal) amountTax = try container.decodeIfPresent(Int.self, forKey: .amountTax) amountTotal = try container.decodeIfPresent(Int.self, forKey: .amountTotal) taxes = try container.decodeIfPresent([SessionShippingCostTax].self, forKey: .taxes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountSubtotal != nil { try container.encode(amountSubtotal, forKey: .amountSubtotal) } if amountTax != nil { try container.encode(amountTax, forKey: .amountTax) } if amountTotal != nil { try container.encode(amountTotal, forKey: .amountTotal) } if taxes != nil { try container.encode(taxes, forKey: .taxes) } } } public class SessionShippingOption : StripeEntity_1 { public var shippingAmount:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case shippingAmount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) shippingAmount = try container.decodeIfPresent(Int.self, forKey: .shippingAmount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if shippingAmount != nil { try container.encode(shippingAmount, forKey: .shippingAmount) } } } public class SessionTaxIdCollection : StripeEntity_1 { public var enabled:Bool? public var required:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled case required } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) required = try container.decodeIfPresent(String.self, forKey: .required) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } if required != nil { try container.encode(required, forKey: .required) } } } public class SessionTotalDetails : StripeEntity_1 { public var amountDiscount:Int? public var amountShipping:Int? public var amountTax:Int? public var breakdown:SessionTotalDetailsBreakdown? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountDiscount case amountShipping case amountTax case breakdown } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountDiscount = try container.decodeIfPresent(Int.self, forKey: .amountDiscount) amountShipping = try container.decodeIfPresent(Int.self, forKey: .amountShipping) amountTax = try container.decodeIfPresent(Int.self, forKey: .amountTax) breakdown = try container.decodeIfPresent(SessionTotalDetailsBreakdown.self, forKey: .breakdown) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountDiscount != nil { try container.encode(amountDiscount, forKey: .amountDiscount) } if amountShipping != nil { try container.encode(amountShipping, forKey: .amountShipping) } if amountTax != nil { try container.encode(amountTax, forKey: .amountTax) } if breakdown != nil { try container.encode(breakdown, forKey: .breakdown) } } } public class StripeEntity_1 : StripeEntity { 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 protocol IStripeEntity { var stripeResponse:StripeResponse? { get set } } public protocol IHasId { var id:String? { get set } } public protocol IHasObject { var object:String? { get set } } public class LineItemDiscount : StripeEntity_1 { public var amount:Int? public var discount:Discount? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case discount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) discount = try container.decodeIfPresent(Discount.self, forKey: .discount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if discount != nil { try container.encode(discount, forKey: .discount) } } } public class Price : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var active:Bool? public var billingScheme:String? public var created:Date? public var currency:String? public var currencyOptions:[String:PriceCurrencyOptions]? public var customUnitAmount:PriceCustomUnitAmount? public var livemode:Bool? public var lookupKey:String? public var metadata:[String:String]? public var nickname:String? public var recurring:PriceRecurring? public var taxBehavior:String? public var tiers:[PriceTier]? public var tiersMode:String? public var transformQuantity:PriceTransformQuantity? public var type:String? public var unitAmount:Int? public var unitAmountDecimal:Double? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case active case billingScheme case created case currency case currencyOptions case customUnitAmount case livemode case lookupKey case metadata case nickname case recurring case taxBehavior case tiers case tiersMode case transformQuantity case type case unitAmount case unitAmountDecimal } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) active = try container.decodeIfPresent(Bool.self, forKey: .active) billingScheme = try container.decodeIfPresent(String.self, forKey: .billingScheme) created = try container.decodeIfPresent(Date.self, forKey: .created) currency = try container.decodeIfPresent(String.self, forKey: .currency) currencyOptions = try container.decodeIfPresent([String:PriceCurrencyOptions].self, forKey: .currencyOptions) ?? [:] customUnitAmount = try container.decodeIfPresent(PriceCustomUnitAmount.self, forKey: .customUnitAmount) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) lookupKey = try container.decodeIfPresent(String.self, forKey: .lookupKey) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] nickname = try container.decodeIfPresent(String.self, forKey: .nickname) recurring = try container.decodeIfPresent(PriceRecurring.self, forKey: .recurring) taxBehavior = try container.decodeIfPresent(String.self, forKey: .taxBehavior) tiers = try container.decodeIfPresent([PriceTier].self, forKey: .tiers) ?? [] tiersMode = try container.decodeIfPresent(String.self, forKey: .tiersMode) transformQuantity = try container.decodeIfPresent(PriceTransformQuantity.self, forKey: .transformQuantity) type = try container.decodeIfPresent(String.self, forKey: .type) unitAmount = try container.decodeIfPresent(Int.self, forKey: .unitAmount) unitAmountDecimal = try container.decodeIfPresent(Double.self, forKey: .unitAmountDecimal) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if active != nil { try container.encode(active, forKey: .active) } if billingScheme != nil { try container.encode(billingScheme, forKey: .billingScheme) } if created != nil { try container.encode(created, forKey: .created) } if currency != nil { try container.encode(currency, forKey: .currency) } if currencyOptions != nil { try container.encode(currencyOptions, forKey: .currencyOptions) } if customUnitAmount != nil { try container.encode(customUnitAmount, forKey: .customUnitAmount) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if lookupKey != nil { try container.encode(lookupKey, forKey: .lookupKey) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if nickname != nil { try container.encode(nickname, forKey: .nickname) } if recurring != nil { try container.encode(recurring, forKey: .recurring) } if taxBehavior != nil { try container.encode(taxBehavior, forKey: .taxBehavior) } if tiers != nil { try container.encode(tiers, forKey: .tiers) } if tiersMode != nil { try container.encode(tiersMode, forKey: .tiersMode) } if transformQuantity != nil { try container.encode(transformQuantity, forKey: .transformQuantity) } if type != nil { try container.encode(type, forKey: .type) } if unitAmount != nil { try container.encode(unitAmount, forKey: .unitAmount) } if unitAmountDecimal != nil { try container.encode(unitAmountDecimal, forKey: .unitAmountDecimal) } } } public class LineItemTax : StripeEntity_1 { public var amount:Int? public var rate:TaxRate? public var taxabilityReason:String? public var taxableAmount:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case rate case taxabilityReason case taxableAmount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) rate = try container.decodeIfPresent(TaxRate.self, forKey: .rate) taxabilityReason = try container.decodeIfPresent(String.self, forKey: .taxabilityReason) taxableAmount = try container.decodeIfPresent(Int.self, forKey: .taxableAmount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if rate != nil { try container.encode(rate, forKey: .rate) } if taxabilityReason != nil { try container.encode(taxabilityReason, forKey: .taxabilityReason) } if taxableAmount != nil { try container.encode(taxableAmount, forKey: .taxableAmount) } } } public class PaymentIntentAmountDetails : StripeEntity_1 { public var tip:PaymentIntentAmountDetailsTip? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case tip } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) tip = try container.decodeIfPresent(PaymentIntentAmountDetailsTip.self, forKey: .tip) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if tip != nil { try container.encode(tip, forKey: .tip) } } } public class PaymentIntentAutomaticPaymentMethods : StripeEntity_1 { public var allowRedirects:String? public var enabled:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case allowRedirects case enabled } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) allowRedirects = try container.decodeIfPresent(String.self, forKey: .allowRedirects) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if allowRedirects != nil { try container.encode(allowRedirects, forKey: .allowRedirects) } if enabled != nil { try container.encode(enabled, forKey: .enabled) } } } public class StripeError : StripeEntity_1 { public var charge:String? public var code:String? public var declineCode:String? public var docUrl:String? public var message:String? public var param:String? public var paymentIntent:PaymentIntent? public var paymentMethod:PaymentMethod? public var paymentMethodType:String? public var requestLogUrl:String? public var setupIntent:SetupIntent? //source:IPaymentSource ignored. Swift doesn't support interface properties public var type:String? public var error:String? public var errorDescription:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case charge case code case declineCode case docUrl case message case param case paymentIntent case paymentMethod case paymentMethodType case requestLogUrl case setupIntent case source case type case error case errorDescription } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) charge = try container.decodeIfPresent(String.self, forKey: .charge) code = try container.decodeIfPresent(String.self, forKey: .code) declineCode = try container.decodeIfPresent(String.self, forKey: .declineCode) docUrl = try container.decodeIfPresent(String.self, forKey: .docUrl) message = try container.decodeIfPresent(String.self, forKey: .message) param = try container.decodeIfPresent(String.self, forKey: .param) paymentIntent = try container.decodeIfPresent(PaymentIntent.self, forKey: .paymentIntent) paymentMethod = try container.decodeIfPresent(PaymentMethod.self, forKey: .paymentMethod) paymentMethodType = try container.decodeIfPresent(String.self, forKey: .paymentMethodType) requestLogUrl = try container.decodeIfPresent(String.self, forKey: .requestLogUrl) setupIntent = try container.decodeIfPresent(SetupIntent.self, forKey: .setupIntent) source = try container.decodeIfPresent(IPaymentSource.self, forKey: .source) type = try container.decodeIfPresent(String.self, forKey: .type) error = try container.decodeIfPresent(String.self, forKey: .error) errorDescription = try container.decodeIfPresent(String.self, forKey: .errorDescription) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if charge != nil { try container.encode(charge, forKey: .charge) } if code != nil { try container.encode(code, forKey: .code) } if declineCode != nil { try container.encode(declineCode, forKey: .declineCode) } if docUrl != nil { try container.encode(docUrl, forKey: .docUrl) } if message != nil { try container.encode(message, forKey: .message) } if param != nil { try container.encode(param, forKey: .param) } if paymentIntent != nil { try container.encode(paymentIntent, forKey: .paymentIntent) } if paymentMethod != nil { try container.encode(paymentMethod, forKey: .paymentMethod) } if paymentMethodType != nil { try container.encode(paymentMethodType, forKey: .paymentMethodType) } if requestLogUrl != nil { try container.encode(requestLogUrl, forKey: .requestLogUrl) } if setupIntent != nil { try container.encode(setupIntent, forKey: .setupIntent) } if source != nil { try container.encode(source, forKey: .source) } if type != nil { try container.encode(type, forKey: .type) } if error != nil { try container.encode(error, forKey: .error) } if errorDescription != nil { try container.encode(errorDescription, forKey: .errorDescription) } } } public class PaymentIntentNextAction : StripeEntity_1 { public var alipayHandleRedirect:PaymentIntentNextActionAlipayHandleRedirect? public var boletoDisplayDetails:PaymentIntentNextActionBoletoDisplayDetails? public var cardAwaitNotification:PaymentIntentNextActionCardAwaitNotification? public var cashappHandleRedirectOrDisplayQrCode:PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode? public var displayBankTransferInstructions:PaymentIntentNextActionDisplayBankTransferInstructions? public var konbiniDisplayDetails:PaymentIntentNextActionKonbiniDisplayDetails? public var multibancoDisplayDetails:PaymentIntentNextActionMultibancoDisplayDetails? public var oxxoDisplayDetails:PaymentIntentNextActionOxxoDisplayDetails? public var paynowDisplayQrCode:PaymentIntentNextActionPaynowDisplayQrCode? public var pixDisplayQrCode:PaymentIntentNextActionPixDisplayQrCode? public var promptpayDisplayQrCode:PaymentIntentNextActionPromptpayDisplayQrCode? public var redirectToUrl:PaymentIntentNextActionRedirectToUrl? public var swishHandleRedirectOrDisplayQrCode:PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode? public var type:String? public var useStripeSdk:PaymentIntentNextActionUseStripeSdk? public var verifyWithMicrodeposits:PaymentIntentNextActionVerifyWithMicrodeposits? public var wechatPayDisplayQrCode:PaymentIntentNextActionWechatPayDisplayQrCode? public var wechatPayRedirectToAndroidApp:PaymentIntentNextActionWechatPayRedirectToAndroidApp? public var wechatPayRedirectToIosApp:PaymentIntentNextActionWechatPayRedirectToIosApp? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case alipayHandleRedirect case boletoDisplayDetails case cardAwaitNotification case cashappHandleRedirectOrDisplayQrCode case displayBankTransferInstructions case konbiniDisplayDetails case multibancoDisplayDetails case oxxoDisplayDetails case paynowDisplayQrCode case pixDisplayQrCode case promptpayDisplayQrCode case redirectToUrl case swishHandleRedirectOrDisplayQrCode case type case useStripeSdk case verifyWithMicrodeposits case wechatPayDisplayQrCode case wechatPayRedirectToAndroidApp case wechatPayRedirectToIosApp } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) alipayHandleRedirect = try container.decodeIfPresent(PaymentIntentNextActionAlipayHandleRedirect.self, forKey: .alipayHandleRedirect) boletoDisplayDetails = try container.decodeIfPresent(PaymentIntentNextActionBoletoDisplayDetails.self, forKey: .boletoDisplayDetails) cardAwaitNotification = try container.decodeIfPresent(PaymentIntentNextActionCardAwaitNotification.self, forKey: .cardAwaitNotification) cashappHandleRedirectOrDisplayQrCode = try container.decodeIfPresent(PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode.self, forKey: .cashappHandleRedirectOrDisplayQrCode) displayBankTransferInstructions = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructions.self, forKey: .displayBankTransferInstructions) konbiniDisplayDetails = try container.decodeIfPresent(PaymentIntentNextActionKonbiniDisplayDetails.self, forKey: .konbiniDisplayDetails) multibancoDisplayDetails = try container.decodeIfPresent(PaymentIntentNextActionMultibancoDisplayDetails.self, forKey: .multibancoDisplayDetails) oxxoDisplayDetails = try container.decodeIfPresent(PaymentIntentNextActionOxxoDisplayDetails.self, forKey: .oxxoDisplayDetails) paynowDisplayQrCode = try container.decodeIfPresent(PaymentIntentNextActionPaynowDisplayQrCode.self, forKey: .paynowDisplayQrCode) pixDisplayQrCode = try container.decodeIfPresent(PaymentIntentNextActionPixDisplayQrCode.self, forKey: .pixDisplayQrCode) promptpayDisplayQrCode = try container.decodeIfPresent(PaymentIntentNextActionPromptpayDisplayQrCode.self, forKey: .promptpayDisplayQrCode) redirectToUrl = try container.decodeIfPresent(PaymentIntentNextActionRedirectToUrl.self, forKey: .redirectToUrl) swishHandleRedirectOrDisplayQrCode = try container.decodeIfPresent(PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode.self, forKey: .swishHandleRedirectOrDisplayQrCode) type = try container.decodeIfPresent(String.self, forKey: .type) useStripeSdk = try container.decodeIfPresent(PaymentIntentNextActionUseStripeSdk.self, forKey: .useStripeSdk) verifyWithMicrodeposits = try container.decodeIfPresent(PaymentIntentNextActionVerifyWithMicrodeposits.self, forKey: .verifyWithMicrodeposits) wechatPayDisplayQrCode = try container.decodeIfPresent(PaymentIntentNextActionWechatPayDisplayQrCode.self, forKey: .wechatPayDisplayQrCode) wechatPayRedirectToAndroidApp = try container.decodeIfPresent(PaymentIntentNextActionWechatPayRedirectToAndroidApp.self, forKey: .wechatPayRedirectToAndroidApp) wechatPayRedirectToIosApp = try container.decodeIfPresent(PaymentIntentNextActionWechatPayRedirectToIosApp.self, forKey: .wechatPayRedirectToIosApp) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if alipayHandleRedirect != nil { try container.encode(alipayHandleRedirect, forKey: .alipayHandleRedirect) } if boletoDisplayDetails != nil { try container.encode(boletoDisplayDetails, forKey: .boletoDisplayDetails) } if cardAwaitNotification != nil { try container.encode(cardAwaitNotification, forKey: .cardAwaitNotification) } if cashappHandleRedirectOrDisplayQrCode != nil { try container.encode(cashappHandleRedirectOrDisplayQrCode, forKey: .cashappHandleRedirectOrDisplayQrCode) } if displayBankTransferInstructions != nil { try container.encode(displayBankTransferInstructions, forKey: .displayBankTransferInstructions) } if konbiniDisplayDetails != nil { try container.encode(konbiniDisplayDetails, forKey: .konbiniDisplayDetails) } if multibancoDisplayDetails != nil { try container.encode(multibancoDisplayDetails, forKey: .multibancoDisplayDetails) } if oxxoDisplayDetails != nil { try container.encode(oxxoDisplayDetails, forKey: .oxxoDisplayDetails) } if paynowDisplayQrCode != nil { try container.encode(paynowDisplayQrCode, forKey: .paynowDisplayQrCode) } if pixDisplayQrCode != nil { try container.encode(pixDisplayQrCode, forKey: .pixDisplayQrCode) } if promptpayDisplayQrCode != nil { try container.encode(promptpayDisplayQrCode, forKey: .promptpayDisplayQrCode) } if redirectToUrl != nil { try container.encode(redirectToUrl, forKey: .redirectToUrl) } if swishHandleRedirectOrDisplayQrCode != nil { try container.encode(swishHandleRedirectOrDisplayQrCode, forKey: .swishHandleRedirectOrDisplayQrCode) } if type != nil { try container.encode(type, forKey: .type) } if useStripeSdk != nil { try container.encode(useStripeSdk, forKey: .useStripeSdk) } if verifyWithMicrodeposits != nil { try container.encode(verifyWithMicrodeposits, forKey: .verifyWithMicrodeposits) } if wechatPayDisplayQrCode != nil { try container.encode(wechatPayDisplayQrCode, forKey: .wechatPayDisplayQrCode) } if wechatPayRedirectToAndroidApp != nil { try container.encode(wechatPayRedirectToAndroidApp, forKey: .wechatPayRedirectToAndroidApp) } if wechatPayRedirectToIosApp != nil { try container.encode(wechatPayRedirectToIosApp, forKey: .wechatPayRedirectToIosApp) } } } public class PaymentIntentPaymentMethodConfigurationDetails : StripeEntity_1, IHasId { public var id:String? public var parent:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case parent } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) parent = try container.decodeIfPresent(String.self, forKey: .parent) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if parent != nil { try container.encode(parent, forKey: .parent) } } } public class PaymentIntentPaymentMethodOptions : StripeEntity_1 { public var acssDebit:PaymentIntentPaymentMethodOptionsAcssDebit? public var affirm:PaymentIntentPaymentMethodOptionsAffirm? public var afterpayClearpay:PaymentIntentPaymentMethodOptionsAfterpayClearpay? public var alipay:PaymentIntentPaymentMethodOptionsAlipay? public var alma:PaymentIntentPaymentMethodOptionsAlma? public var amazonPay:PaymentIntentPaymentMethodOptionsAmazonPay? public var auBecsDebit:PaymentIntentPaymentMethodOptionsAuBecsDebit? public var bacsDebit:PaymentIntentPaymentMethodOptionsBacsDebit? public var bancontact:PaymentIntentPaymentMethodOptionsBancontact? public var blik:PaymentIntentPaymentMethodOptionsBlik? public var boleto:PaymentIntentPaymentMethodOptionsBoleto? public var card:PaymentIntentPaymentMethodOptionsCard? public var cardPresent:PaymentIntentPaymentMethodOptionsCardPresent? public var cashapp:PaymentIntentPaymentMethodOptionsCashapp? public var customerBalance:PaymentIntentPaymentMethodOptionsCustomerBalance? public var eps:PaymentIntentPaymentMethodOptionsEps? public var fpx:PaymentIntentPaymentMethodOptionsFpx? public var giropay:PaymentIntentPaymentMethodOptionsGiropay? public var grabpay:PaymentIntentPaymentMethodOptionsGrabpay? public var ideal:PaymentIntentPaymentMethodOptionsIdeal? public var interacPresent:PaymentIntentPaymentMethodOptionsInteracPresent? public var kakaoPay:PaymentIntentPaymentMethodOptionsKakaoPay? public var klarna:PaymentIntentPaymentMethodOptionsKlarna? public var konbini:PaymentIntentPaymentMethodOptionsKonbini? public var krCard:PaymentIntentPaymentMethodOptionsKrCard? public var link:PaymentIntentPaymentMethodOptionsLink? public var mobilepay:PaymentIntentPaymentMethodOptionsMobilepay? public var multibanco:PaymentIntentPaymentMethodOptionsMultibanco? public var naverPay:PaymentIntentPaymentMethodOptionsNaverPay? public var nzBankAccount:PaymentIntentPaymentMethodOptionsNzBankAccount? public var oxxo:PaymentIntentPaymentMethodOptionsOxxo? public var p24:PaymentIntentPaymentMethodOptionsP24? public var payByBank:PaymentIntentPaymentMethodOptionsPayByBank? public var payco:PaymentIntentPaymentMethodOptionsPayco? public var paynow:PaymentIntentPaymentMethodOptionsPaynow? public var paypal:PaymentIntentPaymentMethodOptionsPaypal? public var pix:PaymentIntentPaymentMethodOptionsPix? public var promptpay:PaymentIntentPaymentMethodOptionsPromptpay? public var revolutPay:PaymentIntentPaymentMethodOptionsRevolutPay? public var samsungPay:PaymentIntentPaymentMethodOptionsSamsungPay? public var sepaDebit:PaymentIntentPaymentMethodOptionsSepaDebit? public var sofort:PaymentIntentPaymentMethodOptionsSofort? public var swish:PaymentIntentPaymentMethodOptionsSwish? public var twint:PaymentIntentPaymentMethodOptionsTwint? public var usBankAccount:PaymentIntentPaymentMethodOptionsUsBankAccount? public var wechatPay:PaymentIntentPaymentMethodOptionsWechatPay? public var zip:PaymentIntentPaymentMethodOptionsZip? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case acssDebit case affirm case afterpayClearpay case alipay case alma case amazonPay case auBecsDebit case bacsDebit case bancontact case blik case boleto case card case cardPresent case cashapp case customerBalance case eps case fpx case giropay case grabpay case ideal case interacPresent case kakaoPay case klarna case konbini case krCard case link case mobilepay case multibanco case naverPay case nzBankAccount case oxxo case p24 case payByBank case payco case paynow case paypal case pix case promptpay case revolutPay case samsungPay case sepaDebit case sofort case swish case twint case usBankAccount case wechatPay case zip } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) acssDebit = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAcssDebit.self, forKey: .acssDebit) affirm = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAffirm.self, forKey: .affirm) afterpayClearpay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAfterpayClearpay.self, forKey: .afterpayClearpay) alipay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAlipay.self, forKey: .alipay) alma = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAlma.self, forKey: .alma) amazonPay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAmazonPay.self, forKey: .amazonPay) auBecsDebit = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAuBecsDebit.self, forKey: .auBecsDebit) bacsDebit = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsBacsDebit.self, forKey: .bacsDebit) bancontact = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsBancontact.self, forKey: .bancontact) blik = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsBlik.self, forKey: .blik) boleto = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsBoleto.self, forKey: .boleto) card = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCard.self, forKey: .card) cardPresent = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCardPresent.self, forKey: .cardPresent) cashapp = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCashapp.self, forKey: .cashapp) customerBalance = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCustomerBalance.self, forKey: .customerBalance) eps = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsEps.self, forKey: .eps) fpx = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsFpx.self, forKey: .fpx) giropay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsGiropay.self, forKey: .giropay) grabpay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsGrabpay.self, forKey: .grabpay) ideal = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsIdeal.self, forKey: .ideal) interacPresent = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsInteracPresent.self, forKey: .interacPresent) kakaoPay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsKakaoPay.self, forKey: .kakaoPay) klarna = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsKlarna.self, forKey: .klarna) konbini = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsKonbini.self, forKey: .konbini) krCard = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsKrCard.self, forKey: .krCard) link = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsLink.self, forKey: .link) mobilepay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsMobilepay.self, forKey: .mobilepay) multibanco = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsMultibanco.self, forKey: .multibanco) naverPay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsNaverPay.self, forKey: .naverPay) nzBankAccount = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsNzBankAccount.self, forKey: .nzBankAccount) oxxo = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsOxxo.self, forKey: .oxxo) p24 = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsP24.self, forKey: .p24) payByBank = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsPayByBank.self, forKey: .payByBank) payco = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsPayco.self, forKey: .payco) paynow = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsPaynow.self, forKey: .paynow) paypal = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsPaypal.self, forKey: .paypal) pix = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsPix.self, forKey: .pix) promptpay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsPromptpay.self, forKey: .promptpay) revolutPay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsRevolutPay.self, forKey: .revolutPay) samsungPay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsSamsungPay.self, forKey: .samsungPay) sepaDebit = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsSepaDebit.self, forKey: .sepaDebit) sofort = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsSofort.self, forKey: .sofort) swish = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsSwish.self, forKey: .swish) twint = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsTwint.self, forKey: .twint) usBankAccount = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsUsBankAccount.self, forKey: .usBankAccount) wechatPay = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsWechatPay.self, forKey: .wechatPay) zip = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsZip.self, forKey: .zip) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if acssDebit != nil { try container.encode(acssDebit, forKey: .acssDebit) } if affirm != nil { try container.encode(affirm, forKey: .affirm) } if afterpayClearpay != nil { try container.encode(afterpayClearpay, forKey: .afterpayClearpay) } if alipay != nil { try container.encode(alipay, forKey: .alipay) } if alma != nil { try container.encode(alma, forKey: .alma) } if amazonPay != nil { try container.encode(amazonPay, forKey: .amazonPay) } if auBecsDebit != nil { try container.encode(auBecsDebit, forKey: .auBecsDebit) } if bacsDebit != nil { try container.encode(bacsDebit, forKey: .bacsDebit) } if bancontact != nil { try container.encode(bancontact, forKey: .bancontact) } if blik != nil { try container.encode(blik, forKey: .blik) } if boleto != nil { try container.encode(boleto, forKey: .boleto) } if card != nil { try container.encode(card, forKey: .card) } if cardPresent != nil { try container.encode(cardPresent, forKey: .cardPresent) } if cashapp != nil { try container.encode(cashapp, forKey: .cashapp) } if customerBalance != nil { try container.encode(customerBalance, forKey: .customerBalance) } if eps != nil { try container.encode(eps, forKey: .eps) } if fpx != nil { try container.encode(fpx, forKey: .fpx) } if giropay != nil { try container.encode(giropay, forKey: .giropay) } if grabpay != nil { try container.encode(grabpay, forKey: .grabpay) } if ideal != nil { try container.encode(ideal, forKey: .ideal) } if interacPresent != nil { try container.encode(interacPresent, forKey: .interacPresent) } if kakaoPay != nil { try container.encode(kakaoPay, forKey: .kakaoPay) } if klarna != nil { try container.encode(klarna, forKey: .klarna) } if konbini != nil { try container.encode(konbini, forKey: .konbini) } if krCard != nil { try container.encode(krCard, forKey: .krCard) } if link != nil { try container.encode(link, forKey: .link) } if mobilepay != nil { try container.encode(mobilepay, forKey: .mobilepay) } if multibanco != nil { try container.encode(multibanco, forKey: .multibanco) } if naverPay != nil { try container.encode(naverPay, forKey: .naverPay) } if nzBankAccount != nil { try container.encode(nzBankAccount, forKey: .nzBankAccount) } if oxxo != nil { try container.encode(oxxo, forKey: .oxxo) } if p24 != nil { try container.encode(p24, forKey: .p24) } if payByBank != nil { try container.encode(payByBank, forKey: .payByBank) } if payco != nil { try container.encode(payco, forKey: .payco) } if paynow != nil { try container.encode(paynow, forKey: .paynow) } if paypal != nil { try container.encode(paypal, forKey: .paypal) } if pix != nil { try container.encode(pix, forKey: .pix) } if promptpay != nil { try container.encode(promptpay, forKey: .promptpay) } if revolutPay != nil { try container.encode(revolutPay, forKey: .revolutPay) } if samsungPay != nil { try container.encode(samsungPay, forKey: .samsungPay) } if sepaDebit != nil { try container.encode(sepaDebit, forKey: .sepaDebit) } if sofort != nil { try container.encode(sofort, forKey: .sofort) } if swish != nil { try container.encode(swish, forKey: .swish) } if twint != nil { try container.encode(twint, forKey: .twint) } if usBankAccount != nil { try container.encode(usBankAccount, forKey: .usBankAccount) } if wechatPay != nil { try container.encode(wechatPay, forKey: .wechatPay) } if zip != nil { try container.encode(zip, forKey: .zip) } } } public class PaymentIntentPresentmentDetails : StripeEntity_1 { public var presentmentAmount:Int? public var presentmentCurrency:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case presentmentAmount case presentmentCurrency } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) presentmentAmount = try container.decodeIfPresent(Int.self, forKey: .presentmentAmount) presentmentCurrency = try container.decodeIfPresent(String.self, forKey: .presentmentCurrency) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if presentmentAmount != nil { try container.encode(presentmentAmount, forKey: .presentmentAmount) } if presentmentCurrency != nil { try container.encode(presentmentCurrency, forKey: .presentmentCurrency) } } } public class PaymentIntentProcessing : StripeEntity_1 { public var card:PaymentIntentProcessingCard? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case card case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) card = try container.decodeIfPresent(PaymentIntentProcessingCard.self, forKey: .card) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if card != nil { try container.encode(card, forKey: .card) } if type != nil { try container.encode(type, forKey: .type) } } } public class Shipping : StripeEntity_1 { public var address:Address? public var carrier:String? public var name:String? public var phone:String? public var trackingNumber:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case address case carrier case name case phone case trackingNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) address = try container.decodeIfPresent(Address.self, forKey: .address) carrier = try container.decodeIfPresent(String.self, forKey: .carrier) name = try container.decodeIfPresent(String.self, forKey: .name) phone = try container.decodeIfPresent(String.self, forKey: .phone) trackingNumber = try container.decodeIfPresent(String.self, forKey: .trackingNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if address != nil { try container.encode(address, forKey: .address) } if carrier != nil { try container.encode(carrier, forKey: .carrier) } if name != nil { try container.encode(name, forKey: .name) } if phone != nil { try container.encode(phone, forKey: .phone) } if trackingNumber != nil { try container.encode(trackingNumber, forKey: .trackingNumber) } } } public class PaymentIntentTransferData : StripeEntity_1 { public var amount:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } } } public class SessionAfterExpirationRecoveryOptions : INestedOptions, Codable { public var allowPromotionCodes:Bool? public var enabled:Bool? required public init(){} } public class SessionAutomaticTaxLiabilityOptions : INestedOptions, Codable { public var account:String? public var type:String? required public init(){} } public class SessionConsentCollectionPaymentMethodReuseAgreementOptions : INestedOptions, Codable { public var position:String? required public init(){} } public class SessionCustomFieldDropdownOptions : INestedOptions, Codable { public var defaultValue:String? public var options:[SessionCustomFieldDropdownOptionOptions]? required public init(){} } public class SessionCustomFieldLabelOptions : INestedOptions, Codable { public var custom:String? public var type:String? required public init(){} } public class SessionCustomFieldNumericOptions : INestedOptions, Codable { public var defaultValue:String? public var maximumLength:Int? public var minimumLength:Int? required public init(){} } public class SessionCustomFieldTextOptions : INestedOptions, Codable { public var defaultValue:String? public var maximumLength:Int? public var minimumLength:Int? required public init(){} } public class SessionCustomTextAfterSubmitOptions : INestedOptions, Codable { public var message:String? required public init(){} } public class SessionCustomTextShippingAddressOptions : INestedOptions, Codable { public var message:String? required public init(){} } public class SessionCustomTextSubmitOptions : INestedOptions, Codable { public var message:String? required public init(){} } public class SessionCustomTextTermsOfServiceAcceptanceOptions : INestedOptions, Codable { public var message:String? required public init(){} } public class SessionInvoiceCreationInvoiceDataOptions : INestedOptions, IHasMetadata, Codable { public var accountTaxIds:[String]? public var customFields:[SessionInvoiceCreationInvoiceDataCustomFieldOptions]? public var Description:String? public var footer:String? public var issuer:SessionInvoiceCreationInvoiceDataIssuerOptions? public var metadata:[String:String]? public var renderingOptions:SessionInvoiceCreationInvoiceDataRenderingOptionsOptions? required public init(){} } public class SessionLineItemAdjustableQuantityOptions : INestedOptions, Codable { public var enabled:Bool? public var maximum:Int? public var minimum:Int? required public init(){} } public class SessionLineItemPriceDataOptions : INestedOptions, Codable { public var currency:String? public var product:String? public var productData:SessionLineItemPriceDataProductDataOptions? public var recurring:SessionLineItemPriceDataRecurringOptions? public var taxBehavior:String? public var unitAmount:Int? public var unitAmountDecimal:Double? required public init(){} } public class SessionOptionalItemAdjustableQuantityOptions : INestedOptions, Codable { public var enabled:Bool? public var maximum:Int? public var minimum:Int? required public init(){} } public class SessionPaymentIntentDataTransferDataOptions : INestedOptions, Codable { public var amount:Int? public var destination:String? required public init(){} } public class SessionPaymentMethodOptionsAcssDebitOptions : INestedOptions, Codable { public var currency:String? public var mandateOptions:SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){} } public class SessionPaymentMethodOptionsAffirmOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsAfterpayClearpayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsAlipayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsAmazonPayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsAuBecsDebitOptions : INestedOptions, Codable { public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class SessionPaymentMethodOptionsBacsDebitOptions : INestedOptions, Codable { public var mandateOptions:SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class SessionPaymentMethodOptionsBancontactOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsBoletoOptions : INestedOptions, Codable { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsCardOptions : INestedOptions, Codable { public var installments:SessionPaymentMethodOptionsCardInstallmentsOptions? public var requestExtendedAuthorization:String? public var requestIncrementalAuthorization:String? public var requestMulticapture:String? public var requestOvercapture:String? public var requestThreeDSecure:String? public var restrictions:SessionPaymentMethodOptionsCardRestrictionsOptions? public var setupFutureUsage:String? public var statementDescriptorSuffixKana:String? public var statementDescriptorSuffixKanji:String? required public init(){} } public class SessionPaymentMethodOptionsCashappOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsCustomerBalanceOptions : INestedOptions, Codable { public var bankTransfer:SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions? public var fundingType:String? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsEpsOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsFpxOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsGiropayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsGrabpayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsIdealOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsKakaoPayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsKlarnaOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsKonbiniOptions : INestedOptions, Codable { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsKrCardOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsLinkOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsMobilepayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsMultibancoOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsNaverPayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsOxxoOptions : INestedOptions, Codable { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsP24Options : INestedOptions, Codable { public var setupFutureUsage:String? public var tosShownAndAccepted:Bool? required public init(){} } public class SessionPaymentMethodOptionsPayByBankOptions : INestedOptions, Codable { required public init(){} } public class SessionPaymentMethodOptionsPaycoOptions : INestedOptions, Codable { public var captureMethod:String? required public init(){} } public class SessionPaymentMethodOptionsPaynowOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsPaypalOptions : INestedOptions, Codable { public var captureMethod:String? public var preferredLocale:String? public var reference:String? public var riskCorrelationId:String? public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsPixOptions : INestedOptions, Codable { public var expiresAfterSeconds:Int? required public init(){} } public class SessionPaymentMethodOptionsRevolutPayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsSamsungPayOptions : INestedOptions, Codable { public var captureMethod:String? required public init(){} } public class SessionPaymentMethodOptionsSepaDebitOptions : INestedOptions, Codable { public var mandateOptions:SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class SessionPaymentMethodOptionsSofortOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class SessionPaymentMethodOptionsSwishOptions : INestedOptions, Codable { public var reference:String? required public init(){} } public class SessionPaymentMethodOptionsUsBankAccountOptions : INestedOptions, Codable { public var financialConnections:SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){} } public class SessionPaymentMethodOptionsWechatPayOptions : INestedOptions, Codable { public var appId:String? public var client:String? public var setupFutureUsage:String? required public init(){} } public class SessionShippingOptionShippingRateDataOptions : INestedOptions, IHasMetadata, Codable { public var deliveryEstimate:SessionShippingOptionShippingRateDataDeliveryEstimateOptions? public var displayName:String? public var fixedAmount:SessionShippingOptionShippingRateDataFixedAmountOptions? public var metadata:[String:String]? public var taxBehavior:String? public var taxCode:String? public var type:String? required public init(){} } public class SessionSubscriptionDataInvoiceSettingsOptions : INestedOptions, Codable { public var issuer:SessionSubscriptionDataInvoiceSettingsIssuerOptions? required public init(){} } public class SessionSubscriptionDataTransferDataOptions : INestedOptions, Codable { public var amountPercent:Double? public var destination:String? required public init(){} } public class SessionSubscriptionDataTrialSettingsOptions : INestedOptions, Codable { public var endBehavior:SessionSubscriptionDataTrialSettingsEndBehaviorOptions? required public init(){} } public class PaymentIntentMandateDataCustomerAcceptanceOptions : INestedOptions, Codable { public var acceptedAt:Date? public var offline:PaymentIntentMandateDataCustomerAcceptanceOfflineOptions? public var online:PaymentIntentMandateDataCustomerAcceptanceOnlineOptions? public var type:String? required public init(){} } public class PaymentIntentPaymentMethodDataAcssDebitOptions : INestedOptions, Codable { public var accountNumber:String? public var institutionNumber:String? public var transitNumber:String? required public init(){} } public class PaymentIntentPaymentMethodDataAffirmOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataAfterpayClearpayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataAlipayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataAlmaOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataAmazonPayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataAuBecsDebitOptions : INestedOptions, Codable { public var accountNumber:String? public var bsbNumber:String? required public init(){} } public class PaymentIntentPaymentMethodDataBacsDebitOptions : INestedOptions, Codable { public var accountNumber:String? public var sortCode:String? required public init(){} } public class PaymentIntentPaymentMethodDataBancontactOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataBillieOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataBillingDetailsOptions : INestedOptions, Codable { public var address:AddressOptions? public var email:String? public var name:String? public var phone:String? required public init(){} } public class PaymentIntentPaymentMethodDataBlikOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataBoletoOptions : INestedOptions, Codable { public var taxId:String? required public init(){} } public class PaymentIntentPaymentMethodDataCashappOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataCustomerBalanceOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataEpsOptions : INestedOptions, Codable { public var bank:String? required public init(){} } public class PaymentIntentPaymentMethodDataFpxOptions : INestedOptions, Codable { public var accountHolderType:String? public var bank:String? required public init(){} } public class PaymentIntentPaymentMethodDataGiropayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataGrabpayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataIdealOptions : INestedOptions, Codable { public var bank:String? required public init(){} } public class PaymentIntentPaymentMethodDataInteracPresentOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataKakaoPayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataKlarnaOptions : INestedOptions, Codable { public var dob:DobOptions? required public init(){} } public class PaymentIntentPaymentMethodDataKonbiniOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataKrCardOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataLinkOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataMobilepayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataMultibancoOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataNaverPayOptions : INestedOptions, Codable { public var funding:String? required public init(){} } public class PaymentIntentPaymentMethodDataNzBankAccountOptions : INestedOptions, Codable { public var accountHolderName:String? public var accountNumber:String? public var bankCode:String? public var branchCode:String? public var reference:String? public var suffix:String? required public init(){} } public class PaymentIntentPaymentMethodDataOxxoOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataP24Options : INestedOptions, Codable { public var bank:String? required public init(){} } public class PaymentIntentPaymentMethodDataPayByBankOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataPaycoOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataPaynowOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataPaypalOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataPixOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataPromptpayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataRadarOptionsOptions : INestedOptions, Codable { public var session:String? required public init(){} } public class PaymentIntentPaymentMethodDataRevolutPayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataSamsungPayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataSatispayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataSepaDebitOptions : INestedOptions, Codable { public var iban:String? required public init(){} } public class PaymentIntentPaymentMethodDataSofortOptions : INestedOptions, Codable { public var country:String? required public init(){} } public class PaymentIntentPaymentMethodDataSwishOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataTwintOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataUsBankAccountOptions : INestedOptions, Codable { public var accountHolderType:String? public var accountNumber:String? public var accountType:String? public var financialConnectionsAccount:String? public var routingNumber:String? required public init(){} } public class PaymentIntentPaymentMethodDataWechatPayOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodDataZipOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions, Codable { public var mandateOptions:PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsAffirmOptions : INestedOptions, Codable { public var captureMethod:String? public var preferredLocale:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsAfterpayClearpayOptions : INestedOptions, Codable { public var captureMethod:String? public var reference:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsAlipayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsAlmaOptions : INestedOptions, Codable { public var captureMethod:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsAmazonPayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsAuBecsDebitOptions : INestedOptions, Codable { public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions, Codable { public var mandateOptions:PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsBancontactOptions : INestedOptions, Codable { public var preferredLanguage:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsBlikOptions : INestedOptions, Codable { public var code:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsBoletoOptions : INestedOptions, Codable { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions, Codable { public var captureMethod:String? public var cvcToken:String? public var installments:PaymentIntentPaymentMethodOptionsCardInstallmentsOptions? public var mandateOptions:PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions? public var moto:Bool? public var network:String? public var requestExtendedAuthorization:String? public var requestIncrementalAuthorization:String? public var requestMulticapture:String? public var requestOvercapture:String? public var requestThreeDSecure:String? public var requireCvcRecollection:Bool? public var setupFutureUsage:String? public var statementDescriptorSuffixKana:String? public var statementDescriptorSuffixKanji:String? public var threeDSecure:PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardPresentOptions : INestedOptions, Codable { public var requestExtendedAuthorization:Bool? public var requestIncrementalAuthorizationSupport:Bool? public var routing:PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions? required public init(){} } public class PaymentIntentPaymentMethodOptionsCashappOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCustomerBalanceOptions : INestedOptions, Codable { public var bankTransfer:PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions? public var fundingType:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsEpsOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsFpxOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsGiropayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsGrabpayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsIdealOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsInteracPresentOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodOptionsKakaoPayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsKlarnaOptions : INestedOptions, Codable { public var captureMethod:String? public var preferredLocale:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsKonbiniOptions : INestedOptions, Codable { public var confirmationNumber:String? public var expiresAfterDays:Int? public var expiresAt:Date? public var productDescription:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsKrCardOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsLinkOptions : INestedOptions, Codable { public var captureMethod:String? public var persistentToken:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsMobilepayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsMultibancoOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsNaverPayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsNzBankAccountOptions : INestedOptions, Codable { public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsOxxoOptions : INestedOptions, Codable { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsP24Options : INestedOptions, Codable { public var setupFutureUsage:String? public var tosShownAndAccepted:Bool? required public init(){} } public class PaymentIntentPaymentMethodOptionsPayByBankOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentPaymentMethodOptionsPaycoOptions : INestedOptions, Codable { public var captureMethod:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsPaynowOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsPaypalOptions : INestedOptions, Codable { public var captureMethod:String? public var preferredLocale:String? public var reference:String? public var riskCorrelationId:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsPixOptions : INestedOptions, Codable { public var expiresAfterSeconds:Int? public var expiresAt:Date? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsPromptpayOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsRevolutPayOptions : INestedOptions, Codable { public var captureMethod:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsSamsungPayOptions : INestedOptions, Codable { public var captureMethod:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions, Codable { public var mandateOptions:PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsSofortOptions : INestedOptions, Codable { public var preferredLanguage:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsSwishOptions : INestedOptions, Codable { public var reference:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsTwintOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOptions, Codable { public var financialConnections:PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions? public var mandateOptions:PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions? public var networks:PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions? public var preferredSettlementSpeed:String? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsWechatPayOptions : INestedOptions, Codable { public var appId:String? public var client:String? public var setupFutureUsage:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsZipOptions : INestedOptions, Codable { public var setupFutureUsage:String? required public init(){} } public class CustomerCashBalanceSettingsOptions : INestedOptions, Codable { public var reconciliationMode:String? required public init(){} } public class CustomerInvoiceSettingsCustomFieldOptions : INestedOptions, Codable { public var name:String? public var value:String? required public init(){} } public class CustomerInvoiceSettingsRenderingOptionsOptions : INestedOptions, Codable { public var amountTaxDisplay:String? public var template:String? required public init(){} } public class AnyOf : IAnyOf, Codable { public var value:String? public var type:String? required public init(){} } public protocol IAnyOf { var value:String? { get set } var type:String? { get set } } public class SessionAfterExpirationRecovery : StripeEntity_1 { public var allowPromotionCodes:Bool? public var enabled:Bool? public var expiresAt:Date? public var url:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case allowPromotionCodes case enabled case expiresAt case url } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) allowPromotionCodes = try container.decodeIfPresent(Bool.self, forKey: .allowPromotionCodes) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) url = try container.decodeIfPresent(String.self, forKey: .url) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if allowPromotionCodes != nil { try container.encode(allowPromotionCodes, forKey: .allowPromotionCodes) } if enabled != nil { try container.encode(enabled, forKey: .enabled) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if url != nil { try container.encode(url, forKey: .url) } } } public class SessionAutomaticTaxLiability : StripeEntity_1 { public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if type != nil { try container.encode(type, forKey: .type) } } } public class SessionCollectedInformationShippingDetails : StripeEntity_1 { public var address:Address? public var name:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case address case name } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) address = try container.decodeIfPresent(Address.self, forKey: .address) name = try container.decodeIfPresent(String.self, forKey: .name) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if address != nil { try container.encode(address, forKey: .address) } if name != nil { try container.encode(name, forKey: .name) } } } public class SessionConsentCollectionPaymentMethodReuseAgreement : StripeEntity_1 { public var position:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case position } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) position = try container.decodeIfPresent(String.self, forKey: .position) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if position != nil { try container.encode(position, forKey: .position) } } } public class SessionCustomFieldDropdown : StripeEntity_1 { public var defaultValue:String? public var options:[SessionCustomFieldDropdownOption]? public var value:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case defaultValue case options case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) defaultValue = try container.decodeIfPresent(String.self, forKey: .defaultValue) options = try container.decodeIfPresent([SessionCustomFieldDropdownOption].self, forKey: .options) ?? [] value = try container.decodeIfPresent(String.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if defaultValue != nil { try container.encode(defaultValue, forKey: .defaultValue) } if options != nil { try container.encode(options, forKey: .options) } if value != nil { try container.encode(value, forKey: .value) } } } public class SessionCustomFieldLabel : StripeEntity_1 { public var custom:String? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case custom case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) custom = try container.decodeIfPresent(String.self, forKey: .custom) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if custom != nil { try container.encode(custom, forKey: .custom) } if type != nil { try container.encode(type, forKey: .type) } } } public class SessionCustomFieldNumeric : StripeEntity_1 { public var defaultValue:String? public var maximumLength:Int? public var minimumLength:Int? public var value:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case defaultValue case maximumLength case minimumLength case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) defaultValue = try container.decodeIfPresent(String.self, forKey: .defaultValue) maximumLength = try container.decodeIfPresent(Int.self, forKey: .maximumLength) minimumLength = try container.decodeIfPresent(Int.self, forKey: .minimumLength) value = try container.decodeIfPresent(String.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if defaultValue != nil { try container.encode(defaultValue, forKey: .defaultValue) } if maximumLength != nil { try container.encode(maximumLength, forKey: .maximumLength) } if minimumLength != nil { try container.encode(minimumLength, forKey: .minimumLength) } if value != nil { try container.encode(value, forKey: .value) } } } public class SessionCustomFieldText : StripeEntity_1 { public var defaultValue:String? public var maximumLength:Int? public var minimumLength:Int? public var value:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case defaultValue case maximumLength case minimumLength case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) defaultValue = try container.decodeIfPresent(String.self, forKey: .defaultValue) maximumLength = try container.decodeIfPresent(Int.self, forKey: .maximumLength) minimumLength = try container.decodeIfPresent(Int.self, forKey: .minimumLength) value = try container.decodeIfPresent(String.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if defaultValue != nil { try container.encode(defaultValue, forKey: .defaultValue) } if maximumLength != nil { try container.encode(maximumLength, forKey: .maximumLength) } if minimumLength != nil { try container.encode(minimumLength, forKey: .minimumLength) } if value != nil { try container.encode(value, forKey: .value) } } } public class SessionCustomTextAfterSubmit : StripeEntity_1 { public var message:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case message } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) message = try container.decodeIfPresent(String.self, forKey: .message) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if message != nil { try container.encode(message, forKey: .message) } } } public class SessionCustomTextShippingAddress : StripeEntity_1 { public var message:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case message } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) message = try container.decodeIfPresent(String.self, forKey: .message) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if message != nil { try container.encode(message, forKey: .message) } } } public class SessionCustomTextSubmit : StripeEntity_1 { public var message:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case message } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) message = try container.decodeIfPresent(String.self, forKey: .message) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if message != nil { try container.encode(message, forKey: .message) } } } public class SessionCustomTextTermsOfServiceAcceptance : StripeEntity_1 { public var message:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case message } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) message = try container.decodeIfPresent(String.self, forKey: .message) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if message != nil { try container.encode(message, forKey: .message) } } } public class Address : StripeEntity_1
{ public var city:String? public var country:String? public var line1:String? public var line2:String? public var postalCode:String? public var state:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case city case country case line1 case line2 case postalCode case state } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) city = try container.decodeIfPresent(String.self, forKey: .city) country = try container.decodeIfPresent(String.self, forKey: .country) line1 = try container.decodeIfPresent(String.self, forKey: .line1) line2 = try container.decodeIfPresent(String.self, forKey: .line2) postalCode = try container.decodeIfPresent(String.self, forKey: .postalCode) state = try container.decodeIfPresent(String.self, forKey: .state) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if city != nil { try container.encode(city, forKey: .city) } if country != nil { try container.encode(country, forKey: .country) } if line1 != nil { try container.encode(line1, forKey: .line1) } if line2 != nil { try container.encode(line2, forKey: .line2) } if postalCode != nil { try container.encode(postalCode, forKey: .postalCode) } if state != nil { try container.encode(state, forKey: .state) } } } public class SessionCustomerDetailsTaxId : StripeEntity_1 { public var type:String? public var value:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case type case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decodeIfPresent(String.self, forKey: .type) value = try container.decodeIfPresent(String.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if type != nil { try container.encode(type, forKey: .type) } if value != nil { try container.encode(value, forKey: .value) } } } public class SessionInvoiceCreationInvoiceData : StripeEntity_1, IHasMetadata { public var customFields:[SessionInvoiceCreationInvoiceDataCustomField]? public var Description:String? public var footer:String? public var issuer:SessionInvoiceCreationInvoiceDataIssuer? public var metadata:[String:String]? public var renderingOptions:SessionInvoiceCreationInvoiceDataRenderingOptions? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customFields case Description case footer case issuer case metadata case renderingOptions } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customFields = try container.decodeIfPresent([SessionInvoiceCreationInvoiceDataCustomField].self, forKey: .customFields) ?? [] Description = try container.decodeIfPresent(String.self, forKey: .Description) footer = try container.decodeIfPresent(String.self, forKey: .footer) issuer = try container.decodeIfPresent(SessionInvoiceCreationInvoiceDataIssuer.self, forKey: .issuer) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] renderingOptions = try container.decodeIfPresent(SessionInvoiceCreationInvoiceDataRenderingOptions.self, forKey: .renderingOptions) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customFields != nil { try container.encode(customFields, forKey: .customFields) } if Description != nil { try container.encode(Description, forKey: .Description) } if footer != nil { try container.encode(footer, forKey: .footer) } if issuer != nil { try container.encode(issuer, forKey: .issuer) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if renderingOptions != nil { try container.encode(renderingOptions, forKey: .renderingOptions) } } } public class SessionOptionalItemAdjustableQuantity : StripeEntity_1 { public var enabled:Bool? public var maximum:Int? public var minimum:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled case maximum case minimum } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) maximum = try container.decodeIfPresent(Int.self, forKey: .maximum) minimum = try container.decodeIfPresent(Int.self, forKey: .minimum) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } if maximum != nil { try container.encode(maximum, forKey: .maximum) } if minimum != nil { try container.encode(minimum, forKey: .minimum) } } } public class SessionPaymentMethodOptionsAcssDebit : StripeEntity_1 { public var currency:String? public var mandateOptions:SessionPaymentMethodOptionsAcssDebitMandateOptions? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currency case mandateOptions case setupFutureUsage case targetDate case verificationMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currency = try container.decodeIfPresent(String.self, forKey: .currency) mandateOptions = try container.decodeIfPresent(SessionPaymentMethodOptionsAcssDebitMandateOptions.self, forKey: .mandateOptions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) verificationMethod = try container.decodeIfPresent(String.self, forKey: .verificationMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currency != nil { try container.encode(currency, forKey: .currency) } if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } if verificationMethod != nil { try container.encode(verificationMethod, forKey: .verificationMethod) } } } public class SessionPaymentMethodOptionsAffirm : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsAfterpayClearpay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsAlipay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsAmazonPay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsAuBecsDebit : StripeEntity_1 { public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class SessionPaymentMethodOptionsBacsDebit : StripeEntity_1 { public var mandateOptions:SessionPaymentMethodOptionsBacsDebitMandateOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(SessionPaymentMethodOptionsBacsDebitMandateOptions.self, forKey: .mandateOptions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class SessionPaymentMethodOptionsBancontact : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsBoleto : StripeEntity_1 { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterDays case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterDays = try container.decodeIfPresent(Int.self, forKey: .expiresAfterDays) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterDays != nil { try container.encode(expiresAfterDays, forKey: .expiresAfterDays) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsCard : StripeEntity_1 { public var installments:SessionPaymentMethodOptionsCardInstallments? public var requestExtendedAuthorization:String? public var requestIncrementalAuthorization:String? public var requestMulticapture:String? public var requestOvercapture:String? public var requestThreeDSecure:String? public var restrictions:SessionPaymentMethodOptionsCardRestrictions? public var setupFutureUsage:String? public var statementDescriptorSuffixKana:String? public var statementDescriptorSuffixKanji:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case installments case requestExtendedAuthorization case requestIncrementalAuthorization case requestMulticapture case requestOvercapture case requestThreeDSecure case restrictions case setupFutureUsage case statementDescriptorSuffixKana case statementDescriptorSuffixKanji } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) installments = try container.decodeIfPresent(SessionPaymentMethodOptionsCardInstallments.self, forKey: .installments) requestExtendedAuthorization = try container.decodeIfPresent(String.self, forKey: .requestExtendedAuthorization) requestIncrementalAuthorization = try container.decodeIfPresent(String.self, forKey: .requestIncrementalAuthorization) requestMulticapture = try container.decodeIfPresent(String.self, forKey: .requestMulticapture) requestOvercapture = try container.decodeIfPresent(String.self, forKey: .requestOvercapture) requestThreeDSecure = try container.decodeIfPresent(String.self, forKey: .requestThreeDSecure) restrictions = try container.decodeIfPresent(SessionPaymentMethodOptionsCardRestrictions.self, forKey: .restrictions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) statementDescriptorSuffixKana = try container.decodeIfPresent(String.self, forKey: .statementDescriptorSuffixKana) statementDescriptorSuffixKanji = try container.decodeIfPresent(String.self, forKey: .statementDescriptorSuffixKanji) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if installments != nil { try container.encode(installments, forKey: .installments) } if requestExtendedAuthorization != nil { try container.encode(requestExtendedAuthorization, forKey: .requestExtendedAuthorization) } if requestIncrementalAuthorization != nil { try container.encode(requestIncrementalAuthorization, forKey: .requestIncrementalAuthorization) } if requestMulticapture != nil { try container.encode(requestMulticapture, forKey: .requestMulticapture) } if requestOvercapture != nil { try container.encode(requestOvercapture, forKey: .requestOvercapture) } if requestThreeDSecure != nil { try container.encode(requestThreeDSecure, forKey: .requestThreeDSecure) } if restrictions != nil { try container.encode(restrictions, forKey: .restrictions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if statementDescriptorSuffixKana != nil { try container.encode(statementDescriptorSuffixKana, forKey: .statementDescriptorSuffixKana) } if statementDescriptorSuffixKanji != nil { try container.encode(statementDescriptorSuffixKanji, forKey: .statementDescriptorSuffixKanji) } } } public class SessionPaymentMethodOptionsCashapp : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsCustomerBalance : StripeEntity_1 { public var bankTransfer:SessionPaymentMethodOptionsCustomerBalanceBankTransfer? public var fundingType:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bankTransfer case fundingType case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bankTransfer = try container.decodeIfPresent(SessionPaymentMethodOptionsCustomerBalanceBankTransfer.self, forKey: .bankTransfer) fundingType = try container.decodeIfPresent(String.self, forKey: .fundingType) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bankTransfer != nil { try container.encode(bankTransfer, forKey: .bankTransfer) } if fundingType != nil { try container.encode(fundingType, forKey: .fundingType) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsEps : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsFpx : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsGiropay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsGrabpay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsIdeal : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsKakaoPay : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsKlarna : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsKonbini : StripeEntity_1 { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterDays case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterDays = try container.decodeIfPresent(Int.self, forKey: .expiresAfterDays) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterDays != nil { try container.encode(expiresAfterDays, forKey: .expiresAfterDays) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsKrCard : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsLink : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsMobilepay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsMultibanco : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsNaverPay : StripeEntity_1 { public var captureMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } } } public class SessionPaymentMethodOptionsOxxo : StripeEntity_1 { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterDays case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterDays = try container.decodeIfPresent(Int.self, forKey: .expiresAfterDays) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterDays != nil { try container.encode(expiresAfterDays, forKey: .expiresAfterDays) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsP24 : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsPayco : StripeEntity_1 { public var captureMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } } } public class SessionPaymentMethodOptionsPaynow : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsPaypal : StripeEntity_1 { public var captureMethod:String? public var preferredLocale:String? public var reference:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case preferredLocale case reference case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) preferredLocale = try container.decodeIfPresent(String.self, forKey: .preferredLocale) reference = try container.decodeIfPresent(String.self, forKey: .reference) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if preferredLocale != nil { try container.encode(preferredLocale, forKey: .preferredLocale) } if reference != nil { try container.encode(reference, forKey: .reference) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsPix : StripeEntity_1 { public var expiresAfterSeconds:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterSeconds } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterSeconds = try container.decodeIfPresent(Int.self, forKey: .expiresAfterSeconds) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterSeconds != nil { try container.encode(expiresAfterSeconds, forKey: .expiresAfterSeconds) } } } public class SessionPaymentMethodOptionsRevolutPay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsSamsungPay : StripeEntity_1 { public var captureMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } } } public class SessionPaymentMethodOptionsSepaDebit : StripeEntity_1 { public var mandateOptions:SessionPaymentMethodOptionsSepaDebitMandateOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(SessionPaymentMethodOptionsSepaDebitMandateOptions.self, forKey: .mandateOptions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class SessionPaymentMethodOptionsSofort : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class SessionPaymentMethodOptionsSwish : StripeEntity_1 { public var reference:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case reference } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) reference = try container.decodeIfPresent(String.self, forKey: .reference) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if reference != nil { try container.encode(reference, forKey: .reference) } } } public class SessionPaymentMethodOptionsUsBankAccount : StripeEntity_1 { public var financialConnections:SessionPaymentMethodOptionsUsBankAccountFinancialConnections? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case financialConnections case setupFutureUsage case targetDate case verificationMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) financialConnections = try container.decodeIfPresent(SessionPaymentMethodOptionsUsBankAccountFinancialConnections.self, forKey: .financialConnections) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) verificationMethod = try container.decodeIfPresent(String.self, forKey: .verificationMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if financialConnections != nil { try container.encode(financialConnections, forKey: .financialConnections) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } if verificationMethod != nil { try container.encode(verificationMethod, forKey: .verificationMethod) } } } public class SessionShippingCostTax : StripeEntity_1 { public var amount:Int? public var rate:TaxRate? public var taxabilityReason:String? public var taxableAmount:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case rate case taxabilityReason case taxableAmount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) rate = try container.decodeIfPresent(TaxRate.self, forKey: .rate) taxabilityReason = try container.decodeIfPresent(String.self, forKey: .taxabilityReason) taxableAmount = try container.decodeIfPresent(Int.self, forKey: .taxableAmount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if rate != nil { try container.encode(rate, forKey: .rate) } if taxabilityReason != nil { try container.encode(taxabilityReason, forKey: .taxabilityReason) } if taxableAmount != nil { try container.encode(taxableAmount, forKey: .taxableAmount) } } } public class SessionTotalDetailsBreakdown : StripeEntity_1 { public var discounts:[SessionTotalDetailsBreakdownDiscount]? public var taxes:[SessionTotalDetailsBreakdownTax]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case discounts case taxes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) discounts = try container.decodeIfPresent([SessionTotalDetailsBreakdownDiscount].self, forKey: .discounts) ?? [] taxes = try container.decodeIfPresent([SessionTotalDetailsBreakdownTax].self, forKey: .taxes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if discounts != nil { try container.encode(discounts, forKey: .discounts) } if taxes != nil { try container.encode(taxes, forKey: .taxes) } } } public class StripeEntity : IStripeEntity, Codable { required public init(){} } public class StripeResponse : StripeResponseBase { public var content:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case content } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) content = try container.decodeIfPresent(String.self, forKey: .content) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if content != nil { try container.encode(content, forKey: .content) } } } public class Discount : StripeEntity_1, IHasId, IHasObject { public var id:String? public var object:String? public var checkoutSession:String? public var coupon:Coupon? public var end:Date? public var invoice:String? public var invoiceItem:String? public var start:Date? public var subscription:String? public var subscriptionItem:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case checkoutSession case coupon case end case invoice case invoiceItem case start case subscription case subscriptionItem } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) checkoutSession = try container.decodeIfPresent(String.self, forKey: .checkoutSession) coupon = try container.decodeIfPresent(Coupon.self, forKey: .coupon) end = try container.decodeIfPresent(Date.self, forKey: .end) invoice = try container.decodeIfPresent(String.self, forKey: .invoice) invoiceItem = try container.decodeIfPresent(String.self, forKey: .invoiceItem) start = try container.decodeIfPresent(Date.self, forKey: .start) subscription = try container.decodeIfPresent(String.self, forKey: .subscription) subscriptionItem = try container.decodeIfPresent(String.self, forKey: .subscriptionItem) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if checkoutSession != nil { try container.encode(checkoutSession, forKey: .checkoutSession) } if coupon != nil { try container.encode(coupon, forKey: .coupon) } if end != nil { try container.encode(end, forKey: .end) } if invoice != nil { try container.encode(invoice, forKey: .invoice) } if invoiceItem != nil { try container.encode(invoiceItem, forKey: .invoiceItem) } if start != nil { try container.encode(start, forKey: .start) } if subscription != nil { try container.encode(subscription, forKey: .subscription) } if subscriptionItem != nil { try container.encode(subscriptionItem, forKey: .subscriptionItem) } } } public class PriceCurrencyOptions : StripeEntity_1 { public var customUnitAmount:PriceCurrencyOptionsCustomUnitAmount? public var taxBehavior:String? public var tiers:[PriceCurrencyOptionsTier]? public var unitAmount:Int? public var unitAmountDecimal:Double? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customUnitAmount case taxBehavior case tiers case unitAmount case unitAmountDecimal } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customUnitAmount = try container.decodeIfPresent(PriceCurrencyOptionsCustomUnitAmount.self, forKey: .customUnitAmount) taxBehavior = try container.decodeIfPresent(String.self, forKey: .taxBehavior) tiers = try container.decodeIfPresent([PriceCurrencyOptionsTier].self, forKey: .tiers) ?? [] unitAmount = try container.decodeIfPresent(Int.self, forKey: .unitAmount) unitAmountDecimal = try container.decodeIfPresent(Double.self, forKey: .unitAmountDecimal) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customUnitAmount != nil { try container.encode(customUnitAmount, forKey: .customUnitAmount) } if taxBehavior != nil { try container.encode(taxBehavior, forKey: .taxBehavior) } if tiers != nil { try container.encode(tiers, forKey: .tiers) } if unitAmount != nil { try container.encode(unitAmount, forKey: .unitAmount) } if unitAmountDecimal != nil { try container.encode(unitAmountDecimal, forKey: .unitAmountDecimal) } } } public class PriceCustomUnitAmount : StripeEntity_1 { public var maximum:Int? public var minimum:Int? public var preset:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case maximum case minimum case preset } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) maximum = try container.decodeIfPresent(Int.self, forKey: .maximum) minimum = try container.decodeIfPresent(Int.self, forKey: .minimum) preset = try container.decodeIfPresent(Int.self, forKey: .preset) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if maximum != nil { try container.encode(maximum, forKey: .maximum) } if minimum != nil { try container.encode(minimum, forKey: .minimum) } if preset != nil { try container.encode(preset, forKey: .preset) } } } public class PriceRecurring : StripeEntity_1 { public var interval:String? public var intervalCount:Int? public var meter:String? public var trialPeriodDays:Int? public var usageType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case interval case intervalCount case meter case trialPeriodDays case usageType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) interval = try container.decodeIfPresent(String.self, forKey: .interval) intervalCount = try container.decodeIfPresent(Int.self, forKey: .intervalCount) meter = try container.decodeIfPresent(String.self, forKey: .meter) trialPeriodDays = try container.decodeIfPresent(Int.self, forKey: .trialPeriodDays) usageType = try container.decodeIfPresent(String.self, forKey: .usageType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if interval != nil { try container.encode(interval, forKey: .interval) } if intervalCount != nil { try container.encode(intervalCount, forKey: .intervalCount) } if meter != nil { try container.encode(meter, forKey: .meter) } if trialPeriodDays != nil { try container.encode(trialPeriodDays, forKey: .trialPeriodDays) } if usageType != nil { try container.encode(usageType, forKey: .usageType) } } } public class PriceTier : StripeEntity_1 { public var flatAmount:Int? public var flatAmountDecimal:Double? public var unitAmount:Int? public var unitAmountDecimal:Double? public var upTo:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case flatAmount case flatAmountDecimal case unitAmount case unitAmountDecimal case upTo } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) flatAmount = try container.decodeIfPresent(Int.self, forKey: .flatAmount) flatAmountDecimal = try container.decodeIfPresent(Double.self, forKey: .flatAmountDecimal) unitAmount = try container.decodeIfPresent(Int.self, forKey: .unitAmount) unitAmountDecimal = try container.decodeIfPresent(Double.self, forKey: .unitAmountDecimal) upTo = try container.decodeIfPresent(Int.self, forKey: .upTo) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if flatAmount != nil { try container.encode(flatAmount, forKey: .flatAmount) } if flatAmountDecimal != nil { try container.encode(flatAmountDecimal, forKey: .flatAmountDecimal) } if unitAmount != nil { try container.encode(unitAmount, forKey: .unitAmount) } if unitAmountDecimal != nil { try container.encode(unitAmountDecimal, forKey: .unitAmountDecimal) } if upTo != nil { try container.encode(upTo, forKey: .upTo) } } } public class PriceTransformQuantity : StripeEntity_1 { public var divideBy:Int? public var round:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case divideBy case round } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) divideBy = try container.decodeIfPresent(Int.self, forKey: .divideBy) round = try container.decodeIfPresent(String.self, forKey: .round) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if divideBy != nil { try container.encode(divideBy, forKey: .divideBy) } if round != nil { try container.encode(round, forKey: .round) } } } public class TaxRate : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var active:Bool? public var country:String? public var created:Date? public var Description:String? public var displayName:String? public var effectivePercentage:Double? public var flatAmount:TaxRateFlatAmount? public var inclusive:Bool? public var jurisdiction:String? public var jurisdictionLevel:String? public var livemode:Bool? public var metadata:[String:String]? public var percentage:Double? public var rateType:String? public var state:String? public var taxType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case active case country case created case Description case displayName case effectivePercentage case flatAmount case inclusive case jurisdiction case jurisdictionLevel case livemode case metadata case percentage case rateType case state case taxType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) active = try container.decodeIfPresent(Bool.self, forKey: .active) country = try container.decodeIfPresent(String.self, forKey: .country) created = try container.decodeIfPresent(Date.self, forKey: .created) Description = try container.decodeIfPresent(String.self, forKey: .Description) displayName = try container.decodeIfPresent(String.self, forKey: .displayName) effectivePercentage = try container.decodeIfPresent(Double.self, forKey: .effectivePercentage) flatAmount = try container.decodeIfPresent(TaxRateFlatAmount.self, forKey: .flatAmount) inclusive = try container.decodeIfPresent(Bool.self, forKey: .inclusive) jurisdiction = try container.decodeIfPresent(String.self, forKey: .jurisdiction) jurisdictionLevel = try container.decodeIfPresent(String.self, forKey: .jurisdictionLevel) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] percentage = try container.decodeIfPresent(Double.self, forKey: .percentage) rateType = try container.decodeIfPresent(String.self, forKey: .rateType) state = try container.decodeIfPresent(String.self, forKey: .state) taxType = try container.decodeIfPresent(String.self, forKey: .taxType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if active != nil { try container.encode(active, forKey: .active) } if country != nil { try container.encode(country, forKey: .country) } if created != nil { try container.encode(created, forKey: .created) } if Description != nil { try container.encode(Description, forKey: .Description) } if displayName != nil { try container.encode(displayName, forKey: .displayName) } if effectivePercentage != nil { try container.encode(effectivePercentage, forKey: .effectivePercentage) } if flatAmount != nil { try container.encode(flatAmount, forKey: .flatAmount) } if inclusive != nil { try container.encode(inclusive, forKey: .inclusive) } if jurisdiction != nil { try container.encode(jurisdiction, forKey: .jurisdiction) } if jurisdictionLevel != nil { try container.encode(jurisdictionLevel, forKey: .jurisdictionLevel) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if percentage != nil { try container.encode(percentage, forKey: .percentage) } if rateType != nil { try container.encode(rateType, forKey: .rateType) } if state != nil { try container.encode(state, forKey: .state) } if taxType != nil { try container.encode(taxType, forKey: .taxType) } } } public class PaymentIntentAmountDetailsTip : StripeEntity_1 { public var amount:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } } } public class PaymentMethod : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var acssDebit:PaymentMethodAcssDebit? public var affirm:PaymentMethodAffirm? public var afterpayClearpay:PaymentMethodAfterpayClearpay? public var alipay:PaymentMethodAlipay? public var allowRedisplay:String? public var alma:PaymentMethodAlma? public var amazonPay:PaymentMethodAmazonPay? public var auBecsDebit:PaymentMethodAuBecsDebit? public var bacsDebit:PaymentMethodBacsDebit? public var bancontact:PaymentMethodBancontact? public var billie:PaymentMethodBillie? public var billingDetails:PaymentMethodBillingDetails? public var blik:PaymentMethodBlik? public var boleto:PaymentMethodBoleto? public var card:PaymentMethodCard? public var cardPresent:PaymentMethodCardPresent? public var cashapp:PaymentMethodCashapp? public var created:Date? public var customerBalance:PaymentMethodCustomerBalance? public var eps:PaymentMethodEps? public var fpx:PaymentMethodFpx? public var giropay:PaymentMethodGiropay? public var grabpay:PaymentMethodGrabpay? public var ideal:PaymentMethodIdeal? public var interacPresent:PaymentMethodInteracPresent? public var kakaoPay:PaymentMethodKakaoPay? public var klarna:PaymentMethodKlarna? public var konbini:PaymentMethodKonbini? public var krCard:PaymentMethodKrCard? public var link:PaymentMethodLink? public var livemode:Bool? public var metadata:[String:String]? public var mobilepay:PaymentMethodMobilepay? public var multibanco:PaymentMethodMultibanco? public var naverPay:PaymentMethodNaverPay? public var nzBankAccount:PaymentMethodNzBankAccount? public var oxxo:PaymentMethodOxxo? public var p24:PaymentMethodP24? public var payByBank:PaymentMethodPayByBank? public var payco:PaymentMethodPayco? public var paynow:PaymentMethodPaynow? public var paypal:PaymentMethodPaypal? public var pix:PaymentMethodPix? public var promptpay:PaymentMethodPromptpay? public var radarOptions:PaymentMethodRadarOptions? public var revolutPay:PaymentMethodRevolutPay? public var samsungPay:PaymentMethodSamsungPay? public var satispay:PaymentMethodSatispay? public var sepaDebit:PaymentMethodSepaDebit? public var sofort:PaymentMethodSofort? public var swish:PaymentMethodSwish? public var twint:PaymentMethodTwint? public var type:String? public var usBankAccount:PaymentMethodUsBankAccount? public var wechatPay:PaymentMethodWechatPay? public var zip:PaymentMethodZip? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case acssDebit case affirm case afterpayClearpay case alipay case allowRedisplay case alma case amazonPay case auBecsDebit case bacsDebit case bancontact case billie case billingDetails case blik case boleto case card case cardPresent case cashapp case created case customerBalance case eps case fpx case giropay case grabpay case ideal case interacPresent case kakaoPay case klarna case konbini case krCard case link case livemode case metadata case mobilepay case multibanco case naverPay case nzBankAccount case oxxo case p24 case payByBank case payco case paynow case paypal case pix case promptpay case radarOptions case revolutPay case samsungPay case satispay case sepaDebit case sofort case swish case twint case type case usBankAccount case wechatPay case zip } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) acssDebit = try container.decodeIfPresent(PaymentMethodAcssDebit.self, forKey: .acssDebit) affirm = try container.decodeIfPresent(PaymentMethodAffirm.self, forKey: .affirm) afterpayClearpay = try container.decodeIfPresent(PaymentMethodAfterpayClearpay.self, forKey: .afterpayClearpay) alipay = try container.decodeIfPresent(PaymentMethodAlipay.self, forKey: .alipay) allowRedisplay = try container.decodeIfPresent(String.self, forKey: .allowRedisplay) alma = try container.decodeIfPresent(PaymentMethodAlma.self, forKey: .alma) amazonPay = try container.decodeIfPresent(PaymentMethodAmazonPay.self, forKey: .amazonPay) auBecsDebit = try container.decodeIfPresent(PaymentMethodAuBecsDebit.self, forKey: .auBecsDebit) bacsDebit = try container.decodeIfPresent(PaymentMethodBacsDebit.self, forKey: .bacsDebit) bancontact = try container.decodeIfPresent(PaymentMethodBancontact.self, forKey: .bancontact) billie = try container.decodeIfPresent(PaymentMethodBillie.self, forKey: .billie) billingDetails = try container.decodeIfPresent(PaymentMethodBillingDetails.self, forKey: .billingDetails) blik = try container.decodeIfPresent(PaymentMethodBlik.self, forKey: .blik) boleto = try container.decodeIfPresent(PaymentMethodBoleto.self, forKey: .boleto) card = try container.decodeIfPresent(PaymentMethodCard.self, forKey: .card) cardPresent = try container.decodeIfPresent(PaymentMethodCardPresent.self, forKey: .cardPresent) cashapp = try container.decodeIfPresent(PaymentMethodCashapp.self, forKey: .cashapp) created = try container.decodeIfPresent(Date.self, forKey: .created) customerBalance = try container.decodeIfPresent(PaymentMethodCustomerBalance.self, forKey: .customerBalance) eps = try container.decodeIfPresent(PaymentMethodEps.self, forKey: .eps) fpx = try container.decodeIfPresent(PaymentMethodFpx.self, forKey: .fpx) giropay = try container.decodeIfPresent(PaymentMethodGiropay.self, forKey: .giropay) grabpay = try container.decodeIfPresent(PaymentMethodGrabpay.self, forKey: .grabpay) ideal = try container.decodeIfPresent(PaymentMethodIdeal.self, forKey: .ideal) interacPresent = try container.decodeIfPresent(PaymentMethodInteracPresent.self, forKey: .interacPresent) kakaoPay = try container.decodeIfPresent(PaymentMethodKakaoPay.self, forKey: .kakaoPay) klarna = try container.decodeIfPresent(PaymentMethodKlarna.self, forKey: .klarna) konbini = try container.decodeIfPresent(PaymentMethodKonbini.self, forKey: .konbini) krCard = try container.decodeIfPresent(PaymentMethodKrCard.self, forKey: .krCard) link = try container.decodeIfPresent(PaymentMethodLink.self, forKey: .link) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] mobilepay = try container.decodeIfPresent(PaymentMethodMobilepay.self, forKey: .mobilepay) multibanco = try container.decodeIfPresent(PaymentMethodMultibanco.self, forKey: .multibanco) naverPay = try container.decodeIfPresent(PaymentMethodNaverPay.self, forKey: .naverPay) nzBankAccount = try container.decodeIfPresent(PaymentMethodNzBankAccount.self, forKey: .nzBankAccount) oxxo = try container.decodeIfPresent(PaymentMethodOxxo.self, forKey: .oxxo) p24 = try container.decodeIfPresent(PaymentMethodP24.self, forKey: .p24) payByBank = try container.decodeIfPresent(PaymentMethodPayByBank.self, forKey: .payByBank) payco = try container.decodeIfPresent(PaymentMethodPayco.self, forKey: .payco) paynow = try container.decodeIfPresent(PaymentMethodPaynow.self, forKey: .paynow) paypal = try container.decodeIfPresent(PaymentMethodPaypal.self, forKey: .paypal) pix = try container.decodeIfPresent(PaymentMethodPix.self, forKey: .pix) promptpay = try container.decodeIfPresent(PaymentMethodPromptpay.self, forKey: .promptpay) radarOptions = try container.decodeIfPresent(PaymentMethodRadarOptions.self, forKey: .radarOptions) revolutPay = try container.decodeIfPresent(PaymentMethodRevolutPay.self, forKey: .revolutPay) samsungPay = try container.decodeIfPresent(PaymentMethodSamsungPay.self, forKey: .samsungPay) satispay = try container.decodeIfPresent(PaymentMethodSatispay.self, forKey: .satispay) sepaDebit = try container.decodeIfPresent(PaymentMethodSepaDebit.self, forKey: .sepaDebit) sofort = try container.decodeIfPresent(PaymentMethodSofort.self, forKey: .sofort) swish = try container.decodeIfPresent(PaymentMethodSwish.self, forKey: .swish) twint = try container.decodeIfPresent(PaymentMethodTwint.self, forKey: .twint) type = try container.decodeIfPresent(String.self, forKey: .type) usBankAccount = try container.decodeIfPresent(PaymentMethodUsBankAccount.self, forKey: .usBankAccount) wechatPay = try container.decodeIfPresent(PaymentMethodWechatPay.self, forKey: .wechatPay) zip = try container.decodeIfPresent(PaymentMethodZip.self, forKey: .zip) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if acssDebit != nil { try container.encode(acssDebit, forKey: .acssDebit) } if affirm != nil { try container.encode(affirm, forKey: .affirm) } if afterpayClearpay != nil { try container.encode(afterpayClearpay, forKey: .afterpayClearpay) } if alipay != nil { try container.encode(alipay, forKey: .alipay) } if allowRedisplay != nil { try container.encode(allowRedisplay, forKey: .allowRedisplay) } if alma != nil { try container.encode(alma, forKey: .alma) } if amazonPay != nil { try container.encode(amazonPay, forKey: .amazonPay) } if auBecsDebit != nil { try container.encode(auBecsDebit, forKey: .auBecsDebit) } if bacsDebit != nil { try container.encode(bacsDebit, forKey: .bacsDebit) } if bancontact != nil { try container.encode(bancontact, forKey: .bancontact) } if billie != nil { try container.encode(billie, forKey: .billie) } if billingDetails != nil { try container.encode(billingDetails, forKey: .billingDetails) } if blik != nil { try container.encode(blik, forKey: .blik) } if boleto != nil { try container.encode(boleto, forKey: .boleto) } if card != nil { try container.encode(card, forKey: .card) } if cardPresent != nil { try container.encode(cardPresent, forKey: .cardPresent) } if cashapp != nil { try container.encode(cashapp, forKey: .cashapp) } if created != nil { try container.encode(created, forKey: .created) } if customerBalance != nil { try container.encode(customerBalance, forKey: .customerBalance) } if eps != nil { try container.encode(eps, forKey: .eps) } if fpx != nil { try container.encode(fpx, forKey: .fpx) } if giropay != nil { try container.encode(giropay, forKey: .giropay) } if grabpay != nil { try container.encode(grabpay, forKey: .grabpay) } if ideal != nil { try container.encode(ideal, forKey: .ideal) } if interacPresent != nil { try container.encode(interacPresent, forKey: .interacPresent) } if kakaoPay != nil { try container.encode(kakaoPay, forKey: .kakaoPay) } if klarna != nil { try container.encode(klarna, forKey: .klarna) } if konbini != nil { try container.encode(konbini, forKey: .konbini) } if krCard != nil { try container.encode(krCard, forKey: .krCard) } if link != nil { try container.encode(link, forKey: .link) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if mobilepay != nil { try container.encode(mobilepay, forKey: .mobilepay) } if multibanco != nil { try container.encode(multibanco, forKey: .multibanco) } if naverPay != nil { try container.encode(naverPay, forKey: .naverPay) } if nzBankAccount != nil { try container.encode(nzBankAccount, forKey: .nzBankAccount) } if oxxo != nil { try container.encode(oxxo, forKey: .oxxo) } if p24 != nil { try container.encode(p24, forKey: .p24) } if payByBank != nil { try container.encode(payByBank, forKey: .payByBank) } if payco != nil { try container.encode(payco, forKey: .payco) } if paynow != nil { try container.encode(paynow, forKey: .paynow) } if paypal != nil { try container.encode(paypal, forKey: .paypal) } if pix != nil { try container.encode(pix, forKey: .pix) } if promptpay != nil { try container.encode(promptpay, forKey: .promptpay) } if radarOptions != nil { try container.encode(radarOptions, forKey: .radarOptions) } if revolutPay != nil { try container.encode(revolutPay, forKey: .revolutPay) } if samsungPay != nil { try container.encode(samsungPay, forKey: .samsungPay) } if satispay != nil { try container.encode(satispay, forKey: .satispay) } if sepaDebit != nil { try container.encode(sepaDebit, forKey: .sepaDebit) } if sofort != nil { try container.encode(sofort, forKey: .sofort) } if swish != nil { try container.encode(swish, forKey: .swish) } if twint != nil { try container.encode(twint, forKey: .twint) } if type != nil { try container.encode(type, forKey: .type) } if usBankAccount != nil { try container.encode(usBankAccount, forKey: .usBankAccount) } if wechatPay != nil { try container.encode(wechatPay, forKey: .wechatPay) } if zip != nil { try container.encode(zip, forKey: .zip) } } } public class SetupIntent : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var attachToSelf:Bool? public var automaticPaymentMethods:SetupIntentAutomaticPaymentMethods? public var cancellationReason:String? public var clientSecret:String? public var created:Date? public var Description:String? public var flowDirections:[String]? public var lastSetupError:StripeError? public var livemode:Bool? public var metadata:[String:String]? public var nextAction:SetupIntentNextAction? public var paymentMethodConfigurationDetails:SetupIntentPaymentMethodConfigurationDetails? public var paymentMethodOptions:SetupIntentPaymentMethodOptions? public var paymentMethodTypes:[String]? public var status:String? public var usage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case attachToSelf case automaticPaymentMethods case cancellationReason case clientSecret case created case Description case flowDirections case lastSetupError case livemode case metadata case nextAction case paymentMethodConfigurationDetails case paymentMethodOptions case paymentMethodTypes case status case usage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) attachToSelf = try container.decodeIfPresent(Bool.self, forKey: .attachToSelf) automaticPaymentMethods = try container.decodeIfPresent(SetupIntentAutomaticPaymentMethods.self, forKey: .automaticPaymentMethods) cancellationReason = try container.decodeIfPresent(String.self, forKey: .cancellationReason) clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret) created = try container.decodeIfPresent(Date.self, forKey: .created) Description = try container.decodeIfPresent(String.self, forKey: .Description) flowDirections = try container.decodeIfPresent([String].self, forKey: .flowDirections) ?? [] lastSetupError = try container.decodeIfPresent(StripeError.self, forKey: .lastSetupError) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] nextAction = try container.decodeIfPresent(SetupIntentNextAction.self, forKey: .nextAction) paymentMethodConfigurationDetails = try container.decodeIfPresent(SetupIntentPaymentMethodConfigurationDetails.self, forKey: .paymentMethodConfigurationDetails) paymentMethodOptions = try container.decodeIfPresent(SetupIntentPaymentMethodOptions.self, forKey: .paymentMethodOptions) paymentMethodTypes = try container.decodeIfPresent([String].self, forKey: .paymentMethodTypes) ?? [] status = try container.decodeIfPresent(String.self, forKey: .status) usage = try container.decodeIfPresent(String.self, forKey: .usage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if attachToSelf != nil { try container.encode(attachToSelf, forKey: .attachToSelf) } if automaticPaymentMethods != nil { try container.encode(automaticPaymentMethods, forKey: .automaticPaymentMethods) } if cancellationReason != nil { try container.encode(cancellationReason, forKey: .cancellationReason) } if clientSecret != nil { try container.encode(clientSecret, forKey: .clientSecret) } if created != nil { try container.encode(created, forKey: .created) } if Description != nil { try container.encode(Description, forKey: .Description) } if flowDirections != nil { try container.encode(flowDirections, forKey: .flowDirections) } if lastSetupError != nil { try container.encode(lastSetupError, forKey: .lastSetupError) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if nextAction != nil { try container.encode(nextAction, forKey: .nextAction) } if paymentMethodConfigurationDetails != nil { try container.encode(paymentMethodConfigurationDetails, forKey: .paymentMethodConfigurationDetails) } if paymentMethodOptions != nil { try container.encode(paymentMethodOptions, forKey: .paymentMethodOptions) } if paymentMethodTypes != nil { try container.encode(paymentMethodTypes, forKey: .paymentMethodTypes) } if status != nil { try container.encode(status, forKey: .status) } if usage != nil { try container.encode(usage, forKey: .usage) } } } public protocol IPaymentSource : IStripeEntity, IHasId, IHasObject { } public class PaymentIntentNextActionAlipayHandleRedirect : StripeEntity_1 { public var nativeData:String? public var nativeUrl:String? public var returnUrl:String? public var url:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case nativeData case nativeUrl case returnUrl case url } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) nativeData = try container.decodeIfPresent(String.self, forKey: .nativeData) nativeUrl = try container.decodeIfPresent(String.self, forKey: .nativeUrl) returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) url = try container.decodeIfPresent(String.self, forKey: .url) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if nativeData != nil { try container.encode(nativeData, forKey: .nativeData) } if nativeUrl != nil { try container.encode(nativeUrl, forKey: .nativeUrl) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } if url != nil { try container.encode(url, forKey: .url) } } } public class PaymentIntentNextActionBoletoDisplayDetails : StripeEntity_1 { public var expiresAt:Date? public var hostedVoucherUrl:String? public var number:String? public var pdf:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAt case hostedVoucherUrl case number case pdf } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) hostedVoucherUrl = try container.decodeIfPresent(String.self, forKey: .hostedVoucherUrl) number = try container.decodeIfPresent(String.self, forKey: .number) pdf = try container.decodeIfPresent(String.self, forKey: .pdf) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if hostedVoucherUrl != nil { try container.encode(hostedVoucherUrl, forKey: .hostedVoucherUrl) } if number != nil { try container.encode(number, forKey: .number) } if pdf != nil { try container.encode(pdf, forKey: .pdf) } } } public class PaymentIntentNextActionCardAwaitNotification : StripeEntity_1 { public var chargeAttemptAt:Date? public var customerApprovalRequired:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case chargeAttemptAt case customerApprovalRequired } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) chargeAttemptAt = try container.decodeIfPresent(Date.self, forKey: .chargeAttemptAt) customerApprovalRequired = try container.decodeIfPresent(Bool.self, forKey: .customerApprovalRequired) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if chargeAttemptAt != nil { try container.encode(chargeAttemptAt, forKey: .chargeAttemptAt) } if customerApprovalRequired != nil { try container.encode(customerApprovalRequired, forKey: .customerApprovalRequired) } } } public class PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode : StripeEntity_1 { public var hostedInstructionsUrl:String? public var mobileAuthUrl:String? public var qrCode:PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case hostedInstructionsUrl case mobileAuthUrl case qrCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) mobileAuthUrl = try container.decodeIfPresent(String.self, forKey: .mobileAuthUrl) qrCode = try container.decodeIfPresent(PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.self, forKey: .qrCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if mobileAuthUrl != nil { try container.encode(mobileAuthUrl, forKey: .mobileAuthUrl) } if qrCode != nil { try container.encode(qrCode, forKey: .qrCode) } } } public class PaymentIntentNextActionDisplayBankTransferInstructions : StripeEntity_1 { public var amountRemaining:Int? public var currency:String? public var financialAddresses:[PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress]? public var hostedInstructionsUrl:String? public var reference:String? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountRemaining case currency case financialAddresses case hostedInstructionsUrl case reference case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountRemaining = try container.decodeIfPresent(Int.self, forKey: .amountRemaining) currency = try container.decodeIfPresent(String.self, forKey: .currency) financialAddresses = try container.decodeIfPresent([PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress].self, forKey: .financialAddresses) ?? [] hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) reference = try container.decodeIfPresent(String.self, forKey: .reference) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountRemaining != nil { try container.encode(amountRemaining, forKey: .amountRemaining) } if currency != nil { try container.encode(currency, forKey: .currency) } if financialAddresses != nil { try container.encode(financialAddresses, forKey: .financialAddresses) } if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if reference != nil { try container.encode(reference, forKey: .reference) } if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentIntentNextActionKonbiniDisplayDetails : StripeEntity_1 { public var expiresAt:Date? public var hostedVoucherUrl:String? public var stores:PaymentIntentNextActionKonbiniDisplayDetailsStores? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAt case hostedVoucherUrl case stores } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) hostedVoucherUrl = try container.decodeIfPresent(String.self, forKey: .hostedVoucherUrl) stores = try container.decodeIfPresent(PaymentIntentNextActionKonbiniDisplayDetailsStores.self, forKey: .stores) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if hostedVoucherUrl != nil { try container.encode(hostedVoucherUrl, forKey: .hostedVoucherUrl) } if stores != nil { try container.encode(stores, forKey: .stores) } } } public class PaymentIntentNextActionMultibancoDisplayDetails : StripeEntity_1 { public var entity:String? public var expiresAt:Date? public var hostedVoucherUrl:String? public var reference:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case entity case expiresAt case hostedVoucherUrl case reference } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) entity = try container.decodeIfPresent(String.self, forKey: .entity) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) hostedVoucherUrl = try container.decodeIfPresent(String.self, forKey: .hostedVoucherUrl) reference = try container.decodeIfPresent(String.self, forKey: .reference) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if entity != nil { try container.encode(entity, forKey: .entity) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if hostedVoucherUrl != nil { try container.encode(hostedVoucherUrl, forKey: .hostedVoucherUrl) } if reference != nil { try container.encode(reference, forKey: .reference) } } } public class PaymentIntentNextActionOxxoDisplayDetails : StripeEntity_1 { public var expiresAfter:Date? public var hostedVoucherUrl:String? public var number:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfter case hostedVoucherUrl case number } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfter = try container.decodeIfPresent(Date.self, forKey: .expiresAfter) hostedVoucherUrl = try container.decodeIfPresent(String.self, forKey: .hostedVoucherUrl) number = try container.decodeIfPresent(String.self, forKey: .number) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfter != nil { try container.encode(expiresAfter, forKey: .expiresAfter) } if hostedVoucherUrl != nil { try container.encode(hostedVoucherUrl, forKey: .hostedVoucherUrl) } if number != nil { try container.encode(number, forKey: .number) } } } public class PaymentIntentNextActionPaynowDisplayQrCode : StripeEntity_1 { public var data:String? public var hostedInstructionsUrl:String? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case data case hostedInstructionsUrl case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) data = try container.decodeIfPresent(String.self, forKey: .data) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if data != nil { try container.encode(data, forKey: .data) } if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class PaymentIntentNextActionPixDisplayQrCode : StripeEntity_1 { public var data:String? public var expiresAt:Date? public var hostedInstructionsUrl:String? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case data case expiresAt case hostedInstructionsUrl case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) data = try container.decodeIfPresent(String.self, forKey: .data) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if data != nil { try container.encode(data, forKey: .data) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class PaymentIntentNextActionPromptpayDisplayQrCode : StripeEntity_1 { public var data:String? public var hostedInstructionsUrl:String? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case data case hostedInstructionsUrl case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) data = try container.decodeIfPresent(String.self, forKey: .data) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if data != nil { try container.encode(data, forKey: .data) } if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class PaymentIntentNextActionRedirectToUrl : StripeEntity_1 { public var returnUrl:String? public var url:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case returnUrl case url } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) url = try container.decodeIfPresent(String.self, forKey: .url) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } if url != nil { try container.encode(url, forKey: .url) } } } public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCode : StripeEntity_1 { public var hostedInstructionsUrl:String? public var mobileAuthUrl:String? public var qrCode:PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case hostedInstructionsUrl case mobileAuthUrl case qrCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) mobileAuthUrl = try container.decodeIfPresent(String.self, forKey: .mobileAuthUrl) qrCode = try container.decodeIfPresent(PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode.self, forKey: .qrCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if mobileAuthUrl != nil { try container.encode(mobileAuthUrl, forKey: .mobileAuthUrl) } if qrCode != nil { try container.encode(qrCode, forKey: .qrCode) } } } public class PaymentIntentNextActionUseStripeSdk : StripeEntity_1 { 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 PaymentIntentNextActionVerifyWithMicrodeposits : StripeEntity_1 { public var arrivalDate:Date? public var hostedVerificationUrl:String? public var microdepositType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case arrivalDate case hostedVerificationUrl case microdepositType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) arrivalDate = try container.decodeIfPresent(Date.self, forKey: .arrivalDate) hostedVerificationUrl = try container.decodeIfPresent(String.self, forKey: .hostedVerificationUrl) microdepositType = try container.decodeIfPresent(String.self, forKey: .microdepositType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if arrivalDate != nil { try container.encode(arrivalDate, forKey: .arrivalDate) } if hostedVerificationUrl != nil { try container.encode(hostedVerificationUrl, forKey: .hostedVerificationUrl) } if microdepositType != nil { try container.encode(microdepositType, forKey: .microdepositType) } } } public class PaymentIntentNextActionWechatPayDisplayQrCode : StripeEntity_1 { public var data:String? public var hostedInstructionsUrl:String? public var imageDataUrl:String? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case data case hostedInstructionsUrl case imageDataUrl case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) data = try container.decodeIfPresent(String.self, forKey: .data) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) imageDataUrl = try container.decodeIfPresent(String.self, forKey: .imageDataUrl) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if data != nil { try container.encode(data, forKey: .data) } if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if imageDataUrl != nil { try container.encode(imageDataUrl, forKey: .imageDataUrl) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class PaymentIntentNextActionWechatPayRedirectToAndroidApp : StripeEntity_1 { public var appId:String? public var nonceStr:String? public var package:String? public var partnerId:String? public var prepayId:String? public var sign:String? public var timestamp:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case appId case nonceStr case package case partnerId case prepayId case sign case timestamp } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) appId = try container.decodeIfPresent(String.self, forKey: .appId) nonceStr = try container.decodeIfPresent(String.self, forKey: .nonceStr) package = try container.decodeIfPresent(String.self, forKey: .package) partnerId = try container.decodeIfPresent(String.self, forKey: .partnerId) prepayId = try container.decodeIfPresent(String.self, forKey: .prepayId) sign = try container.decodeIfPresent(String.self, forKey: .sign) timestamp = try container.decodeIfPresent(String.self, forKey: .timestamp) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if appId != nil { try container.encode(appId, forKey: .appId) } if nonceStr != nil { try container.encode(nonceStr, forKey: .nonceStr) } if package != nil { try container.encode(package, forKey: .package) } if partnerId != nil { try container.encode(partnerId, forKey: .partnerId) } if prepayId != nil { try container.encode(prepayId, forKey: .prepayId) } if sign != nil { try container.encode(sign, forKey: .sign) } if timestamp != nil { try container.encode(timestamp, forKey: .timestamp) } } } public class PaymentIntentNextActionWechatPayRedirectToIosApp : StripeEntity_1 { public var nativeUrl:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case nativeUrl } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) nativeUrl = try container.decodeIfPresent(String.self, forKey: .nativeUrl) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if nativeUrl != nil { try container.encode(nativeUrl, forKey: .nativeUrl) } } } public class PaymentIntentPaymentMethodOptionsAcssDebit : StripeEntity_1 { public var mandateOptions:PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions case setupFutureUsage case targetDate case verificationMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions.self, forKey: .mandateOptions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) verificationMethod = try container.decodeIfPresent(String.self, forKey: .verificationMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } if verificationMethod != nil { try container.encode(verificationMethod, forKey: .verificationMethod) } } } public class PaymentIntentPaymentMethodOptionsAffirm : StripeEntity_1 { public var captureMethod:String? public var preferredLocale:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case preferredLocale case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) preferredLocale = try container.decodeIfPresent(String.self, forKey: .preferredLocale) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if preferredLocale != nil { try container.encode(preferredLocale, forKey: .preferredLocale) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsAfterpayClearpay : StripeEntity_1 { public var captureMethod:String? public var reference:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case reference case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) reference = try container.decodeIfPresent(String.self, forKey: .reference) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if reference != nil { try container.encode(reference, forKey: .reference) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsAlipay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsAlma : StripeEntity_1 { public var captureMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } } } public class PaymentIntentPaymentMethodOptionsAmazonPay : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsAuBecsDebit : StripeEntity_1 { public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class PaymentIntentPaymentMethodOptionsBacsDebit : StripeEntity_1 { public var mandateOptions:PaymentIntentPaymentMethodOptionsBacsDebitMandateOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsBacsDebitMandateOptions.self, forKey: .mandateOptions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class PaymentIntentPaymentMethodOptionsBancontact : StripeEntity_1 { public var preferredLanguage:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case preferredLanguage case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) preferredLanguage = try container.decodeIfPresent(String.self, forKey: .preferredLanguage) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if preferredLanguage != nil { try container.encode(preferredLanguage, forKey: .preferredLanguage) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsBlik : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsBoleto : StripeEntity_1 { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterDays case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterDays = try container.decodeIfPresent(Int.self, forKey: .expiresAfterDays) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterDays != nil { try container.encode(expiresAfterDays, forKey: .expiresAfterDays) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsCard : StripeEntity_1 { public var captureMethod:String? public var installments:PaymentIntentPaymentMethodOptionsCardInstallments? public var mandateOptions:PaymentIntentPaymentMethodOptionsCardMandateOptions? public var network:String? public var requestExtendedAuthorization:String? public var requestIncrementalAuthorization:String? public var requestMulticapture:String? public var requestOvercapture:String? public var requestThreeDSecure:String? public var requireCvcRecollection:Bool? public var setupFutureUsage:String? public var statementDescriptorSuffixKana:String? public var statementDescriptorSuffixKanji:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case installments case mandateOptions case network case requestExtendedAuthorization case requestIncrementalAuthorization case requestMulticapture case requestOvercapture case requestThreeDSecure case requireCvcRecollection case setupFutureUsage case statementDescriptorSuffixKana case statementDescriptorSuffixKanji } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) installments = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCardInstallments.self, forKey: .installments) mandateOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCardMandateOptions.self, forKey: .mandateOptions) network = try container.decodeIfPresent(String.self, forKey: .network) requestExtendedAuthorization = try container.decodeIfPresent(String.self, forKey: .requestExtendedAuthorization) requestIncrementalAuthorization = try container.decodeIfPresent(String.self, forKey: .requestIncrementalAuthorization) requestMulticapture = try container.decodeIfPresent(String.self, forKey: .requestMulticapture) requestOvercapture = try container.decodeIfPresent(String.self, forKey: .requestOvercapture) requestThreeDSecure = try container.decodeIfPresent(String.self, forKey: .requestThreeDSecure) requireCvcRecollection = try container.decodeIfPresent(Bool.self, forKey: .requireCvcRecollection) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) statementDescriptorSuffixKana = try container.decodeIfPresent(String.self, forKey: .statementDescriptorSuffixKana) statementDescriptorSuffixKanji = try container.decodeIfPresent(String.self, forKey: .statementDescriptorSuffixKanji) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if installments != nil { try container.encode(installments, forKey: .installments) } if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if network != nil { try container.encode(network, forKey: .network) } if requestExtendedAuthorization != nil { try container.encode(requestExtendedAuthorization, forKey: .requestExtendedAuthorization) } if requestIncrementalAuthorization != nil { try container.encode(requestIncrementalAuthorization, forKey: .requestIncrementalAuthorization) } if requestMulticapture != nil { try container.encode(requestMulticapture, forKey: .requestMulticapture) } if requestOvercapture != nil { try container.encode(requestOvercapture, forKey: .requestOvercapture) } if requestThreeDSecure != nil { try container.encode(requestThreeDSecure, forKey: .requestThreeDSecure) } if requireCvcRecollection != nil { try container.encode(requireCvcRecollection, forKey: .requireCvcRecollection) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if statementDescriptorSuffixKana != nil { try container.encode(statementDescriptorSuffixKana, forKey: .statementDescriptorSuffixKana) } if statementDescriptorSuffixKanji != nil { try container.encode(statementDescriptorSuffixKanji, forKey: .statementDescriptorSuffixKanji) } } } public class PaymentIntentPaymentMethodOptionsCardPresent : StripeEntity_1 { public var requestExtendedAuthorization:Bool? public var requestIncrementalAuthorizationSupport:Bool? public var routing:PaymentIntentPaymentMethodOptionsCardPresentRouting? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case requestExtendedAuthorization case requestIncrementalAuthorizationSupport case routing } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) requestExtendedAuthorization = try container.decodeIfPresent(Bool.self, forKey: .requestExtendedAuthorization) requestIncrementalAuthorizationSupport = try container.decodeIfPresent(Bool.self, forKey: .requestIncrementalAuthorizationSupport) routing = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCardPresentRouting.self, forKey: .routing) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if requestExtendedAuthorization != nil { try container.encode(requestExtendedAuthorization, forKey: .requestExtendedAuthorization) } if requestIncrementalAuthorizationSupport != nil { try container.encode(requestIncrementalAuthorizationSupport, forKey: .requestIncrementalAuthorizationSupport) } if routing != nil { try container.encode(routing, forKey: .routing) } } } public class PaymentIntentPaymentMethodOptionsCashapp : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsCustomerBalance : StripeEntity_1 { public var bankTransfer:PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer? public var fundingType:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bankTransfer case fundingType case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bankTransfer = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer.self, forKey: .bankTransfer) fundingType = try container.decodeIfPresent(String.self, forKey: .fundingType) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bankTransfer != nil { try container.encode(bankTransfer, forKey: .bankTransfer) } if fundingType != nil { try container.encode(fundingType, forKey: .fundingType) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsEps : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsFpx : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsGiropay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsGrabpay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsIdeal : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsInteracPresent : StripeEntity_1 { 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 PaymentIntentPaymentMethodOptionsKakaoPay : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsKlarna : StripeEntity_1 { public var captureMethod:String? public var preferredLocale:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case preferredLocale case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) preferredLocale = try container.decodeIfPresent(String.self, forKey: .preferredLocale) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if preferredLocale != nil { try container.encode(preferredLocale, forKey: .preferredLocale) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsKonbini : StripeEntity_1 { public var confirmationNumber:String? public var expiresAfterDays:Int? public var expiresAt:Date? public var productDescription:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case confirmationNumber case expiresAfterDays case expiresAt case productDescription case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) confirmationNumber = try container.decodeIfPresent(String.self, forKey: .confirmationNumber) expiresAfterDays = try container.decodeIfPresent(Int.self, forKey: .expiresAfterDays) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) productDescription = try container.decodeIfPresent(String.self, forKey: .productDescription) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if confirmationNumber != nil { try container.encode(confirmationNumber, forKey: .confirmationNumber) } if expiresAfterDays != nil { try container.encode(expiresAfterDays, forKey: .expiresAfterDays) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if productDescription != nil { try container.encode(productDescription, forKey: .productDescription) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsKrCard : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsLink : StripeEntity_1 { public var captureMethod:String? public var persistentToken:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case persistentToken case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) persistentToken = try container.decodeIfPresent(String.self, forKey: .persistentToken) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if persistentToken != nil { try container.encode(persistentToken, forKey: .persistentToken) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsMobilepay : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsMultibanco : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsNaverPay : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsNzBankAccount : StripeEntity_1 { public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class PaymentIntentPaymentMethodOptionsOxxo : StripeEntity_1 { public var expiresAfterDays:Int? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterDays case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterDays = try container.decodeIfPresent(Int.self, forKey: .expiresAfterDays) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterDays != nil { try container.encode(expiresAfterDays, forKey: .expiresAfterDays) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsP24 : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsPayByBank : StripeEntity_1 { 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 PaymentIntentPaymentMethodOptionsPayco : StripeEntity_1 { public var captureMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } } } public class PaymentIntentPaymentMethodOptionsPaynow : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsPaypal : StripeEntity_1 { public var captureMethod:String? public var preferredLocale:String? public var reference:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case preferredLocale case reference case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) preferredLocale = try container.decodeIfPresent(String.self, forKey: .preferredLocale) reference = try container.decodeIfPresent(String.self, forKey: .reference) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if preferredLocale != nil { try container.encode(preferredLocale, forKey: .preferredLocale) } if reference != nil { try container.encode(reference, forKey: .reference) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsPix : StripeEntity_1 { public var expiresAfterSeconds:Int? public var expiresAt:Date? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAfterSeconds case expiresAt case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAfterSeconds = try container.decodeIfPresent(Int.self, forKey: .expiresAfterSeconds) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAfterSeconds != nil { try container.encode(expiresAfterSeconds, forKey: .expiresAfterSeconds) } if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsPromptpay : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsRevolutPay : StripeEntity_1 { public var captureMethod:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsSamsungPay : StripeEntity_1 { public var captureMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case captureMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) captureMethod = try container.decodeIfPresent(String.self, forKey: .captureMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if captureMethod != nil { try container.encode(captureMethod, forKey: .captureMethod) } } } public class PaymentIntentPaymentMethodOptionsSepaDebit : StripeEntity_1 { public var mandateOptions:PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions? public var setupFutureUsage:String? public var targetDate:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions case setupFutureUsage case targetDate } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions.self, forKey: .mandateOptions) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } } } public class PaymentIntentPaymentMethodOptionsSofort : StripeEntity_1 { public var preferredLanguage:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case preferredLanguage case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) preferredLanguage = try container.decodeIfPresent(String.self, forKey: .preferredLanguage) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if preferredLanguage != nil { try container.encode(preferredLanguage, forKey: .preferredLanguage) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsSwish : StripeEntity_1 { public var reference:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case reference case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) reference = try container.decodeIfPresent(String.self, forKey: .reference) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if reference != nil { try container.encode(reference, forKey: .reference) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsTwint : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsUsBankAccount : StripeEntity_1 { public var financialConnections:PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections? public var mandateOptions:PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions? public var preferredSettlementSpeed:String? public var setupFutureUsage:String? public var targetDate:String? public var verificationMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case financialConnections case mandateOptions case preferredSettlementSpeed case setupFutureUsage case targetDate case verificationMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) financialConnections = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections.self, forKey: .financialConnections) mandateOptions = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions.self, forKey: .mandateOptions) preferredSettlementSpeed = try container.decodeIfPresent(String.self, forKey: .preferredSettlementSpeed) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) targetDate = try container.decodeIfPresent(String.self, forKey: .targetDate) verificationMethod = try container.decodeIfPresent(String.self, forKey: .verificationMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if financialConnections != nil { try container.encode(financialConnections, forKey: .financialConnections) } if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if preferredSettlementSpeed != nil { try container.encode(preferredSettlementSpeed, forKey: .preferredSettlementSpeed) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } if targetDate != nil { try container.encode(targetDate, forKey: .targetDate) } if verificationMethod != nil { try container.encode(verificationMethod, forKey: .verificationMethod) } } } public class PaymentIntentPaymentMethodOptionsWechatPay : StripeEntity_1 { public var appId:String? public var client:String? public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case appId case client case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) appId = try container.decodeIfPresent(String.self, forKey: .appId) client = try container.decodeIfPresent(String.self, forKey: .client) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if appId != nil { try container.encode(appId, forKey: .appId) } if client != nil { try container.encode(client, forKey: .client) } if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentPaymentMethodOptionsZip : StripeEntity_1 { public var setupFutureUsage:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case setupFutureUsage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) setupFutureUsage = try container.decodeIfPresent(String.self, forKey: .setupFutureUsage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if setupFutureUsage != nil { try container.encode(setupFutureUsage, forKey: .setupFutureUsage) } } } public class PaymentIntentProcessingCard : StripeEntity_1 { public var customerNotification:PaymentIntentProcessingCardCustomerNotification? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customerNotification } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customerNotification = try container.decodeIfPresent(PaymentIntentProcessingCardCustomerNotification.self, forKey: .customerNotification) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customerNotification != nil { try container.encode(customerNotification, forKey: .customerNotification) } } } public class SessionCustomFieldDropdownOptionOptions : INestedOptions, Codable { public var label:String? public var value:String? required public init(){} } public class SessionInvoiceCreationInvoiceDataCustomFieldOptions : INestedOptions, Codable { public var name:String? public var value:String? required public init(){} } public class SessionInvoiceCreationInvoiceDataIssuerOptions : INestedOptions, Codable { public var account:String? public var type:String? required public init(){} } public class SessionInvoiceCreationInvoiceDataRenderingOptionsOptions : INestedOptions, Codable { public var amountTaxDisplay:String? required public init(){} } public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasMetadata, Codable { public var Description:String? public var images:[String]? public var metadata:[String:String]? public var name:String? public var taxCode:String? required public init(){} } public class SessionLineItemPriceDataRecurringOptions : INestedOptions, Codable { public var interval:String? public var intervalCount:Int? required public init(){} } public class SessionPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions, Codable { public var customMandateUrl:String? public var defaultFor:[String]? public var intervalDescription:String? public var paymentSchedule:String? public var transactionType:String? required public init(){} } public class SessionPaymentMethodOptionsBacsDebitMandateOptionsOptions : INestedOptions, Codable { public var referencePrefix:String? required public init(){} } public class SessionPaymentMethodOptionsCardInstallmentsOptions : INestedOptions, Codable { public var enabled:Bool? required public init(){} } public class SessionPaymentMethodOptionsCardRestrictionsOptions : INestedOptions, Codable { public var brandsBlocked:[String]? required public init(){} } public class SessionPaymentMethodOptionsCustomerBalanceBankTransferOptions : INestedOptions, Codable { public var euBankTransfer:SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions? public var requestedAddressTypes:[String]? public var type:String? required public init(){} } public class SessionPaymentMethodOptionsSepaDebitMandateOptionsOptions : INestedOptions, Codable { public var referencePrefix:String? required public init(){} } public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions, Codable { public var permissions:[String]? public var prefetch:[String]? required public init(){} } public class SessionShippingOptionShippingRateDataDeliveryEstimateOptions : INestedOptions, Codable { public var maximum:SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions? public var minimum:SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions? required public init(){} } public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOptions, Codable { public var amount:Int? public var currency:String? public var currencyOptions:[String:SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions]? required public init(){} } public class SessionSubscriptionDataInvoiceSettingsIssuerOptions : INestedOptions, Codable { public var account:String? public var type:String? required public init(){} } public class SessionSubscriptionDataTrialSettingsEndBehaviorOptions : INestedOptions, Codable { public var missingPaymentMethod:String? required public init(){} } public class PaymentIntentMandateDataCustomerAcceptanceOfflineOptions : INestedOptions, Codable { required public init(){} } public class PaymentIntentMandateDataCustomerAcceptanceOnlineOptions : INestedOptions, Codable { public var ipAddress:String? public var userAgent:String? required public init(){} } public class DobOptions : INestedOptions, Codable { public var day:Int? public var month:Int? public var year:Int? required public init(){} } public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions : INestedOptions, Codable { public var customMandateUrl:String? public var intervalDescription:String? public var paymentSchedule:String? public var transactionType:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsBacsDebitMandateOptionsOptions : INestedOptions, Codable { public var referencePrefix:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardInstallmentsOptions : INestedOptions, Codable { public var enabled:Bool? public var plan:PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardMandateOptionsOptions : INestedOptions, Codable { public var amount:Int? public var amountType:String? public var Description:String? public var endDate:Date? public var interval:String? public var intervalCount:Int? public var reference:String? public var startDate:Date? public var supportedTypes:[String]? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardThreeDSecureOptions : INestedOptions, Codable { public var aresTransStatus:String? public var cryptogram:String? public var electronicCommerceIndicator:String? public var exemptionIndicator:String? public var networkOptions:PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions? public var requestorChallengeIndicator:String? public var transactionId:String? public var version:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardPresentRoutingOptions : INestedOptions, Codable { public var requestedPriority:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferOptions : INestedOptions, Codable { public var euBankTransfer:PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions? public var requestedAddressTypes:[String]? public var type:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions : INestedOptions, Codable { public var referencePrefix:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions : INestedOptions, Codable { public var filters:PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions? public var permissions:[String]? public var prefetch:[String]? public var returnUrl:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptionsOptions : INestedOptions, Codable { public var collectionMethod:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsUsBankAccountNetworksOptions : INestedOptions, Codable { public var requested:[String]? required public init(){} } public class SessionCustomFieldDropdownOption : StripeEntity_1 { public var label:String? public var value:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case label case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) label = try container.decodeIfPresent(String.self, forKey: .label) value = try container.decodeIfPresent(String.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if label != nil { try container.encode(label, forKey: .label) } if value != nil { try container.encode(value, forKey: .value) } } } public class SessionInvoiceCreationInvoiceDataCustomField : StripeEntity_1 { public var name:String? public var value:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) value = try container.decodeIfPresent(String.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if value != nil { try container.encode(value, forKey: .value) } } } public class SessionInvoiceCreationInvoiceDataIssuer : StripeEntity_1 { public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if type != nil { try container.encode(type, forKey: .type) } } } public class SessionInvoiceCreationInvoiceDataRenderingOptions : StripeEntity_1 { public var amountTaxDisplay:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountTaxDisplay } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountTaxDisplay = try container.decodeIfPresent(String.self, forKey: .amountTaxDisplay) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountTaxDisplay != nil { try container.encode(amountTaxDisplay, forKey: .amountTaxDisplay) } } } public class SessionPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity_1 { public var customMandateUrl:String? public var defaultFor:[String]? public var intervalDescription:String? public var paymentSchedule:String? public var transactionType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customMandateUrl case defaultFor case intervalDescription case paymentSchedule case transactionType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customMandateUrl = try container.decodeIfPresent(String.self, forKey: .customMandateUrl) defaultFor = try container.decodeIfPresent([String].self, forKey: .defaultFor) ?? [] intervalDescription = try container.decodeIfPresent(String.self, forKey: .intervalDescription) paymentSchedule = try container.decodeIfPresent(String.self, forKey: .paymentSchedule) transactionType = try container.decodeIfPresent(String.self, forKey: .transactionType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customMandateUrl != nil { try container.encode(customMandateUrl, forKey: .customMandateUrl) } if defaultFor != nil { try container.encode(defaultFor, forKey: .defaultFor) } if intervalDescription != nil { try container.encode(intervalDescription, forKey: .intervalDescription) } if paymentSchedule != nil { try container.encode(paymentSchedule, forKey: .paymentSchedule) } if transactionType != nil { try container.encode(transactionType, forKey: .transactionType) } } } public class SessionPaymentMethodOptionsBacsDebitMandateOptions : StripeEntity_1 { public var referencePrefix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referencePrefix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referencePrefix = try container.decodeIfPresent(String.self, forKey: .referencePrefix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referencePrefix != nil { try container.encode(referencePrefix, forKey: .referencePrefix) } } } public class SessionPaymentMethodOptionsCardInstallments : StripeEntity_1 { public var enabled:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case enabled } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if enabled != nil { try container.encode(enabled, forKey: .enabled) } } } public class SessionPaymentMethodOptionsCardRestrictions : StripeEntity_1 { public var brandsBlocked:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case brandsBlocked } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) brandsBlocked = try container.decodeIfPresent([String].self, forKey: .brandsBlocked) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if brandsBlocked != nil { try container.encode(brandsBlocked, forKey: .brandsBlocked) } } } public class SessionPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity_1 { public var euBankTransfer:SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer? public var requestedAddressTypes:[String]? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case euBankTransfer case requestedAddressTypes case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) euBankTransfer = try container.decodeIfPresent(SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.self, forKey: .euBankTransfer) requestedAddressTypes = try container.decodeIfPresent([String].self, forKey: .requestedAddressTypes) ?? [] type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if euBankTransfer != nil { try container.encode(euBankTransfer, forKey: .euBankTransfer) } if requestedAddressTypes != nil { try container.encode(requestedAddressTypes, forKey: .requestedAddressTypes) } if type != nil { try container.encode(type, forKey: .type) } } } public class SessionPaymentMethodOptionsSepaDebitMandateOptions : StripeEntity_1 { public var referencePrefix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referencePrefix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referencePrefix = try container.decodeIfPresent(String.self, forKey: .referencePrefix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referencePrefix != nil { try container.encode(referencePrefix, forKey: .referencePrefix) } } } public class SessionPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity_1 { public var filters:SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters? public var permissions:[String]? public var prefetch:[String]? public var returnUrl:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case filters case permissions case prefetch case returnUrl } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) filters = try container.decodeIfPresent(SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.self, forKey: .filters) permissions = try container.decodeIfPresent([String].self, forKey: .permissions) ?? [] prefetch = try container.decodeIfPresent([String].self, forKey: .prefetch) ?? [] returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if filters != nil { try container.encode(filters, forKey: .filters) } if permissions != nil { try container.encode(permissions, forKey: .permissions) } if prefetch != nil { try container.encode(prefetch, forKey: .prefetch) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } } } public class SessionTotalDetailsBreakdownDiscount : StripeEntity_1 { public var amount:Int? public var discount:Discount? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case discount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) discount = try container.decodeIfPresent(Discount.self, forKey: .discount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if discount != nil { try container.encode(discount, forKey: .discount) } } } public class SessionTotalDetailsBreakdownTax : StripeEntity_1 { public var amount:Int? public var rate:TaxRate? public var taxabilityReason:String? public var taxableAmount:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case rate case taxabilityReason case taxableAmount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) rate = try container.decodeIfPresent(TaxRate.self, forKey: .rate) taxabilityReason = try container.decodeIfPresent(String.self, forKey: .taxabilityReason) taxableAmount = try container.decodeIfPresent(Int.self, forKey: .taxableAmount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if rate != nil { try container.encode(rate, forKey: .rate) } if taxabilityReason != nil { try container.encode(taxabilityReason, forKey: .taxabilityReason) } if taxableAmount != nil { try container.encode(taxableAmount, forKey: .taxableAmount) } } } public class StripeResponseBase : Codable { public var statusCode:HttpStatusCode? public var headers:HttpResponseHeaders? public var date:Date? public var idempotencyKey:String? public var requestId:String? required public init(){} } public class Coupon : StripeEntity_1, IHasId, IHasMetadata, IHasObject { public var id:String? public var object:String? public var amountOff:Int? public var appliesTo:CouponAppliesTo? public var created:Date? public var currency:String? public var currencyOptions:[String:CouponCurrencyOptions]? public var duration:String? public var durationInMonths:Int? public var livemode:Bool? public var maxRedemptions:Int? public var metadata:[String:String]? public var name:String? public var percentOff:Double? public var redeemBy:Date? public var timesRedeemed:Int? public var valid:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case object case amountOff case appliesTo case created case currency case currencyOptions case duration case durationInMonths case livemode case maxRedemptions case metadata case name case percentOff case redeemBy case timesRedeemed case valid } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) object = try container.decodeIfPresent(String.self, forKey: .object) amountOff = try container.decodeIfPresent(Int.self, forKey: .amountOff) appliesTo = try container.decodeIfPresent(CouponAppliesTo.self, forKey: .appliesTo) created = try container.decodeIfPresent(Date.self, forKey: .created) currency = try container.decodeIfPresent(String.self, forKey: .currency) currencyOptions = try container.decodeIfPresent([String:CouponCurrencyOptions].self, forKey: .currencyOptions) ?? [:] duration = try container.decodeIfPresent(String.self, forKey: .duration) durationInMonths = try container.decodeIfPresent(Int.self, forKey: .durationInMonths) livemode = try container.decodeIfPresent(Bool.self, forKey: .livemode) maxRedemptions = try container.decodeIfPresent(Int.self, forKey: .maxRedemptions) metadata = try container.decodeIfPresent([String:String].self, forKey: .metadata) ?? [:] name = try container.decodeIfPresent(String.self, forKey: .name) percentOff = try container.decodeIfPresent(Double.self, forKey: .percentOff) redeemBy = try container.decodeIfPresent(Date.self, forKey: .redeemBy) timesRedeemed = try container.decodeIfPresent(Int.self, forKey: .timesRedeemed) valid = try container.decodeIfPresent(Bool.self, forKey: .valid) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if object != nil { try container.encode(object, forKey: .object) } if amountOff != nil { try container.encode(amountOff, forKey: .amountOff) } if appliesTo != nil { try container.encode(appliesTo, forKey: .appliesTo) } if created != nil { try container.encode(created, forKey: .created) } if currency != nil { try container.encode(currency, forKey: .currency) } if currencyOptions != nil { try container.encode(currencyOptions, forKey: .currencyOptions) } if duration != nil { try container.encode(duration, forKey: .duration) } if durationInMonths != nil { try container.encode(durationInMonths, forKey: .durationInMonths) } if livemode != nil { try container.encode(livemode, forKey: .livemode) } if maxRedemptions != nil { try container.encode(maxRedemptions, forKey: .maxRedemptions) } if metadata != nil { try container.encode(metadata, forKey: .metadata) } if name != nil { try container.encode(name, forKey: .name) } if percentOff != nil { try container.encode(percentOff, forKey: .percentOff) } if redeemBy != nil { try container.encode(redeemBy, forKey: .redeemBy) } if timesRedeemed != nil { try container.encode(timesRedeemed, forKey: .timesRedeemed) } if valid != nil { try container.encode(valid, forKey: .valid) } } } public class PriceCurrencyOptionsCustomUnitAmount : StripeEntity_1 { public var maximum:Int? public var minimum:Int? public var preset:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case maximum case minimum case preset } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) maximum = try container.decodeIfPresent(Int.self, forKey: .maximum) minimum = try container.decodeIfPresent(Int.self, forKey: .minimum) preset = try container.decodeIfPresent(Int.self, forKey: .preset) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if maximum != nil { try container.encode(maximum, forKey: .maximum) } if minimum != nil { try container.encode(minimum, forKey: .minimum) } if preset != nil { try container.encode(preset, forKey: .preset) } } } public class PriceCurrencyOptionsTier : StripeEntity_1 { public var flatAmount:Int? public var flatAmountDecimal:Double? public var unitAmount:Int? public var unitAmountDecimal:Double? public var upTo:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case flatAmount case flatAmountDecimal case unitAmount case unitAmountDecimal case upTo } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) flatAmount = try container.decodeIfPresent(Int.self, forKey: .flatAmount) flatAmountDecimal = try container.decodeIfPresent(Double.self, forKey: .flatAmountDecimal) unitAmount = try container.decodeIfPresent(Int.self, forKey: .unitAmount) unitAmountDecimal = try container.decodeIfPresent(Double.self, forKey: .unitAmountDecimal) upTo = try container.decodeIfPresent(Int.self, forKey: .upTo) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if flatAmount != nil { try container.encode(flatAmount, forKey: .flatAmount) } if flatAmountDecimal != nil { try container.encode(flatAmountDecimal, forKey: .flatAmountDecimal) } if unitAmount != nil { try container.encode(unitAmount, forKey: .unitAmount) } if unitAmountDecimal != nil { try container.encode(unitAmountDecimal, forKey: .unitAmountDecimal) } if upTo != nil { try container.encode(upTo, forKey: .upTo) } } } public class TaxRateFlatAmount : StripeEntity_1 { public var amount:Int? public var currency:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case currency } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) currency = try container.decodeIfPresent(String.self, forKey: .currency) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if currency != nil { try container.encode(currency, forKey: .currency) } } } public class PaymentMethodAcssDebit : StripeEntity_1 { public var bankName:String? public var fingerprint:String? public var institutionNumber:String? public var last4:String? public var transitNumber:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bankName case fingerprint case institutionNumber case last4 case transitNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) institutionNumber = try container.decodeIfPresent(String.self, forKey: .institutionNumber) last4 = try container.decodeIfPresent(String.self, forKey: .last4) transitNumber = try container.decodeIfPresent(String.self, forKey: .transitNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bankName != nil { try container.encode(bankName, forKey: .bankName) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if institutionNumber != nil { try container.encode(institutionNumber, forKey: .institutionNumber) } if last4 != nil { try container.encode(last4, forKey: .last4) } if transitNumber != nil { try container.encode(transitNumber, forKey: .transitNumber) } } } public class PaymentMethodAffirm : StripeEntity_1 { 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 PaymentMethodAfterpayClearpay : StripeEntity_1 { 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 PaymentMethodAlipay : StripeEntity_1 { 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 PaymentMethodAlma : StripeEntity_1 { 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 PaymentMethodAmazonPay : StripeEntity_1 { 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 PaymentMethodAuBecsDebit : StripeEntity_1 { public var bsbNumber:String? public var fingerprint:String? public var last4:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bsbNumber case fingerprint case last4 } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bsbNumber = try container.decodeIfPresent(String.self, forKey: .bsbNumber) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) last4 = try container.decodeIfPresent(String.self, forKey: .last4) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bsbNumber != nil { try container.encode(bsbNumber, forKey: .bsbNumber) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if last4 != nil { try container.encode(last4, forKey: .last4) } } } public class PaymentMethodBacsDebit : StripeEntity_1 { public var fingerprint:String? public var last4:String? public var sortCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case fingerprint case last4 case sortCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) last4 = try container.decodeIfPresent(String.self, forKey: .last4) sortCode = try container.decodeIfPresent(String.self, forKey: .sortCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if last4 != nil { try container.encode(last4, forKey: .last4) } if sortCode != nil { try container.encode(sortCode, forKey: .sortCode) } } } public class PaymentMethodBancontact : StripeEntity_1 { 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 PaymentMethodBillie : StripeEntity_1 { 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 PaymentMethodBillingDetails : StripeEntity_1 { public var address:Address? public var email:String? public var name:String? public var phone:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case address case email case name case phone } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) address = try container.decodeIfPresent(Address.self, forKey: .address) email = try container.decodeIfPresent(String.self, forKey: .email) name = try container.decodeIfPresent(String.self, forKey: .name) phone = try container.decodeIfPresent(String.self, forKey: .phone) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if address != nil { try container.encode(address, forKey: .address) } if email != nil { try container.encode(email, forKey: .email) } if name != nil { try container.encode(name, forKey: .name) } if phone != nil { try container.encode(phone, forKey: .phone) } } } public class PaymentMethodBlik : StripeEntity_1 { 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 PaymentMethodBoleto : StripeEntity_1 { public var taxId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case taxId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) taxId = try container.decodeIfPresent(String.self, forKey: .taxId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if taxId != nil { try container.encode(taxId, forKey: .taxId) } } } public class PaymentMethodCard : StripeEntity_1 { public var brand:String? public var checks:PaymentMethodCardChecks? public var country:String? public var Description:String? public var displayBrand:String? public var expMonth:Int? public var expYear:Int? public var fingerprint:String? public var funding:String? public var generatedFrom:PaymentMethodCardGeneratedFrom? public var iin:String? public var issuer:String? public var last4:String? public var networks:PaymentMethodCardNetworks? public var regulatedStatus:String? public var threeDSecureUsage:PaymentMethodCardThreeDSecureUsage? public var wallet:PaymentMethodCardWallet? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case brand case checks case country case Description case displayBrand case expMonth case expYear case fingerprint case funding case generatedFrom case iin case issuer case last4 case networks case regulatedStatus case threeDSecureUsage case wallet } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) brand = try container.decodeIfPresent(String.self, forKey: .brand) checks = try container.decodeIfPresent(PaymentMethodCardChecks.self, forKey: .checks) country = try container.decodeIfPresent(String.self, forKey: .country) Description = try container.decodeIfPresent(String.self, forKey: .Description) displayBrand = try container.decodeIfPresent(String.self, forKey: .displayBrand) expMonth = try container.decodeIfPresent(Int.self, forKey: .expMonth) expYear = try container.decodeIfPresent(Int.self, forKey: .expYear) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) funding = try container.decodeIfPresent(String.self, forKey: .funding) generatedFrom = try container.decodeIfPresent(PaymentMethodCardGeneratedFrom.self, forKey: .generatedFrom) iin = try container.decodeIfPresent(String.self, forKey: .iin) issuer = try container.decodeIfPresent(String.self, forKey: .issuer) last4 = try container.decodeIfPresent(String.self, forKey: .last4) networks = try container.decodeIfPresent(PaymentMethodCardNetworks.self, forKey: .networks) regulatedStatus = try container.decodeIfPresent(String.self, forKey: .regulatedStatus) threeDSecureUsage = try container.decodeIfPresent(PaymentMethodCardThreeDSecureUsage.self, forKey: .threeDSecureUsage) wallet = try container.decodeIfPresent(PaymentMethodCardWallet.self, forKey: .wallet) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if brand != nil { try container.encode(brand, forKey: .brand) } if checks != nil { try container.encode(checks, forKey: .checks) } if country != nil { try container.encode(country, forKey: .country) } if Description != nil { try container.encode(Description, forKey: .Description) } if displayBrand != nil { try container.encode(displayBrand, forKey: .displayBrand) } if expMonth != nil { try container.encode(expMonth, forKey: .expMonth) } if expYear != nil { try container.encode(expYear, forKey: .expYear) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if funding != nil { try container.encode(funding, forKey: .funding) } if generatedFrom != nil { try container.encode(generatedFrom, forKey: .generatedFrom) } if iin != nil { try container.encode(iin, forKey: .iin) } if issuer != nil { try container.encode(issuer, forKey: .issuer) } if last4 != nil { try container.encode(last4, forKey: .last4) } if networks != nil { try container.encode(networks, forKey: .networks) } if regulatedStatus != nil { try container.encode(regulatedStatus, forKey: .regulatedStatus) } if threeDSecureUsage != nil { try container.encode(threeDSecureUsage, forKey: .threeDSecureUsage) } if wallet != nil { try container.encode(wallet, forKey: .wallet) } } } public class PaymentMethodCardPresent : StripeEntity_1 { public var brand:String? public var brandProduct:String? public var cardholderName:String? public var country:String? public var Description:String? public var expMonth:Int? public var expYear:Int? public var fingerprint:String? public var funding:String? public var iin:String? public var issuer:String? public var last4:String? public var networks:PaymentMethodCardPresentNetworks? public var offline:PaymentMethodCardPresentOffline? public var preferredLocales:[String]? public var readMethod:String? public var wallet:PaymentMethodCardPresentWallet? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case brand case brandProduct case cardholderName case country case Description case expMonth case expYear case fingerprint case funding case iin case issuer case last4 case networks case offline case preferredLocales case readMethod case wallet } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) brand = try container.decodeIfPresent(String.self, forKey: .brand) brandProduct = try container.decodeIfPresent(String.self, forKey: .brandProduct) cardholderName = try container.decodeIfPresent(String.self, forKey: .cardholderName) country = try container.decodeIfPresent(String.self, forKey: .country) Description = try container.decodeIfPresent(String.self, forKey: .Description) expMonth = try container.decodeIfPresent(Int.self, forKey: .expMonth) expYear = try container.decodeIfPresent(Int.self, forKey: .expYear) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) funding = try container.decodeIfPresent(String.self, forKey: .funding) iin = try container.decodeIfPresent(String.self, forKey: .iin) issuer = try container.decodeIfPresent(String.self, forKey: .issuer) last4 = try container.decodeIfPresent(String.self, forKey: .last4) networks = try container.decodeIfPresent(PaymentMethodCardPresentNetworks.self, forKey: .networks) offline = try container.decodeIfPresent(PaymentMethodCardPresentOffline.self, forKey: .offline) preferredLocales = try container.decodeIfPresent([String].self, forKey: .preferredLocales) ?? [] readMethod = try container.decodeIfPresent(String.self, forKey: .readMethod) wallet = try container.decodeIfPresent(PaymentMethodCardPresentWallet.self, forKey: .wallet) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if brand != nil { try container.encode(brand, forKey: .brand) } if brandProduct != nil { try container.encode(brandProduct, forKey: .brandProduct) } if cardholderName != nil { try container.encode(cardholderName, forKey: .cardholderName) } if country != nil { try container.encode(country, forKey: .country) } if Description != nil { try container.encode(Description, forKey: .Description) } if expMonth != nil { try container.encode(expMonth, forKey: .expMonth) } if expYear != nil { try container.encode(expYear, forKey: .expYear) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if funding != nil { try container.encode(funding, forKey: .funding) } if iin != nil { try container.encode(iin, forKey: .iin) } if issuer != nil { try container.encode(issuer, forKey: .issuer) } if last4 != nil { try container.encode(last4, forKey: .last4) } if networks != nil { try container.encode(networks, forKey: .networks) } if offline != nil { try container.encode(offline, forKey: .offline) } if preferredLocales != nil { try container.encode(preferredLocales, forKey: .preferredLocales) } if readMethod != nil { try container.encode(readMethod, forKey: .readMethod) } if wallet != nil { try container.encode(wallet, forKey: .wallet) } } } public class PaymentMethodCashapp : StripeEntity_1 { public var buyerId:String? public var cashtag:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case buyerId case cashtag } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) buyerId = try container.decodeIfPresent(String.self, forKey: .buyerId) cashtag = try container.decodeIfPresent(String.self, forKey: .cashtag) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if buyerId != nil { try container.encode(buyerId, forKey: .buyerId) } if cashtag != nil { try container.encode(cashtag, forKey: .cashtag) } } } public class PaymentMethodCustomerBalance : StripeEntity_1 { 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 PaymentMethodEps : StripeEntity_1 { public var bank:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bank } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bank = try container.decodeIfPresent(String.self, forKey: .bank) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bank != nil { try container.encode(bank, forKey: .bank) } } } public class PaymentMethodFpx : StripeEntity_1 { public var accountHolderType:String? public var bank:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderType case bank } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderType = try container.decodeIfPresent(String.self, forKey: .accountHolderType) bank = try container.decodeIfPresent(String.self, forKey: .bank) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderType != nil { try container.encode(accountHolderType, forKey: .accountHolderType) } if bank != nil { try container.encode(bank, forKey: .bank) } } } public class PaymentMethodGiropay : StripeEntity_1 { 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 PaymentMethodGrabpay : StripeEntity_1 { 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 PaymentMethodIdeal : StripeEntity_1 { public var bank:String? public var bic:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bank case bic } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bank = try container.decodeIfPresent(String.self, forKey: .bank) bic = try container.decodeIfPresent(String.self, forKey: .bic) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bank != nil { try container.encode(bank, forKey: .bank) } if bic != nil { try container.encode(bic, forKey: .bic) } } } public class PaymentMethodInteracPresent : StripeEntity_1 { public var brand:String? public var cardholderName:String? public var country:String? public var Description:String? public var expMonth:Int? public var expYear:Int? public var fingerprint:String? public var funding:String? public var iin:String? public var issuer:String? public var last4:String? public var networks:PaymentMethodInteracPresentNetworks? public var preferredLocales:[String]? public var readMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case brand case cardholderName case country case Description case expMonth case expYear case fingerprint case funding case iin case issuer case last4 case networks case preferredLocales case readMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) brand = try container.decodeIfPresent(String.self, forKey: .brand) cardholderName = try container.decodeIfPresent(String.self, forKey: .cardholderName) country = try container.decodeIfPresent(String.self, forKey: .country) Description = try container.decodeIfPresent(String.self, forKey: .Description) expMonth = try container.decodeIfPresent(Int.self, forKey: .expMonth) expYear = try container.decodeIfPresent(Int.self, forKey: .expYear) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) funding = try container.decodeIfPresent(String.self, forKey: .funding) iin = try container.decodeIfPresent(String.self, forKey: .iin) issuer = try container.decodeIfPresent(String.self, forKey: .issuer) last4 = try container.decodeIfPresent(String.self, forKey: .last4) networks = try container.decodeIfPresent(PaymentMethodInteracPresentNetworks.self, forKey: .networks) preferredLocales = try container.decodeIfPresent([String].self, forKey: .preferredLocales) ?? [] readMethod = try container.decodeIfPresent(String.self, forKey: .readMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if brand != nil { try container.encode(brand, forKey: .brand) } if cardholderName != nil { try container.encode(cardholderName, forKey: .cardholderName) } if country != nil { try container.encode(country, forKey: .country) } if Description != nil { try container.encode(Description, forKey: .Description) } if expMonth != nil { try container.encode(expMonth, forKey: .expMonth) } if expYear != nil { try container.encode(expYear, forKey: .expYear) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if funding != nil { try container.encode(funding, forKey: .funding) } if iin != nil { try container.encode(iin, forKey: .iin) } if issuer != nil { try container.encode(issuer, forKey: .issuer) } if last4 != nil { try container.encode(last4, forKey: .last4) } if networks != nil { try container.encode(networks, forKey: .networks) } if preferredLocales != nil { try container.encode(preferredLocales, forKey: .preferredLocales) } if readMethod != nil { try container.encode(readMethod, forKey: .readMethod) } } } public class PaymentMethodKakaoPay : StripeEntity_1 { 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 PaymentMethodKlarna : StripeEntity_1 { public var dob:PaymentMethodKlarnaDob? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dob } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) dob = try container.decodeIfPresent(PaymentMethodKlarnaDob.self, forKey: .dob) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if dob != nil { try container.encode(dob, forKey: .dob) } } } public class PaymentMethodKonbini : StripeEntity_1 { 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 PaymentMethodKrCard : StripeEntity_1 { public var brand:String? public var last4:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case brand case last4 } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) brand = try container.decodeIfPresent(String.self, forKey: .brand) last4 = try container.decodeIfPresent(String.self, forKey: .last4) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if brand != nil { try container.encode(brand, forKey: .brand) } if last4 != nil { try container.encode(last4, forKey: .last4) } } } public class PaymentMethodLink : StripeEntity_1 { public var email:String? public var persistentToken:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case email case persistentToken } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) email = try container.decodeIfPresent(String.self, forKey: .email) persistentToken = try container.decodeIfPresent(String.self, forKey: .persistentToken) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if email != nil { try container.encode(email, forKey: .email) } if persistentToken != nil { try container.encode(persistentToken, forKey: .persistentToken) } } } public class PaymentMethodMobilepay : StripeEntity_1 { 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 PaymentMethodMultibanco : StripeEntity_1 { 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 PaymentMethodNaverPay : StripeEntity_1 { public var buyerId:String? public var funding:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case buyerId case funding } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) buyerId = try container.decodeIfPresent(String.self, forKey: .buyerId) funding = try container.decodeIfPresent(String.self, forKey: .funding) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if buyerId != nil { try container.encode(buyerId, forKey: .buyerId) } if funding != nil { try container.encode(funding, forKey: .funding) } } } public class PaymentMethodNzBankAccount : StripeEntity_1 { public var accountHolderName:String? public var bankCode:String? public var bankName:String? public var branchCode:String? public var last4:String? public var suffix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderName case bankCode case bankName case branchCode case last4 case suffix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) bankCode = try container.decodeIfPresent(String.self, forKey: .bankCode) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) branchCode = try container.decodeIfPresent(String.self, forKey: .branchCode) last4 = try container.decodeIfPresent(String.self, forKey: .last4) suffix = try container.decodeIfPresent(String.self, forKey: .suffix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if bankCode != nil { try container.encode(bankCode, forKey: .bankCode) } if bankName != nil { try container.encode(bankName, forKey: .bankName) } if branchCode != nil { try container.encode(branchCode, forKey: .branchCode) } if last4 != nil { try container.encode(last4, forKey: .last4) } if suffix != nil { try container.encode(suffix, forKey: .suffix) } } } public class PaymentMethodOxxo : StripeEntity_1 { 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 PaymentMethodP24 : StripeEntity_1 { public var bank:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bank } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bank = try container.decodeIfPresent(String.self, forKey: .bank) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bank != nil { try container.encode(bank, forKey: .bank) } } } public class PaymentMethodPayByBank : StripeEntity_1 { 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 PaymentMethodPayco : StripeEntity_1 { 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 PaymentMethodPaynow : StripeEntity_1 { 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 PaymentMethodPaypal : StripeEntity_1 { public var country:String? public var payerEmail:String? public var payerId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case country case payerEmail case payerId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) country = try container.decodeIfPresent(String.self, forKey: .country) payerEmail = try container.decodeIfPresent(String.self, forKey: .payerEmail) payerId = try container.decodeIfPresent(String.self, forKey: .payerId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if country != nil { try container.encode(country, forKey: .country) } if payerEmail != nil { try container.encode(payerEmail, forKey: .payerEmail) } if payerId != nil { try container.encode(payerId, forKey: .payerId) } } } public class PaymentMethodPix : StripeEntity_1 { 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 PaymentMethodPromptpay : StripeEntity_1 { 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 PaymentMethodRadarOptions : StripeEntity_1 { public var session:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case session } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) session = try container.decodeIfPresent(String.self, forKey: .session) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if session != nil { try container.encode(session, forKey: .session) } } } public class PaymentMethodRevolutPay : StripeEntity_1 { 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 PaymentMethodSamsungPay : StripeEntity_1 { 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 PaymentMethodSatispay : StripeEntity_1 { 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 PaymentMethodSepaDebit : StripeEntity_1 { public var bankCode:String? public var branchCode:String? public var country:String? public var fingerprint:String? public var generatedFrom:PaymentMethodSepaDebitGeneratedFrom? public var last4:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case bankCode case branchCode case country case fingerprint case generatedFrom case last4 } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) bankCode = try container.decodeIfPresent(String.self, forKey: .bankCode) branchCode = try container.decodeIfPresent(String.self, forKey: .branchCode) country = try container.decodeIfPresent(String.self, forKey: .country) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) generatedFrom = try container.decodeIfPresent(PaymentMethodSepaDebitGeneratedFrom.self, forKey: .generatedFrom) last4 = try container.decodeIfPresent(String.self, forKey: .last4) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if bankCode != nil { try container.encode(bankCode, forKey: .bankCode) } if branchCode != nil { try container.encode(branchCode, forKey: .branchCode) } if country != nil { try container.encode(country, forKey: .country) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if generatedFrom != nil { try container.encode(generatedFrom, forKey: .generatedFrom) } if last4 != nil { try container.encode(last4, forKey: .last4) } } } public class PaymentMethodSofort : StripeEntity_1 { public var country:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case country } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) country = try container.decodeIfPresent(String.self, forKey: .country) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if country != nil { try container.encode(country, forKey: .country) } } } public class PaymentMethodSwish : StripeEntity_1 { 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 PaymentMethodTwint : StripeEntity_1 { 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 PaymentMethodUsBankAccount : StripeEntity_1 { public var accountHolderType:String? public var accountType:String? public var bankName:String? public var financialConnectionsAccount:String? public var fingerprint:String? public var last4:String? public var networks:PaymentMethodUsBankAccountNetworks? public var routingNumber:String? public var statusDetails:PaymentMethodUsBankAccountStatusDetails? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderType case accountType case bankName case financialConnectionsAccount case fingerprint case last4 case networks case routingNumber case statusDetails } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderType = try container.decodeIfPresent(String.self, forKey: .accountHolderType) accountType = try container.decodeIfPresent(String.self, forKey: .accountType) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) financialConnectionsAccount = try container.decodeIfPresent(String.self, forKey: .financialConnectionsAccount) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) last4 = try container.decodeIfPresent(String.self, forKey: .last4) networks = try container.decodeIfPresent(PaymentMethodUsBankAccountNetworks.self, forKey: .networks) routingNumber = try container.decodeIfPresent(String.self, forKey: .routingNumber) statusDetails = try container.decodeIfPresent(PaymentMethodUsBankAccountStatusDetails.self, forKey: .statusDetails) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderType != nil { try container.encode(accountHolderType, forKey: .accountHolderType) } if accountType != nil { try container.encode(accountType, forKey: .accountType) } if bankName != nil { try container.encode(bankName, forKey: .bankName) } if financialConnectionsAccount != nil { try container.encode(financialConnectionsAccount, forKey: .financialConnectionsAccount) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if last4 != nil { try container.encode(last4, forKey: .last4) } if networks != nil { try container.encode(networks, forKey: .networks) } if routingNumber != nil { try container.encode(routingNumber, forKey: .routingNumber) } if statusDetails != nil { try container.encode(statusDetails, forKey: .statusDetails) } } } public class PaymentMethodWechatPay : StripeEntity_1 { 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 PaymentMethodZip : StripeEntity_1 { 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 SetupIntentAutomaticPaymentMethods : StripeEntity_1 { public var allowRedirects:String? public var enabled:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case allowRedirects case enabled } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) allowRedirects = try container.decodeIfPresent(String.self, forKey: .allowRedirects) enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if allowRedirects != nil { try container.encode(allowRedirects, forKey: .allowRedirects) } if enabled != nil { try container.encode(enabled, forKey: .enabled) } } } public class SetupIntentNextAction : StripeEntity_1 { public var cashappHandleRedirectOrDisplayQrCode:SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode? public var redirectToUrl:SetupIntentNextActionRedirectToUrl? public var type:String? public var useStripeSdk:SetupIntentNextActionUseStripeSdk? public var verifyWithMicrodeposits:SetupIntentNextActionVerifyWithMicrodeposits? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case cashappHandleRedirectOrDisplayQrCode case redirectToUrl case type case useStripeSdk case verifyWithMicrodeposits } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) cashappHandleRedirectOrDisplayQrCode = try container.decodeIfPresent(SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode.self, forKey: .cashappHandleRedirectOrDisplayQrCode) redirectToUrl = try container.decodeIfPresent(SetupIntentNextActionRedirectToUrl.self, forKey: .redirectToUrl) type = try container.decodeIfPresent(String.self, forKey: .type) useStripeSdk = try container.decodeIfPresent(SetupIntentNextActionUseStripeSdk.self, forKey: .useStripeSdk) verifyWithMicrodeposits = try container.decodeIfPresent(SetupIntentNextActionVerifyWithMicrodeposits.self, forKey: .verifyWithMicrodeposits) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if cashappHandleRedirectOrDisplayQrCode != nil { try container.encode(cashappHandleRedirectOrDisplayQrCode, forKey: .cashappHandleRedirectOrDisplayQrCode) } if redirectToUrl != nil { try container.encode(redirectToUrl, forKey: .redirectToUrl) } if type != nil { try container.encode(type, forKey: .type) } if useStripeSdk != nil { try container.encode(useStripeSdk, forKey: .useStripeSdk) } if verifyWithMicrodeposits != nil { try container.encode(verifyWithMicrodeposits, forKey: .verifyWithMicrodeposits) } } } public class SetupIntentPaymentMethodConfigurationDetails : StripeEntity_1, IHasId { public var id:String? public var parent:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case parent } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) parent = try container.decodeIfPresent(String.self, forKey: .parent) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if parent != nil { try container.encode(parent, forKey: .parent) } } } public class SetupIntentPaymentMethodOptions : StripeEntity_1 { public var acssDebit:SetupIntentPaymentMethodOptionsAcssDebit? public var amazonPay:SetupIntentPaymentMethodOptionsAmazonPay? public var bacsDebit:SetupIntentPaymentMethodOptionsBacsDebit? public var card:SetupIntentPaymentMethodOptionsCard? public var cardPresent:SetupIntentPaymentMethodOptionsCardPresent? public var link:SetupIntentPaymentMethodOptionsLink? public var paypal:SetupIntentPaymentMethodOptionsPaypal? public var sepaDebit:SetupIntentPaymentMethodOptionsSepaDebit? public var usBankAccount:SetupIntentPaymentMethodOptionsUsBankAccount? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case acssDebit case amazonPay case bacsDebit case card case cardPresent case link case paypal case sepaDebit case usBankAccount } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) acssDebit = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsAcssDebit.self, forKey: .acssDebit) amazonPay = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsAmazonPay.self, forKey: .amazonPay) bacsDebit = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsBacsDebit.self, forKey: .bacsDebit) card = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsCard.self, forKey: .card) cardPresent = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsCardPresent.self, forKey: .cardPresent) link = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsLink.self, forKey: .link) paypal = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsPaypal.self, forKey: .paypal) sepaDebit = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsSepaDebit.self, forKey: .sepaDebit) usBankAccount = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsUsBankAccount.self, forKey: .usBankAccount) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if acssDebit != nil { try container.encode(acssDebit, forKey: .acssDebit) } if amazonPay != nil { try container.encode(amazonPay, forKey: .amazonPay) } if bacsDebit != nil { try container.encode(bacsDebit, forKey: .bacsDebit) } if card != nil { try container.encode(card, forKey: .card) } if cardPresent != nil { try container.encode(cardPresent, forKey: .cardPresent) } if link != nil { try container.encode(link, forKey: .link) } if paypal != nil { try container.encode(paypal, forKey: .paypal) } if sepaDebit != nil { try container.encode(sepaDebit, forKey: .sepaDebit) } if usBankAccount != nil { try container.encode(usBankAccount, forKey: .usBankAccount) } } } public class PaymentIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode : StripeEntity_1 { public var expiresAt:Date? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAt case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress : StripeEntity_1 { public var aba:PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba? public var iban:PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban? public var sortCode:PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode? public var spei:PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei? public var supportedNetworks:[String]? public var swift:PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift? public var type:String? public var zengin:PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case aba case iban case sortCode case spei case supportedNetworks case swift case type case zengin } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) aba = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba.self, forKey: .aba) iban = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban.self, forKey: .iban) sortCode = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode.self, forKey: .sortCode) spei = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei.self, forKey: .spei) supportedNetworks = try container.decodeIfPresent([String].self, forKey: .supportedNetworks) ?? [] swift = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift.self, forKey: .swift) type = try container.decodeIfPresent(String.self, forKey: .type) zengin = try container.decodeIfPresent(PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin.self, forKey: .zengin) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if aba != nil { try container.encode(aba, forKey: .aba) } if iban != nil { try container.encode(iban, forKey: .iban) } if sortCode != nil { try container.encode(sortCode, forKey: .sortCode) } if spei != nil { try container.encode(spei, forKey: .spei) } if supportedNetworks != nil { try container.encode(supportedNetworks, forKey: .supportedNetworks) } if swift != nil { try container.encode(swift, forKey: .swift) } if type != nil { try container.encode(type, forKey: .type) } if zengin != nil { try container.encode(zengin, forKey: .zengin) } } } public class PaymentIntentNextActionKonbiniDisplayDetailsStores : StripeEntity_1 { public var familymart:PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart? public var lawson:PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson? public var ministop:PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop? public var seicomart:PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case familymart case lawson case ministop case seicomart } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) familymart = try container.decodeIfPresent(PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart.self, forKey: .familymart) lawson = try container.decodeIfPresent(PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson.self, forKey: .lawson) ministop = try container.decodeIfPresent(PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop.self, forKey: .ministop) seicomart = try container.decodeIfPresent(PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart.self, forKey: .seicomart) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if familymart != nil { try container.encode(familymart, forKey: .familymart) } if lawson != nil { try container.encode(lawson, forKey: .lawson) } if ministop != nil { try container.encode(ministop, forKey: .ministop) } if seicomart != nil { try container.encode(seicomart, forKey: .seicomart) } } } public class PaymentIntentNextActionSwishHandleRedirectOrDisplayQrCodeQrCode : StripeEntity_1 { public var data:String? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case data case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) data = try container.decodeIfPresent(String.self, forKey: .data) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if data != nil { try container.encode(data, forKey: .data) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class PaymentIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity_1 { public var customMandateUrl:String? public var intervalDescription:String? public var paymentSchedule:String? public var transactionType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customMandateUrl case intervalDescription case paymentSchedule case transactionType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customMandateUrl = try container.decodeIfPresent(String.self, forKey: .customMandateUrl) intervalDescription = try container.decodeIfPresent(String.self, forKey: .intervalDescription) paymentSchedule = try container.decodeIfPresent(String.self, forKey: .paymentSchedule) transactionType = try container.decodeIfPresent(String.self, forKey: .transactionType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customMandateUrl != nil { try container.encode(customMandateUrl, forKey: .customMandateUrl) } if intervalDescription != nil { try container.encode(intervalDescription, forKey: .intervalDescription) } if paymentSchedule != nil { try container.encode(paymentSchedule, forKey: .paymentSchedule) } if transactionType != nil { try container.encode(transactionType, forKey: .transactionType) } } } public class PaymentIntentPaymentMethodOptionsBacsDebitMandateOptions : StripeEntity_1 { public var referencePrefix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referencePrefix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referencePrefix = try container.decodeIfPresent(String.self, forKey: .referencePrefix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referencePrefix != nil { try container.encode(referencePrefix, forKey: .referencePrefix) } } } public class PaymentIntentPaymentMethodOptionsCardInstallments : StripeEntity_1 { public var availablePlans:[PaymentIntentPaymentMethodOptionsCardInstallmentsPlan]? public var enabled:Bool? public var plan:PaymentIntentPaymentMethodOptionsCardInstallmentsPlan? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case availablePlans case enabled case plan } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) availablePlans = try container.decodeIfPresent([PaymentIntentPaymentMethodOptionsCardInstallmentsPlan].self, forKey: .availablePlans) ?? [] enabled = try container.decodeIfPresent(Bool.self, forKey: .enabled) plan = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCardInstallmentsPlan.self, forKey: .plan) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if availablePlans != nil { try container.encode(availablePlans, forKey: .availablePlans) } if enabled != nil { try container.encode(enabled, forKey: .enabled) } if plan != nil { try container.encode(plan, forKey: .plan) } } } public class PaymentIntentPaymentMethodOptionsCardMandateOptions : StripeEntity_1 { public var amount:Int? public var amountType:String? public var Description:String? public var endDate:Date? public var interval:String? public var intervalCount:Int? public var reference:String? public var startDate:Date? public var supportedTypes:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case amountType case Description case endDate case interval case intervalCount case reference case startDate case supportedTypes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) amountType = try container.decodeIfPresent(String.self, forKey: .amountType) Description = try container.decodeIfPresent(String.self, forKey: .Description) endDate = try container.decodeIfPresent(Date.self, forKey: .endDate) interval = try container.decodeIfPresent(String.self, forKey: .interval) intervalCount = try container.decodeIfPresent(Int.self, forKey: .intervalCount) reference = try container.decodeIfPresent(String.self, forKey: .reference) startDate = try container.decodeIfPresent(Date.self, forKey: .startDate) supportedTypes = try container.decodeIfPresent([String].self, forKey: .supportedTypes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if amountType != nil { try container.encode(amountType, forKey: .amountType) } if Description != nil { try container.encode(Description, forKey: .Description) } if endDate != nil { try container.encode(endDate, forKey: .endDate) } if interval != nil { try container.encode(interval, forKey: .interval) } if intervalCount != nil { try container.encode(intervalCount, forKey: .intervalCount) } if reference != nil { try container.encode(reference, forKey: .reference) } if startDate != nil { try container.encode(startDate, forKey: .startDate) } if supportedTypes != nil { try container.encode(supportedTypes, forKey: .supportedTypes) } } } public class PaymentIntentPaymentMethodOptionsCardPresentRouting : StripeEntity_1 { public var requestedPriority:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case requestedPriority } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) requestedPriority = try container.decodeIfPresent(String.self, forKey: .requestedPriority) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if requestedPriority != nil { try container.encode(requestedPriority, forKey: .requestedPriority) } } } public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity_1 { public var euBankTransfer:PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer? public var requestedAddressTypes:[String]? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case euBankTransfer case requestedAddressTypes case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) euBankTransfer = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer.self, forKey: .euBankTransfer) requestedAddressTypes = try container.decodeIfPresent([String].self, forKey: .requestedAddressTypes) ?? [] type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if euBankTransfer != nil { try container.encode(euBankTransfer, forKey: .euBankTransfer) } if requestedAddressTypes != nil { try container.encode(requestedAddressTypes, forKey: .requestedAddressTypes) } if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions : StripeEntity_1 { public var referencePrefix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referencePrefix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referencePrefix = try container.decodeIfPresent(String.self, forKey: .referencePrefix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referencePrefix != nil { try container.encode(referencePrefix, forKey: .referencePrefix) } } } public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity_1 { public var filters:PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters? public var permissions:[String]? public var prefetch:[String]? public var returnUrl:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case filters case permissions case prefetch case returnUrl } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) filters = try container.decodeIfPresent(PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.self, forKey: .filters) permissions = try container.decodeIfPresent([String].self, forKey: .permissions) ?? [] prefetch = try container.decodeIfPresent([String].self, forKey: .prefetch) ?? [] returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if filters != nil { try container.encode(filters, forKey: .filters) } if permissions != nil { try container.encode(permissions, forKey: .permissions) } if prefetch != nil { try container.encode(prefetch, forKey: .prefetch) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } } } public class PaymentIntentPaymentMethodOptionsUsBankAccountMandateOptions : StripeEntity_1 { public var collectionMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case collectionMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) collectionMethod = try container.decodeIfPresent(String.self, forKey: .collectionMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if collectionMethod != nil { try container.encode(collectionMethod, forKey: .collectionMethod) } } } public class PaymentIntentProcessingCardCustomerNotification : StripeEntity_1 { public var approvalRequested:Bool? public var completesAt:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case approvalRequested case completesAt } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) approvalRequested = try container.decodeIfPresent(Bool.self, forKey: .approvalRequested) completesAt = try container.decodeIfPresent(Date.self, forKey: .completesAt) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if approvalRequested != nil { try container.encode(approvalRequested, forKey: .approvalRequested) } if completesAt != nil { try container.encode(completesAt, forKey: .completesAt) } } } public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions : INestedOptions, Codable { public var country:String? required public init(){} } public class SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions : INestedOptions, Codable { public var unit:String? public var value:Int? required public init(){} } public class SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions : INestedOptions, Codable { public var unit:String? public var value:Int? required public init(){} } public class SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions : INestedOptions, Codable { public var amount:Int? public var taxBehavior:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlanOptions : INestedOptions, Codable { public var count:Int? public var interval:String? public var type:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsOptions : INestedOptions, Codable { public var cartesBancaires:PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions? required public init(){} } public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransferOptions : INestedOptions, Codable { public var country:String? required public init(){} } public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFiltersOptions : INestedOptions, Codable { public var accountSubcategories:[String]? required public init(){} } public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity_1 { public var country:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case country } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) country = try container.decodeIfPresent(String.self, forKey: .country) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if country != nil { try container.encode(country, forKey: .country) } } } public class SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity_1 { public var accountSubcategories:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountSubcategories } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountSubcategories = try container.decodeIfPresent([String].self, forKey: .accountSubcategories) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountSubcategories != nil { try container.encode(accountSubcategories, forKey: .accountSubcategories) } } } public class CouponAppliesTo : StripeEntity_1 { public var products:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case products } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) products = try container.decodeIfPresent([String].self, forKey: .products) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if products != nil { try container.encode(products, forKey: .products) } } } public class CouponCurrencyOptions : StripeEntity_1 { public var amountOff:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountOff } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountOff = try container.decodeIfPresent(Int.self, forKey: .amountOff) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountOff != nil { try container.encode(amountOff, forKey: .amountOff) } } } public class PaymentMethodCardChecks : StripeEntity_1 { public var addressLine1Check:String? public var addressPostalCodeCheck:String? public var cvcCheck:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case addressLine1Check case addressPostalCodeCheck case cvcCheck } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) addressLine1Check = try container.decodeIfPresent(String.self, forKey: .addressLine1Check) addressPostalCodeCheck = try container.decodeIfPresent(String.self, forKey: .addressPostalCodeCheck) cvcCheck = try container.decodeIfPresent(String.self, forKey: .cvcCheck) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if addressLine1Check != nil { try container.encode(addressLine1Check, forKey: .addressLine1Check) } if addressPostalCodeCheck != nil { try container.encode(addressPostalCodeCheck, forKey: .addressPostalCodeCheck) } if cvcCheck != nil { try container.encode(cvcCheck, forKey: .cvcCheck) } } } public class PaymentMethodCardGeneratedFrom : StripeEntity_1 { public var charge:String? public var paymentMethodDetails:PaymentMethodCardGeneratedFromPaymentMethodDetails? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case charge case paymentMethodDetails } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) charge = try container.decodeIfPresent(String.self, forKey: .charge) paymentMethodDetails = try container.decodeIfPresent(PaymentMethodCardGeneratedFromPaymentMethodDetails.self, forKey: .paymentMethodDetails) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if charge != nil { try container.encode(charge, forKey: .charge) } if paymentMethodDetails != nil { try container.encode(paymentMethodDetails, forKey: .paymentMethodDetails) } } } public class PaymentMethodCardNetworks : StripeEntity_1 { public var available:[String]? public var preferred:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case available case preferred } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) available = try container.decodeIfPresent([String].self, forKey: .available) ?? [] preferred = try container.decodeIfPresent(String.self, forKey: .preferred) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if available != nil { try container.encode(available, forKey: .available) } if preferred != nil { try container.encode(preferred, forKey: .preferred) } } } public class PaymentMethodCardThreeDSecureUsage : StripeEntity_1 { public var supported:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case supported } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) supported = try container.decodeIfPresent(Bool.self, forKey: .supported) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if supported != nil { try container.encode(supported, forKey: .supported) } } } public class PaymentMethodCardWallet : StripeEntity_1 { public var amexExpressCheckout:PaymentMethodCardWalletAmexExpressCheckout? public var applePay:PaymentMethodCardWalletApplePay? public var dynamicLast4:String? public var googlePay:PaymentMethodCardWalletGooglePay? public var link:PaymentMethodCardWalletLink? public var masterpass:PaymentMethodCardWalletMasterpass? public var samsungPay:PaymentMethodCardWalletSamsungPay? public var type:String? public var visaCheckout:PaymentMethodCardWalletVisaCheckout? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amexExpressCheckout case applePay case dynamicLast4 case googlePay case link case masterpass case samsungPay case type case visaCheckout } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amexExpressCheckout = try container.decodeIfPresent(PaymentMethodCardWalletAmexExpressCheckout.self, forKey: .amexExpressCheckout) applePay = try container.decodeIfPresent(PaymentMethodCardWalletApplePay.self, forKey: .applePay) dynamicLast4 = try container.decodeIfPresent(String.self, forKey: .dynamicLast4) googlePay = try container.decodeIfPresent(PaymentMethodCardWalletGooglePay.self, forKey: .googlePay) link = try container.decodeIfPresent(PaymentMethodCardWalletLink.self, forKey: .link) masterpass = try container.decodeIfPresent(PaymentMethodCardWalletMasterpass.self, forKey: .masterpass) samsungPay = try container.decodeIfPresent(PaymentMethodCardWalletSamsungPay.self, forKey: .samsungPay) type = try container.decodeIfPresent(String.self, forKey: .type) visaCheckout = try container.decodeIfPresent(PaymentMethodCardWalletVisaCheckout.self, forKey: .visaCheckout) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amexExpressCheckout != nil { try container.encode(amexExpressCheckout, forKey: .amexExpressCheckout) } if applePay != nil { try container.encode(applePay, forKey: .applePay) } if dynamicLast4 != nil { try container.encode(dynamicLast4, forKey: .dynamicLast4) } if googlePay != nil { try container.encode(googlePay, forKey: .googlePay) } if link != nil { try container.encode(link, forKey: .link) } if masterpass != nil { try container.encode(masterpass, forKey: .masterpass) } if samsungPay != nil { try container.encode(samsungPay, forKey: .samsungPay) } if type != nil { try container.encode(type, forKey: .type) } if visaCheckout != nil { try container.encode(visaCheckout, forKey: .visaCheckout) } } } public class PaymentMethodCardPresentNetworks : StripeEntity_1 { public var available:[String]? public var preferred:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case available case preferred } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) available = try container.decodeIfPresent([String].self, forKey: .available) ?? [] preferred = try container.decodeIfPresent(String.self, forKey: .preferred) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if available != nil { try container.encode(available, forKey: .available) } if preferred != nil { try container.encode(preferred, forKey: .preferred) } } } public class PaymentMethodCardPresentOffline : StripeEntity_1 { public var storedAt:Date? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case storedAt case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) storedAt = try container.decodeIfPresent(Date.self, forKey: .storedAt) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if storedAt != nil { try container.encode(storedAt, forKey: .storedAt) } if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentMethodCardPresentWallet : StripeEntity_1 { public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentMethodInteracPresentNetworks : StripeEntity_1 { public var available:[String]? public var preferred:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case available case preferred } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) available = try container.decodeIfPresent([String].self, forKey: .available) ?? [] preferred = try container.decodeIfPresent(String.self, forKey: .preferred) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if available != nil { try container.encode(available, forKey: .available) } if preferred != nil { try container.encode(preferred, forKey: .preferred) } } } public class PaymentMethodKlarnaDob : StripeEntity_1 { public var day:Int? public var month:Int? public var year:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case day case month case year } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) day = try container.decodeIfPresent(Int.self, forKey: .day) month = try container.decodeIfPresent(Int.self, forKey: .month) year = try container.decodeIfPresent(Int.self, forKey: .year) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if day != nil { try container.encode(day, forKey: .day) } if month != nil { try container.encode(month, forKey: .month) } if year != nil { try container.encode(year, forKey: .year) } } } public class PaymentMethodSepaDebitGeneratedFrom : StripeEntity_1 { 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 PaymentMethodUsBankAccountNetworks : StripeEntity_1 { public var preferred:String? public var supported:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case preferred case supported } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) preferred = try container.decodeIfPresent(String.self, forKey: .preferred) supported = try container.decodeIfPresent([String].self, forKey: .supported) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if preferred != nil { try container.encode(preferred, forKey: .preferred) } if supported != nil { try container.encode(supported, forKey: .supported) } } } public class PaymentMethodUsBankAccountStatusDetails : StripeEntity_1 { public var blocked:PaymentMethodUsBankAccountStatusDetailsBlocked? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case blocked } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) blocked = try container.decodeIfPresent(PaymentMethodUsBankAccountStatusDetailsBlocked.self, forKey: .blocked) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if blocked != nil { try container.encode(blocked, forKey: .blocked) } } } public class SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode : StripeEntity_1 { public var hostedInstructionsUrl:String? public var mobileAuthUrl:String? public var qrCode:SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case hostedInstructionsUrl case mobileAuthUrl case qrCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) hostedInstructionsUrl = try container.decodeIfPresent(String.self, forKey: .hostedInstructionsUrl) mobileAuthUrl = try container.decodeIfPresent(String.self, forKey: .mobileAuthUrl) qrCode = try container.decodeIfPresent(SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode.self, forKey: .qrCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if hostedInstructionsUrl != nil { try container.encode(hostedInstructionsUrl, forKey: .hostedInstructionsUrl) } if mobileAuthUrl != nil { try container.encode(mobileAuthUrl, forKey: .mobileAuthUrl) } if qrCode != nil { try container.encode(qrCode, forKey: .qrCode) } } } public class SetupIntentNextActionRedirectToUrl : StripeEntity_1 { public var returnUrl:String? public var url:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case returnUrl case url } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) url = try container.decodeIfPresent(String.self, forKey: .url) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } if url != nil { try container.encode(url, forKey: .url) } } } public class SetupIntentNextActionUseStripeSdk : StripeEntity_1 { 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 SetupIntentNextActionVerifyWithMicrodeposits : StripeEntity_1 { public var arrivalDate:Date? public var hostedVerificationUrl:String? public var microdepositType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case arrivalDate case hostedVerificationUrl case microdepositType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) arrivalDate = try container.decodeIfPresent(Date.self, forKey: .arrivalDate) hostedVerificationUrl = try container.decodeIfPresent(String.self, forKey: .hostedVerificationUrl) microdepositType = try container.decodeIfPresent(String.self, forKey: .microdepositType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if arrivalDate != nil { try container.encode(arrivalDate, forKey: .arrivalDate) } if hostedVerificationUrl != nil { try container.encode(hostedVerificationUrl, forKey: .hostedVerificationUrl) } if microdepositType != nil { try container.encode(microdepositType, forKey: .microdepositType) } } } public class SetupIntentPaymentMethodOptionsAcssDebit : StripeEntity_1 { public var currency:String? public var mandateOptions:SetupIntentPaymentMethodOptionsAcssDebitMandateOptions? public var verificationMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currency case mandateOptions case verificationMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currency = try container.decodeIfPresent(String.self, forKey: .currency) mandateOptions = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsAcssDebitMandateOptions.self, forKey: .mandateOptions) verificationMethod = try container.decodeIfPresent(String.self, forKey: .verificationMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currency != nil { try container.encode(currency, forKey: .currency) } if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if verificationMethod != nil { try container.encode(verificationMethod, forKey: .verificationMethod) } } } public class SetupIntentPaymentMethodOptionsAmazonPay : StripeEntity_1 { 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 SetupIntentPaymentMethodOptionsBacsDebit : StripeEntity_1 { public var mandateOptions:SetupIntentPaymentMethodOptionsBacsDebitMandateOptions? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsBacsDebitMandateOptions.self, forKey: .mandateOptions) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } } } public class SetupIntentPaymentMethodOptionsCard : StripeEntity_1 { public var mandateOptions:SetupIntentPaymentMethodOptionsCardMandateOptions? public var network:String? public var requestThreeDSecure:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions case network case requestThreeDSecure } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsCardMandateOptions.self, forKey: .mandateOptions) network = try container.decodeIfPresent(String.self, forKey: .network) requestThreeDSecure = try container.decodeIfPresent(String.self, forKey: .requestThreeDSecure) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if network != nil { try container.encode(network, forKey: .network) } if requestThreeDSecure != nil { try container.encode(requestThreeDSecure, forKey: .requestThreeDSecure) } } } public class SetupIntentPaymentMethodOptionsCardPresent : StripeEntity_1 { 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 SetupIntentPaymentMethodOptionsLink : StripeEntity_1 { public var persistentToken:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case persistentToken } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) persistentToken = try container.decodeIfPresent(String.self, forKey: .persistentToken) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if persistentToken != nil { try container.encode(persistentToken, forKey: .persistentToken) } } } public class SetupIntentPaymentMethodOptionsPaypal : StripeEntity_1 { public var billingAgreementId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case billingAgreementId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) billingAgreementId = try container.decodeIfPresent(String.self, forKey: .billingAgreementId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if billingAgreementId != nil { try container.encode(billingAgreementId, forKey: .billingAgreementId) } } } public class SetupIntentPaymentMethodOptionsSepaDebit : StripeEntity_1 { public var mandateOptions:SetupIntentPaymentMethodOptionsSepaDebitMandateOptions? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case mandateOptions } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) mandateOptions = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsSepaDebitMandateOptions.self, forKey: .mandateOptions) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } } } public class SetupIntentPaymentMethodOptionsUsBankAccount : StripeEntity_1 { public var financialConnections:SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections? public var mandateOptions:SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions? public var verificationMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case financialConnections case mandateOptions case verificationMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) financialConnections = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections.self, forKey: .financialConnections) mandateOptions = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions.self, forKey: .mandateOptions) verificationMethod = try container.decodeIfPresent(String.self, forKey: .verificationMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if financialConnections != nil { try container.encode(financialConnections, forKey: .financialConnections) } if mandateOptions != nil { try container.encode(mandateOptions, forKey: .mandateOptions) } if verificationMethod != nil { try container.encode(verificationMethod, forKey: .verificationMethod) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressAba : StripeEntity_1 { public var accountHolderAddress:Address? public var accountHolderName:String? public var accountNumber:String? public var accountType:String? public var bankAddress:Address? public var bankName:String? public var routingNumber:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderAddress case accountHolderName case accountNumber case accountType case bankAddress case bankName case routingNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderAddress = try container.decodeIfPresent(Address.self, forKey: .accountHolderAddress) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) accountNumber = try container.decodeIfPresent(String.self, forKey: .accountNumber) accountType = try container.decodeIfPresent(String.self, forKey: .accountType) bankAddress = try container.decodeIfPresent(Address.self, forKey: .bankAddress) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) routingNumber = try container.decodeIfPresent(String.self, forKey: .routingNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderAddress != nil { try container.encode(accountHolderAddress, forKey: .accountHolderAddress) } if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if accountNumber != nil { try container.encode(accountNumber, forKey: .accountNumber) } if accountType != nil { try container.encode(accountType, forKey: .accountType) } if bankAddress != nil { try container.encode(bankAddress, forKey: .bankAddress) } if bankName != nil { try container.encode(bankName, forKey: .bankName) } if routingNumber != nil { try container.encode(routingNumber, forKey: .routingNumber) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIban : StripeEntity_1 { public var accountHolderAddress:Address? public var accountHolderName:String? public var bankAddress:Address? public var bic:String? public var country:String? public var iban:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderAddress case accountHolderName case bankAddress case bic case country case iban } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderAddress = try container.decodeIfPresent(Address.self, forKey: .accountHolderAddress) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) bankAddress = try container.decodeIfPresent(Address.self, forKey: .bankAddress) bic = try container.decodeIfPresent(String.self, forKey: .bic) country = try container.decodeIfPresent(String.self, forKey: .country) iban = try container.decodeIfPresent(String.self, forKey: .iban) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderAddress != nil { try container.encode(accountHolderAddress, forKey: .accountHolderAddress) } if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if bankAddress != nil { try container.encode(bankAddress, forKey: .bankAddress) } if bic != nil { try container.encode(bic, forKey: .bic) } if country != nil { try container.encode(country, forKey: .country) } if iban != nil { try container.encode(iban, forKey: .iban) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode : StripeEntity_1 { public var accountHolderAddress:Address? public var accountHolderName:String? public var accountNumber:String? public var bankAddress:Address? public var sortCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderAddress case accountHolderName case accountNumber case bankAddress case sortCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderAddress = try container.decodeIfPresent(Address.self, forKey: .accountHolderAddress) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) accountNumber = try container.decodeIfPresent(String.self, forKey: .accountNumber) bankAddress = try container.decodeIfPresent(Address.self, forKey: .bankAddress) sortCode = try container.decodeIfPresent(String.self, forKey: .sortCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderAddress != nil { try container.encode(accountHolderAddress, forKey: .accountHolderAddress) } if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if accountNumber != nil { try container.encode(accountNumber, forKey: .accountNumber) } if bankAddress != nil { try container.encode(bankAddress, forKey: .bankAddress) } if sortCode != nil { try container.encode(sortCode, forKey: .sortCode) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei : StripeEntity_1 { public var accountHolderAddress:Address? public var accountHolderName:String? public var bankAddress:Address? public var bankCode:String? public var bankName:String? public var clabe:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderAddress case accountHolderName case bankAddress case bankCode case bankName case clabe } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderAddress = try container.decodeIfPresent(Address.self, forKey: .accountHolderAddress) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) bankAddress = try container.decodeIfPresent(Address.self, forKey: .bankAddress) bankCode = try container.decodeIfPresent(String.self, forKey: .bankCode) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) clabe = try container.decodeIfPresent(String.self, forKey: .clabe) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderAddress != nil { try container.encode(accountHolderAddress, forKey: .accountHolderAddress) } if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if bankAddress != nil { try container.encode(bankAddress, forKey: .bankAddress) } if bankCode != nil { try container.encode(bankCode, forKey: .bankCode) } if bankName != nil { try container.encode(bankName, forKey: .bankName) } if clabe != nil { try container.encode(clabe, forKey: .clabe) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift : StripeEntity_1 { public var accountHolderAddress:Address? public var accountHolderName:String? public var accountNumber:String? public var accountType:String? public var bankAddress:Address? public var bankName:String? public var swiftCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderAddress case accountHolderName case accountNumber case accountType case bankAddress case bankName case swiftCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderAddress = try container.decodeIfPresent(Address.self, forKey: .accountHolderAddress) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) accountNumber = try container.decodeIfPresent(String.self, forKey: .accountNumber) accountType = try container.decodeIfPresent(String.self, forKey: .accountType) bankAddress = try container.decodeIfPresent(Address.self, forKey: .bankAddress) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) swiftCode = try container.decodeIfPresent(String.self, forKey: .swiftCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderAddress != nil { try container.encode(accountHolderAddress, forKey: .accountHolderAddress) } if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if accountNumber != nil { try container.encode(accountNumber, forKey: .accountNumber) } if accountType != nil { try container.encode(accountType, forKey: .accountType) } if bankAddress != nil { try container.encode(bankAddress, forKey: .bankAddress) } if bankName != nil { try container.encode(bankName, forKey: .bankName) } if swiftCode != nil { try container.encode(swiftCode, forKey: .swiftCode) } } } public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin : StripeEntity_1 { public var accountHolderAddress:Address? public var accountHolderName:String? public var accountNumber:String? public var accountType:String? public var bankAddress:Address? public var bankCode:String? public var bankName:String? public var branchCode:String? public var branchName:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountHolderAddress case accountHolderName case accountNumber case accountType case bankAddress case bankCode case bankName case branchCode case branchName } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountHolderAddress = try container.decodeIfPresent(Address.self, forKey: .accountHolderAddress) accountHolderName = try container.decodeIfPresent(String.self, forKey: .accountHolderName) accountNumber = try container.decodeIfPresent(String.self, forKey: .accountNumber) accountType = try container.decodeIfPresent(String.self, forKey: .accountType) bankAddress = try container.decodeIfPresent(Address.self, forKey: .bankAddress) bankCode = try container.decodeIfPresent(String.self, forKey: .bankCode) bankName = try container.decodeIfPresent(String.self, forKey: .bankName) branchCode = try container.decodeIfPresent(String.self, forKey: .branchCode) branchName = try container.decodeIfPresent(String.self, forKey: .branchName) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountHolderAddress != nil { try container.encode(accountHolderAddress, forKey: .accountHolderAddress) } if accountHolderName != nil { try container.encode(accountHolderName, forKey: .accountHolderName) } if accountNumber != nil { try container.encode(accountNumber, forKey: .accountNumber) } if accountType != nil { try container.encode(accountType, forKey: .accountType) } if bankAddress != nil { try container.encode(bankAddress, forKey: .bankAddress) } if bankCode != nil { try container.encode(bankCode, forKey: .bankCode) } if bankName != nil { try container.encode(bankName, forKey: .bankName) } if branchCode != nil { try container.encode(branchCode, forKey: .branchCode) } if branchName != nil { try container.encode(branchName, forKey: .branchName) } } } public class PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilymart : StripeEntity_1 { public var confirmationNumber:String? public var paymentCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case confirmationNumber case paymentCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) confirmationNumber = try container.decodeIfPresent(String.self, forKey: .confirmationNumber) paymentCode = try container.decodeIfPresent(String.self, forKey: .paymentCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if confirmationNumber != nil { try container.encode(confirmationNumber, forKey: .confirmationNumber) } if paymentCode != nil { try container.encode(paymentCode, forKey: .paymentCode) } } } public class PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson : StripeEntity_1 { public var confirmationNumber:String? public var paymentCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case confirmationNumber case paymentCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) confirmationNumber = try container.decodeIfPresent(String.self, forKey: .confirmationNumber) paymentCode = try container.decodeIfPresent(String.self, forKey: .paymentCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if confirmationNumber != nil { try container.encode(confirmationNumber, forKey: .confirmationNumber) } if paymentCode != nil { try container.encode(paymentCode, forKey: .paymentCode) } } } public class PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop : StripeEntity_1 { public var confirmationNumber:String? public var paymentCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case confirmationNumber case paymentCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) confirmationNumber = try container.decodeIfPresent(String.self, forKey: .confirmationNumber) paymentCode = try container.decodeIfPresent(String.self, forKey: .paymentCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if confirmationNumber != nil { try container.encode(confirmationNumber, forKey: .confirmationNumber) } if paymentCode != nil { try container.encode(paymentCode, forKey: .paymentCode) } } } public class PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart : StripeEntity_1 { public var confirmationNumber:String? public var paymentCode:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case confirmationNumber case paymentCode } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) confirmationNumber = try container.decodeIfPresent(String.self, forKey: .confirmationNumber) paymentCode = try container.decodeIfPresent(String.self, forKey: .paymentCode) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if confirmationNumber != nil { try container.encode(confirmationNumber, forKey: .confirmationNumber) } if paymentCode != nil { try container.encode(paymentCode, forKey: .paymentCode) } } } public class PaymentIntentPaymentMethodOptionsCardInstallmentsPlan : StripeEntity_1 { public var count:Int? public var interval:String? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case count case interval case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) count = try container.decodeIfPresent(Int.self, forKey: .count) interval = try container.decodeIfPresent(String.self, forKey: .interval) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if count != nil { try container.encode(count, forKey: .count) } if interval != nil { try container.encode(interval, forKey: .interval) } if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity_1 { public var country:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case country } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) country = try container.decodeIfPresent(String.self, forKey: .country) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if country != nil { try container.encode(country, forKey: .country) } } } public class PaymentIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity_1 { public var accountSubcategories:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountSubcategories } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountSubcategories = try container.decodeIfPresent([String].self, forKey: .accountSubcategories) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountSubcategories != nil { try container.encode(accountSubcategories, forKey: .accountSubcategories) } } } public class PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesOptions : INestedOptions, Codable { public var cbAvalgo:String? public var cbExemption:String? public var cbScore:Int? required public init(){} } public class PaymentMethodCardGeneratedFromPaymentMethodDetails : StripeEntity_1 { public var cardPresent:PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case cardPresent case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) cardPresent = try container.decodeIfPresent(PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent.self, forKey: .cardPresent) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if cardPresent != nil { try container.encode(cardPresent, forKey: .cardPresent) } if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentMethodCardWalletAmexExpressCheckout : StripeEntity_1 { 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 PaymentMethodCardWalletApplePay : StripeEntity_1 { 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 PaymentMethodCardWalletGooglePay : StripeEntity_1 { 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 PaymentMethodCardWalletLink : StripeEntity_1 { 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 PaymentMethodCardWalletMasterpass : StripeEntity_1 { public var billingAddress:Address? public var email:String? public var name:String? public var shippingAddress:Address? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case billingAddress case email case name case shippingAddress } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) billingAddress = try container.decodeIfPresent(Address.self, forKey: .billingAddress) email = try container.decodeIfPresent(String.self, forKey: .email) name = try container.decodeIfPresent(String.self, forKey: .name) shippingAddress = try container.decodeIfPresent(Address.self, forKey: .shippingAddress) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if billingAddress != nil { try container.encode(billingAddress, forKey: .billingAddress) } if email != nil { try container.encode(email, forKey: .email) } if name != nil { try container.encode(name, forKey: .name) } if shippingAddress != nil { try container.encode(shippingAddress, forKey: .shippingAddress) } } } public class PaymentMethodCardWalletSamsungPay : StripeEntity_1 { 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 PaymentMethodCardWalletVisaCheckout : StripeEntity_1 { public var billingAddress:Address? public var email:String? public var name:String? public var shippingAddress:Address? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case billingAddress case email case name case shippingAddress } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) billingAddress = try container.decodeIfPresent(Address.self, forKey: .billingAddress) email = try container.decodeIfPresent(String.self, forKey: .email) name = try container.decodeIfPresent(String.self, forKey: .name) shippingAddress = try container.decodeIfPresent(Address.self, forKey: .shippingAddress) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if billingAddress != nil { try container.encode(billingAddress, forKey: .billingAddress) } if email != nil { try container.encode(email, forKey: .email) } if name != nil { try container.encode(name, forKey: .name) } if shippingAddress != nil { try container.encode(shippingAddress, forKey: .shippingAddress) } } } public class PaymentMethodUsBankAccountStatusDetailsBlocked : StripeEntity_1 { public var networkCode:String? public var reason:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case networkCode case reason } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) networkCode = try container.decodeIfPresent(String.self, forKey: .networkCode) reason = try container.decodeIfPresent(String.self, forKey: .reason) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if networkCode != nil { try container.encode(networkCode, forKey: .networkCode) } if reason != nil { try container.encode(reason, forKey: .reason) } } } public class SetupIntentNextActionCashappHandleRedirectOrDisplayQrCodeQrCode : StripeEntity_1 { public var expiresAt:Date? public var imageUrlPng:String? public var imageUrlSvg:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case expiresAt case imageUrlPng case imageUrlSvg } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) imageUrlPng = try container.decodeIfPresent(String.self, forKey: .imageUrlPng) imageUrlSvg = try container.decodeIfPresent(String.self, forKey: .imageUrlSvg) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if expiresAt != nil { try container.encode(expiresAt, forKey: .expiresAt) } if imageUrlPng != nil { try container.encode(imageUrlPng, forKey: .imageUrlPng) } if imageUrlSvg != nil { try container.encode(imageUrlSvg, forKey: .imageUrlSvg) } } } public class SetupIntentPaymentMethodOptionsAcssDebitMandateOptions : StripeEntity_1 { public var customMandateUrl:String? public var defaultFor:[String]? public var intervalDescription:String? public var paymentSchedule:String? public var transactionType:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case customMandateUrl case defaultFor case intervalDescription case paymentSchedule case transactionType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) customMandateUrl = try container.decodeIfPresent(String.self, forKey: .customMandateUrl) defaultFor = try container.decodeIfPresent([String].self, forKey: .defaultFor) ?? [] intervalDescription = try container.decodeIfPresent(String.self, forKey: .intervalDescription) paymentSchedule = try container.decodeIfPresent(String.self, forKey: .paymentSchedule) transactionType = try container.decodeIfPresent(String.self, forKey: .transactionType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if customMandateUrl != nil { try container.encode(customMandateUrl, forKey: .customMandateUrl) } if defaultFor != nil { try container.encode(defaultFor, forKey: .defaultFor) } if intervalDescription != nil { try container.encode(intervalDescription, forKey: .intervalDescription) } if paymentSchedule != nil { try container.encode(paymentSchedule, forKey: .paymentSchedule) } if transactionType != nil { try container.encode(transactionType, forKey: .transactionType) } } } public class SetupIntentPaymentMethodOptionsBacsDebitMandateOptions : StripeEntity_1 { public var referencePrefix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referencePrefix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referencePrefix = try container.decodeIfPresent(String.self, forKey: .referencePrefix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referencePrefix != nil { try container.encode(referencePrefix, forKey: .referencePrefix) } } } public class SetupIntentPaymentMethodOptionsCardMandateOptions : StripeEntity_1 { public var amount:Int? public var amountType:String? public var currency:String? public var Description:String? public var endDate:Date? public var interval:String? public var intervalCount:Int? public var reference:String? public var startDate:Date? public var supportedTypes:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amount case amountType case currency case Description case endDate case interval case intervalCount case reference case startDate case supportedTypes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amount = try container.decodeIfPresent(Int.self, forKey: .amount) amountType = try container.decodeIfPresent(String.self, forKey: .amountType) currency = try container.decodeIfPresent(String.self, forKey: .currency) Description = try container.decodeIfPresent(String.self, forKey: .Description) endDate = try container.decodeIfPresent(Date.self, forKey: .endDate) interval = try container.decodeIfPresent(String.self, forKey: .interval) intervalCount = try container.decodeIfPresent(Int.self, forKey: .intervalCount) reference = try container.decodeIfPresent(String.self, forKey: .reference) startDate = try container.decodeIfPresent(Date.self, forKey: .startDate) supportedTypes = try container.decodeIfPresent([String].self, forKey: .supportedTypes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amount != nil { try container.encode(amount, forKey: .amount) } if amountType != nil { try container.encode(amountType, forKey: .amountType) } if currency != nil { try container.encode(currency, forKey: .currency) } if Description != nil { try container.encode(Description, forKey: .Description) } if endDate != nil { try container.encode(endDate, forKey: .endDate) } if interval != nil { try container.encode(interval, forKey: .interval) } if intervalCount != nil { try container.encode(intervalCount, forKey: .intervalCount) } if reference != nil { try container.encode(reference, forKey: .reference) } if startDate != nil { try container.encode(startDate, forKey: .startDate) } if supportedTypes != nil { try container.encode(supportedTypes, forKey: .supportedTypes) } } } public class SetupIntentPaymentMethodOptionsSepaDebitMandateOptions : StripeEntity_1 { public var referencePrefix:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case referencePrefix } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) referencePrefix = try container.decodeIfPresent(String.self, forKey: .referencePrefix) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if referencePrefix != nil { try container.encode(referencePrefix, forKey: .referencePrefix) } } } public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnections : StripeEntity_1 { public var filters:SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters? public var permissions:[String]? public var prefetch:[String]? public var returnUrl:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case filters case permissions case prefetch case returnUrl } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) filters = try container.decodeIfPresent(SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters.self, forKey: .filters) permissions = try container.decodeIfPresent([String].self, forKey: .permissions) ?? [] prefetch = try container.decodeIfPresent([String].self, forKey: .prefetch) ?? [] returnUrl = try container.decodeIfPresent(String.self, forKey: .returnUrl) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if filters != nil { try container.encode(filters, forKey: .filters) } if permissions != nil { try container.encode(permissions, forKey: .permissions) } if prefetch != nil { try container.encode(prefetch, forKey: .prefetch) } if returnUrl != nil { try container.encode(returnUrl, forKey: .returnUrl) } } } public class SetupIntentPaymentMethodOptionsUsBankAccountMandateOptions : StripeEntity_1 { public var collectionMethod:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case collectionMethod } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) collectionMethod = try container.decodeIfPresent(String.self, forKey: .collectionMethod) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if collectionMethod != nil { try container.encode(collectionMethod, forKey: .collectionMethod) } } } public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent : StripeEntity_1 { public var amountAuthorized:Int? public var brand:String? public var brandProduct:String? public var captureBefore:Date? public var cardholderName:String? public var country:String? public var Description:String? public var emvAuthData:String? public var expMonth:Int? public var expYear:Int? public var fingerprint:String? public var funding:String? public var generatedCard:String? public var iin:String? public var incrementalAuthorizationSupported:Bool? public var issuer:String? public var last4:String? public var network:String? public var networkTransactionId:String? public var offline:PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline? public var overcaptureSupported:Bool? public var preferredLocales:[String]? public var readMethod:String? public var receipt:PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt? public var wallet:PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case amountAuthorized case brand case brandProduct case captureBefore case cardholderName case country case Description case emvAuthData case expMonth case expYear case fingerprint case funding case generatedCard case iin case incrementalAuthorizationSupported case issuer case last4 case network case networkTransactionId case offline case overcaptureSupported case preferredLocales case readMethod case receipt case wallet } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) amountAuthorized = try container.decodeIfPresent(Int.self, forKey: .amountAuthorized) brand = try container.decodeIfPresent(String.self, forKey: .brand) brandProduct = try container.decodeIfPresent(String.self, forKey: .brandProduct) captureBefore = try container.decodeIfPresent(Date.self, forKey: .captureBefore) cardholderName = try container.decodeIfPresent(String.self, forKey: .cardholderName) country = try container.decodeIfPresent(String.self, forKey: .country) Description = try container.decodeIfPresent(String.self, forKey: .Description) emvAuthData = try container.decodeIfPresent(String.self, forKey: .emvAuthData) expMonth = try container.decodeIfPresent(Int.self, forKey: .expMonth) expYear = try container.decodeIfPresent(Int.self, forKey: .expYear) fingerprint = try container.decodeIfPresent(String.self, forKey: .fingerprint) funding = try container.decodeIfPresent(String.self, forKey: .funding) generatedCard = try container.decodeIfPresent(String.self, forKey: .generatedCard) iin = try container.decodeIfPresent(String.self, forKey: .iin) incrementalAuthorizationSupported = try container.decodeIfPresent(Bool.self, forKey: .incrementalAuthorizationSupported) issuer = try container.decodeIfPresent(String.self, forKey: .issuer) last4 = try container.decodeIfPresent(String.self, forKey: .last4) network = try container.decodeIfPresent(String.self, forKey: .network) networkTransactionId = try container.decodeIfPresent(String.self, forKey: .networkTransactionId) offline = try container.decodeIfPresent(PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline.self, forKey: .offline) overcaptureSupported = try container.decodeIfPresent(Bool.self, forKey: .overcaptureSupported) preferredLocales = try container.decodeIfPresent([String].self, forKey: .preferredLocales) ?? [] readMethod = try container.decodeIfPresent(String.self, forKey: .readMethod) receipt = try container.decodeIfPresent(PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt.self, forKey: .receipt) wallet = try container.decodeIfPresent(PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet.self, forKey: .wallet) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if amountAuthorized != nil { try container.encode(amountAuthorized, forKey: .amountAuthorized) } if brand != nil { try container.encode(brand, forKey: .brand) } if brandProduct != nil { try container.encode(brandProduct, forKey: .brandProduct) } if captureBefore != nil { try container.encode(captureBefore, forKey: .captureBefore) } if cardholderName != nil { try container.encode(cardholderName, forKey: .cardholderName) } if country != nil { try container.encode(country, forKey: .country) } if Description != nil { try container.encode(Description, forKey: .Description) } if emvAuthData != nil { try container.encode(emvAuthData, forKey: .emvAuthData) } if expMonth != nil { try container.encode(expMonth, forKey: .expMonth) } if expYear != nil { try container.encode(expYear, forKey: .expYear) } if fingerprint != nil { try container.encode(fingerprint, forKey: .fingerprint) } if funding != nil { try container.encode(funding, forKey: .funding) } if generatedCard != nil { try container.encode(generatedCard, forKey: .generatedCard) } if iin != nil { try container.encode(iin, forKey: .iin) } if incrementalAuthorizationSupported != nil { try container.encode(incrementalAuthorizationSupported, forKey: .incrementalAuthorizationSupported) } if issuer != nil { try container.encode(issuer, forKey: .issuer) } if last4 != nil { try container.encode(last4, forKey: .last4) } if network != nil { try container.encode(network, forKey: .network) } if networkTransactionId != nil { try container.encode(networkTransactionId, forKey: .networkTransactionId) } if offline != nil { try container.encode(offline, forKey: .offline) } if overcaptureSupported != nil { try container.encode(overcaptureSupported, forKey: .overcaptureSupported) } if preferredLocales != nil { try container.encode(preferredLocales, forKey: .preferredLocales) } if readMethod != nil { try container.encode(readMethod, forKey: .readMethod) } if receipt != nil { try container.encode(receipt, forKey: .receipt) } if wallet != nil { try container.encode(wallet, forKey: .wallet) } } } public class SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters : StripeEntity_1 { public var accountSubcategories:[String]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountSubcategories } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountSubcategories = try container.decodeIfPresent([String].self, forKey: .accountSubcategories) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountSubcategories != nil { try container.encode(accountSubcategories, forKey: .accountSubcategories) } } } public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentOffline : StripeEntity_1 { public var storedAt:Date? public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case storedAt case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) storedAt = try container.decodeIfPresent(Date.self, forKey: .storedAt) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if storedAt != nil { try container.encode(storedAt, forKey: .storedAt) } if type != nil { try container.encode(type, forKey: .type) } } } public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentReceipt : StripeEntity_1 { public var accountType:String? public var applicationCryptogram:String? public var applicationPreferredName:String? public var authorizationCode:String? public var authorizationResponseCode:String? public var cardholderVerificationMethod:String? public var dedicatedFileName:String? public var terminalVerificationResults:String? public var transactionStatusInformation:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountType case applicationCryptogram case applicationPreferredName case authorizationCode case authorizationResponseCode case cardholderVerificationMethod case dedicatedFileName case terminalVerificationResults case transactionStatusInformation } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountType = try container.decodeIfPresent(String.self, forKey: .accountType) applicationCryptogram = try container.decodeIfPresent(String.self, forKey: .applicationCryptogram) applicationPreferredName = try container.decodeIfPresent(String.self, forKey: .applicationPreferredName) authorizationCode = try container.decodeIfPresent(String.self, forKey: .authorizationCode) authorizationResponseCode = try container.decodeIfPresent(String.self, forKey: .authorizationResponseCode) cardholderVerificationMethod = try container.decodeIfPresent(String.self, forKey: .cardholderVerificationMethod) dedicatedFileName = try container.decodeIfPresent(String.self, forKey: .dedicatedFileName) terminalVerificationResults = try container.decodeIfPresent(String.self, forKey: .terminalVerificationResults) transactionStatusInformation = try container.decodeIfPresent(String.self, forKey: .transactionStatusInformation) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountType != nil { try container.encode(accountType, forKey: .accountType) } if applicationCryptogram != nil { try container.encode(applicationCryptogram, forKey: .applicationCryptogram) } if applicationPreferredName != nil { try container.encode(applicationPreferredName, forKey: .applicationPreferredName) } if authorizationCode != nil { try container.encode(authorizationCode, forKey: .authorizationCode) } if authorizationResponseCode != nil { try container.encode(authorizationResponseCode, forKey: .authorizationResponseCode) } if cardholderVerificationMethod != nil { try container.encode(cardholderVerificationMethod, forKey: .cardholderVerificationMethod) } if dedicatedFileName != nil { try container.encode(dedicatedFileName, forKey: .dedicatedFileName) } if terminalVerificationResults != nil { try container.encode(terminalVerificationResults, forKey: .terminalVerificationResults) } if transactionStatusInformation != nil { try container.encode(transactionStatusInformation, forKey: .transactionStatusInformation) } } } public class PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet : StripeEntity_1 { public var type:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case type } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) type = try container.decodeIfPresent(String.self, forKey: .type) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if type != nil { try container.encode(type, forKey: .type) } } } public class ServicePriceResponse : Codable { /** * The company id */ // @ApiMember(Description="The company id") public var companyId:String? /** * The price id */ // @ApiMember(Description="The price id") public var id:Int? /** * The service id */ // @ApiMember(Description="The service id") public var serviceId:Int? /** * The price */ // @ApiMember(Description="The price") public var price:Double? /** * The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day */ // @ApiMember(Description="The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day") public var calculationTypeId:Int? /** * The price currency */ // @ApiMember(Description="The price currency") public var currencyId:String? /** * The price sign */ // @ApiMember(Description="The price sign") public var priceSign:String? /** * The price VAT in percent */ // @ApiMember(Description="The price VAT in percent") public var vat:Double? /** * The price category if price has a category */ // @ApiMember(Description="The price category if price has a category") public var category:String? /** * The price text to display */ // @ApiMember(Description="The price text to display") public var priceText:String? /** * The valid from date for the price. */ // @ApiMember(Description="The valid from date for the price.") public var from:Date? /** * The valid to date for the price. */ // @ApiMember(Description="The valid to date for the price.") public var to:Date? /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") public var daysOfWeek:[DayOfWeekDto]? /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") @TimeSpan public var fromTime:TimeInterval? /** * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") @TimeSpan public var toTime:TimeInterval? public var service:ServiceInfoResponse? /** * If the price is only valid for a specific time span */ // @ApiMember(Description="If the price is only valid for a specific time span") public var isTimeSpecific:Bool? /** * If the price is only valid for specific days of week */ // @ApiMember(Description="If the price is only valid for specific days of week") public var isDaysOfWeekSpecific:Bool? required public init(){} }