/* Options: Date: 2024-12-03 18:12:41 SwiftVersion: 5.0 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: ServiceQuery.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/services", "GET") public class ServiceQuery : QueryDb2, IReturn { public typealias Return = QueryResponse /** * Company to show services for */ // @ApiMember(Description="Company to show services for", ParameterType="query") public var companyId:String? /** * If you only want to get a specific service */ // @ApiMember(Description="If you only want to get a specific service", ParameterType="query") public var id:Int? /** * Service status */ // @ApiMember(DataType="boolean", Description="Service status", ParameterType="query") public var active:Bool? /** * If you want to include the connected resource types and resources */ // @ApiMember(DataType="boolean", Description="If you want to include the connected resource types and resources", ParameterType="query") public var includeResources:Bool /** * If you want to include the connected schedules */ // @ApiMember(DataType="boolean", Description="If you want to include the connected schedules", ParameterType="query") public var includeSchedules:Bool /** * If you want to include the connected custom fields */ // @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query") public var includeCustomFields:Bool /** * If you want to include the connected custom fields selectable values */ // @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields selectable values", ParameterType="query") public var includeCustomFieldValues:Bool /** * If you want to include the connected custom fields needs to be entered when booking a new time on the service */ // @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields needs to be entered when booking a new time on the service", ParameterType="query") public var includeBookingCustomFields:Bool /** * If you want to include the connected custom fields for the customers */ // @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields for the customers", ParameterType="query") public var includeCustomerCustomFields:Bool /** * If you want to include the service prices */ // @ApiMember(DataType="boolean", Description="If you want to include the service prices", ParameterType="query") public var includePrices:Bool /** * If you have selected to include the prices, here you can set the date to show the prices for */ // @ApiMember(DataType="dateTime", Description="If you have selected to include the prices, here you can set the date to show the prices for", ParameterType="query") public var priceDate:Date? /** * If you have selected to include the prices, here you can set the datetime to show the exact price */ // @ApiMember(DataType="timeSpan", Description="If you have selected to include the prices, here you can set the datetime to show the exact price", ParameterType="query") @TimeSpan public var priceTime:TimeInterval? /** * If you have selected to include the prices, here you can include the rebate codes */ // @ApiMember(Description="If you have selected to include the prices, here you can include the rebate codes") public var rebateCodeIds:[Int] /** * If you have selected to include the prices, here you can include the quantities to book to get the correct total price. */ // @ApiMember(Description="If you have selected to include the prices, here you can include the quantities to book to get the correct total price.") public var quantities:[QuantityToBook] /** * If you want to include the booking status options to select from */ // @ApiMember(DataType="boolean", Description="If you want to include the booking status options to select from", ParameterType="query") public var includeBookingStatusOptions:Bool /** * If you want to include the rating reviews */ // @ApiMember(DataType="boolean", Description="If you want to include the rating reviews", ParameterType="query") public var includeRatingReviews:Bool /** * If you want to include the rating summary */ // @ApiMember(DataType="boolean", Description="If you want to include the rating summary", ParameterType="query") public var includeRatingSummary:Bool /** * If you want to filter out prices which or not active for the day */ // @ApiMember(DataType="boolean", Description="If you want to filter out prices which or not active for the day", ParameterType="query") public var includePricesFromOtherDays:Bool required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case id case active case includeResources case includeSchedules case includeCustomFields case includeCustomFieldValues case includeBookingCustomFields case includeCustomerCustomFields case includePrices case priceDate case priceTime case rebateCodeIds case quantities case includeBookingStatusOptions case includeRatingReviews case includeRatingSummary case includePricesFromOtherDays } 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) active = try container.decodeIfPresent(Bool.self, forKey: .active) includeResources = try container.decodeIfPresent(Bool.self, forKey: .includeResources) includeSchedules = try container.decodeIfPresent(Bool.self, forKey: .includeSchedules) includeCustomFields = try container.decodeIfPresent(Bool.self, forKey: .includeCustomFields) includeCustomFieldValues = try container.decodeIfPresent(Bool.self, forKey: .includeCustomFieldValues) includeBookingCustomFields = try container.decodeIfPresent(Bool.self, forKey: .includeBookingCustomFields) includeCustomerCustomFields = try container.decodeIfPresent(Bool.self, forKey: .includeCustomerCustomFields) includePrices = try container.decodeIfPresent(Bool.self, forKey: .includePrices) priceDate = try container.decodeIfPresent(Date.self, forKey: .priceDate) priceTime = try container.convertIfPresent(TimeInterval.self, forKey: .priceTime) rebateCodeIds = try container.decodeIfPresent([Int].self, forKey: .rebateCodeIds) ?? [] quantities = try container.decodeIfPresent([QuantityToBook].self, forKey: .quantities) ?? [] includeBookingStatusOptions = try container.decodeIfPresent(Bool.self, forKey: .includeBookingStatusOptions) includeRatingReviews = try container.decodeIfPresent(Bool.self, forKey: .includeRatingReviews) includeRatingSummary = try container.decodeIfPresent(Bool.self, forKey: .includeRatingSummary) includePricesFromOtherDays = try container.decodeIfPresent(Bool.self, forKey: .includePricesFromOtherDays) } 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 active != nil { try container.encode(active, forKey: .active) } if includeResources != nil { try container.encode(includeResources, forKey: .includeResources) } if includeSchedules != nil { try container.encode(includeSchedules, forKey: .includeSchedules) } if includeCustomFields != nil { try container.encode(includeCustomFields, forKey: .includeCustomFields) } if includeCustomFieldValues != nil { try container.encode(includeCustomFieldValues, forKey: .includeCustomFieldValues) } if includeBookingCustomFields != nil { try container.encode(includeBookingCustomFields, forKey: .includeBookingCustomFields) } if includeCustomerCustomFields != nil { try container.encode(includeCustomerCustomFields, forKey: .includeCustomerCustomFields) } if includePrices != nil { try container.encode(includePrices, forKey: .includePrices) } if priceDate != nil { try container.encode(priceDate, forKey: .priceDate) } if priceTime != nil { try container.encode(priceTime, forKey: .priceTime) } if rebateCodeIds.count > 0 { try container.encode(rebateCodeIds, forKey: .rebateCodeIds) } if quantities.count > 0 { try container.encode(quantities, forKey: .quantities) } if includeBookingStatusOptions != nil { try container.encode(includeBookingStatusOptions, forKey: .includeBookingStatusOptions) } if includeRatingReviews != nil { try container.encode(includeRatingReviews, forKey: .includeRatingReviews) } if includeRatingSummary != nil { try container.encode(includeRatingSummary, forKey: .includeRatingSummary) } if includePricesFromOtherDays != nil { try container.encode(includePricesFromOtherDays, forKey: .includePricesFromOtherDays) } } } 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 articleType:ArticleTypeEnum // @Ignore() public var articleTypeName:String // @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? // @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 articleType case articleTypeName case companyId case id case name case articleTypeId case Description case imageUrl case active case amount case price 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) ?? [] articleType = try container.decodeIfPresent(ArticleTypeEnum.self, forKey: .articleType) articleTypeName = try container.decodeIfPresent(String.self, forKey: .articleTypeName) 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) 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.count > 0 { try container.encode(articleServiceRelations, forKey: .articleServiceRelations) } if serviceIds.count > 0 { try container.encode(serviceIds, forKey: .serviceIds) } if articleType != nil { try container.encode(articleType, forKey: .articleType) } if articleTypeName != nil { try container.encode(articleTypeName, forKey: .articleTypeName) } 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 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 calendarExport:CalendarExport // @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 currencyInfo:Currency 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] = [] // @Ignore() public var internalReferenceId:String // @Required() public var updatedDate:Date? // @Required() public var createdDate:Date? 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? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case service case calendarExport case log case checkoutLogs case prices case status case isReserved case statusName case currencyInfo 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 updatedDate case createdDate 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 } 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) calendarExport = try container.decodeIfPresent(CalendarExport.self, forKey: .calendarExport) 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) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) 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) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) createdDate = try container.decodeIfPresent(Date.self, forKey: .createdDate) 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) } 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 calendarExport != nil { try container.encode(calendarExport, forKey: .calendarExport) } if log.count > 0 { try container.encode(log, forKey: .log) } if checkoutLogs.count > 0 { try container.encode(checkoutLogs, forKey: .checkoutLogs) } if prices.count > 0 { 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 currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } 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.count > 0 { try container.encode(priceMappings, forKey: .priceMappings) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } if createdDate != nil { try container.encode(createdDate, forKey: .createdDate) } 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) } } } 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 QuantityToBook : Codable { /** * If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book) */ // @ApiMember(Description="If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)", IsRequired=true) public var priceId:Int /** * Set the number of spots or resources you want to book on the specific price category */ // @ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true) public var quantity:Int /** * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. */ // @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.") public var occupiesSpot:Bool 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 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? 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 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 } 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) ?? [] 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) } 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.count > 0 { try container.encode(ratings, forKey: .ratings) } if distance != nil { try container.encode(distance, forKey: .distance) } if licenses.count > 0 { try container.encode(licenses, forKey: .licenses) } if activeLicenses.count > 0 { 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) } } } 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 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 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 company case customFieldsConfig case customFieldsData case comments case rebateCodes case firstname 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) 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) 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 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 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.count > 0 { 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.count > 0 { try container.encode(services, forKey: .services) } if customFieldServiceRelation.count > 0 { 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 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 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) 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 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 // @Ignore() public var article:Article // @Ignore() public var services:[Service] = [] public var rebateCodeDayOfWeekRelation:[RebateCodeDayOfWeekRelation] = [] public var rebateCodeServiceRelation:[RebateCodeServiceRelation] = [] public var rebateCodeBookingPriceRelation:[RebateCodeBookingPriceRelation] = [] public var rebateCodeCustomerRelation:[RebateCodeCustomerRelation] = [] // @Ignore() public var servicesNames:String // @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 public var currencyInfo:Currency // @Ignore() public var paymentReceived:Bool // @Ignore() public var internalReferenceId:String // @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 created:Date? // @Required() public var updatedBy:String? // @Required() public var updatedDate:Date? // @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 article case services case rebateCodeDayOfWeekRelation case rebateCodeServiceRelation case rebateCodeBookingPriceRelation case rebateCodeCustomerRelation case servicesNames case daysOfWeek case rebateCodeStatus case rebateCodeType case transactions case remainingAmount case remainingUsage case currentNumberOfUsesPerCustomer case isSpecificByDayOfWeek case active case activeByStatus case rebateCodeCurrencySign case currencyInfo case paymentReceived case internalReferenceId case validFrom case validTo case rebateCodeSign case rebateCodeValue case maxNumberOfUses case maxNumberOfUsesPerCustomer case numberOfUsesUsed case personalNote case createdBy case created case updatedBy case updatedDate 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) article = try container.decodeIfPresent(Article.self, forKey: .article) services = try container.decodeIfPresent([Service].self, forKey: .services) ?? [] 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) ?? [] servicesNames = try container.decodeIfPresent(String.self, forKey: .servicesNames) 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) currencyInfo = try container.decodeIfPresent(Currency.self, forKey: .currencyInfo) 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) created = try container.decodeIfPresent(Date.self, forKey: .created) updatedBy = try container.decodeIfPresent(String.self, forKey: .updatedBy) updatedDate = try container.decodeIfPresent(Date.self, forKey: .updatedDate) 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 article != nil { try container.encode(article, forKey: .article) } if services.count > 0 { try container.encode(services, forKey: .services) } if rebateCodeDayOfWeekRelation.count > 0 { try container.encode(rebateCodeDayOfWeekRelation, forKey: .rebateCodeDayOfWeekRelation) } if rebateCodeServiceRelation.count > 0 { try container.encode(rebateCodeServiceRelation, forKey: .rebateCodeServiceRelation) } if rebateCodeBookingPriceRelation.count > 0 { try container.encode(rebateCodeBookingPriceRelation, forKey: .rebateCodeBookingPriceRelation) } if rebateCodeCustomerRelation.count > 0 { try container.encode(rebateCodeCustomerRelation, forKey: .rebateCodeCustomerRelation) } if servicesNames != nil { try container.encode(servicesNames, forKey: .servicesNames) } if daysOfWeek.count > 0 { 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.count > 0 { 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 currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } 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 created != nil { try container.encode(created, forKey: .created) } if updatedBy != nil { try container.encode(updatedBy, forKey: .updatedBy) } if updatedDate != nil { try container.encode(updatedDate, forKey: .updatedDate) } 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.count > 0 { 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.count > 0 { 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.count > 0 { try container.encode(dayOfWeeks, forKey: .dayOfWeeks) } if priceBeforeRebate != nil { try container.encode(priceBeforeRebate, forKey: .priceBeforeRebate) } if rebateCodesApplied.count > 0 { try container.encode(rebateCodesApplied, forKey: .rebateCodesApplied) } if priceText != nil { try container.encode(priceText, forKey: .priceText) } if overlappingPrices.count > 0 { 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 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 CalendarExport : BaseModel { // @Required() public var companyId:String? // @Required() public var bookingId:Int? // @Required() public var exceptionId:Int? public var calendarSync:Bool? public var calendarId:String public var isExceptionDeleted:Bool? public var modifiedDate:Date? public var id:Int required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case bookingId case exceptionId case calendarSync case calendarId case isExceptionDeleted case modifiedDate case id } 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) bookingId = try container.decodeIfPresent(Int.self, forKey: .bookingId) exceptionId = try container.decodeIfPresent(Int.self, forKey: .exceptionId) calendarSync = try container.decodeIfPresent(Bool.self, forKey: .calendarSync) calendarId = try container.decodeIfPresent(String.self, forKey: .calendarId) isExceptionDeleted = try container.decodeIfPresent(Bool.self, forKey: .isExceptionDeleted) 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 companyId != nil { try container.encode(companyId, forKey: .companyId) } if bookingId != nil { try container.encode(bookingId, forKey: .bookingId) } if exceptionId != nil { try container.encode(exceptionId, forKey: .exceptionId) } if calendarSync != nil { try container.encode(calendarSync, forKey: .calendarSync) } if calendarId != nil { try container.encode(calendarId, forKey: .calendarId) } if isExceptionDeleted != nil { try container.encode(isExceptionDeleted, forKey: .isExceptionDeleted) } 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:QvicklyCheckoutResponse // @Ignore() public var payson2CheckoutSerialized:Payson2CheckoutResponse // @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 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(QvicklyCheckoutResponse.self, forKey: .qvicklyCheckoutSerialized) payson2CheckoutSerialized = try container.decodeIfPresent(Payson2CheckoutResponse.self, forKey: .payson2CheckoutSerialized) 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 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 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 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) 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 currencyInfo != nil { try container.encode(currencyInfo, forKey: .currencyInfo) } if priceText != nil { try container.encode(priceText, forKey: .priceText) } if appliedCodes.count > 0 { 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 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 QvicklyCheckoutResponse : 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 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 protocol IPaysonPaymentCheckout1 { } public protocol ILogger_1 : ILogger { associatedtype TCategoryName } public class PayableEntity : BaseModel, IPayableEntity { //dbFactory:IDbConnectionFactory ignored. Swift doesn't support interface properties //qvicklyPaymentManager:IBokameraPaymentManager ignored. Swift doesn't support interface properties //payson2PaymentManager: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 internalReferenceId:String // @Ignore() public var paymentLog:[PaymentLog] = [] public var companyId:String public var priceVat:Double? // @References(typeof(Currency)) public var currencyId:String // @Ignore() public var customer:Customer // @Ignore() public var customers:[Customer] = [] // @Ignore() public var company:Company required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case dbFactory case qvicklyPaymentManager case payson2PaymentManager case paysonPaymentCheckout1 case logger case internalReferenceId case paymentLog case companyId case priceVat case currencyId case customer case customers case company } 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) qvicklyPaymentManager = try container.decodeIfPresent(IBokameraPaymentManager.self, forKey: .qvicklyPaymentManager) payson2PaymentManager = try container.decodeIfPresent(IBokameraPaymentManager.self, forKey: .payson2PaymentManager) paysonPaymentCheckout1 = try container.decodeIfPresent(IPaysonPaymentCheckout1.self, forKey: .paysonPaymentCheckout1) logger = try container.decodeIfPresent(ILogger_1.self, forKey: .logger) internalReferenceId = try container.decodeIfPresent(String.self, forKey: .internalReferenceId) paymentLog = try container.decodeIfPresent([PaymentLog].self, forKey: .paymentLog) ?? [] companyId = try container.decodeIfPresent(String.self, forKey: .companyId) priceVat = try container.decodeIfPresent(Double.self, forKey: .priceVat) currencyId = try container.decodeIfPresent(String.self, forKey: .currencyId) customer = try container.decodeIfPresent(Customer.self, forKey: .customer) customers = try container.decodeIfPresent([Customer].self, forKey: .customers) ?? [] company = try container.decodeIfPresent(Company.self, forKey: .company) } 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 qvicklyPaymentManager != nil { try container.encode(qvicklyPaymentManager, forKey: .qvicklyPaymentManager) } if payson2PaymentManager != nil { try container.encode(payson2PaymentManager, forKey: .payson2PaymentManager) } if paysonPaymentCheckout1 != nil { try container.encode(paysonPaymentCheckout1, forKey: .paysonPaymentCheckout1) } if logger != nil { try container.encode(logger, forKey: .logger) } if internalReferenceId != nil { try container.encode(internalReferenceId, forKey: .internalReferenceId) } if paymentLog.count > 0 { try container.encode(paymentLog, forKey: .paymentLog) } if companyId != nil { try container.encode(companyId, forKey: .companyId) } if priceVat != nil { try container.encode(priceVat, forKey: .priceVat) } if currencyId != nil { try container.encode(currencyId, forKey: .currencyId) } if customer != nil { try container.encode(customer, forKey: .customer) } if customers.count > 0 { try container.encode(customers, forKey: .customers) } if company != nil { try container.encode(company, forKey: .company) } } } 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 protocol IPayableEntity : ICompanyInformationLoader, ICustomerInformationLoader { var internalReferenceId:String { get set } // @Ignore() var paymentLog:[PaymentLog] { get set } } public protocol ICompanyInformationLoader { var companyId:String { get set } } public protocol ICustomerInformationLoader { var customer:Customer { get set } var customers:[Customer] { get set } } 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 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 // @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 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 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) 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) 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.count > 0 { try container.encode(scheduleViewOptions, forKey: .scheduleViewOptions) } if weekNumberSettingOptions.count > 0 { try container.encode(weekNumberSettingOptions, forKey: .weekNumberSettingOptions) } if bookingTemplateOptions.count > 0 { try container.encode(bookingTemplateOptions, forKey: .bookingTemplateOptions) } if calendarTypeOptions.count > 0 { try container.encode(calendarTypeOptions, forKey: .calendarTypeOptions) } if freeSpotTextOptions.count > 0 { try container.encode(freeSpotTextOptions, forKey: .freeSpotTextOptions) } if bookingStatusOptions.count > 0 { 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 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 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.count > 0 { 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.count > 0 { try container.encode(adminPaymentOptions, forKey: .adminPaymentOptions) } if paymentProviderOptions.count > 0 { 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? 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 } 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) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if languages.count > 0 { 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) } } } 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.count > 0 { try container.encode(widgetServiceLayoutOptions, forKey: .widgetServiceLayoutOptions) } if widgetTimeLayoutOptions.count > 0 { try container.encode(widgetTimeLayoutOptions, forKey: .widgetTimeLayoutOptions) } if widgetBookingLayoutOptions.count > 0 { try container.encode(widgetBookingLayoutOptions, forKey: .widgetBookingLayoutOptions) } if widgetBookingMethodOptions.count > 0 { 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.count > 0 { try container.encode(homepageTemplateOptions, forKey: .homepageTemplateOptions) } if homepageHeroSectionStyleOptions.count > 0 { 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 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 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 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 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 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 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:String public var date:String required public init(){} } public class QvicklyCustomer : Codable { public var nr:String public var pno:String public var billing:CustomerBilling required public init(){} } public class Cart : Codable { public var handling:CartHandling public var total:CartTotal public var shipping:Shipping 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:Uri public var confirmationUri:Uri 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 protocol ILogger { } 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 ServerData : Codable { public var httP_HOST:String public var httP_CONNECTION:String public var httP_CACHE_CONTROL:String public var httP_ACCEPT:String public var httP_USER_AGENT:String public var httP_ACCEPT_ENCODING:String public var httP_ACCEPT_LANGUAGE:String public var path:String public var serveR_SOFTWARE:String public var serveR_NAME:String public var serveR_ADDR:String public var serveR_PORT:String public var remotE_ADDR:String public var remotE_PORT:String public var gatewaY_INTERFACE:String public var serveR_PROTOCOL:String public var requesT_METHOD:String public var querY_STRING:String public var requesT_TIME:String required public init(){} } 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:Uri public var cancelurl:Uri public var callbackurl:Uri 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 class CartHandling : Codable { public var withouttax:String public var taxrate:String required public init(){} } public class CartTotal : Codable { public var rounding:String public var withouttax:String public var tax:String public var withtax:String 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 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 enum ItemType : String, Codable { case Physical case Service case Fee case Discount } 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(){} } 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(){} }