/* Options: Date: 2025-04-27 02:57:11 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: AdminIncentiveActionQuery.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/superadmin/incentives/action", "GET") // @ValidateRequest(Validator="IsAuthenticated") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) public class AdminIncentiveActionQuery : QueryDb2>, IReturn { public typealias Return = QueryResponse> public var id:Int? public var countryId:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case countryId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(Int.self, forKey: .id) countryId = try container.decodeIfPresent(String.self, forKey: .countryId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if countryId != nil { try container.encode(countryId, forKey: .countryId) } } } public class AccessKeyTypeResponse : Codable { public var id:Int public var keyType:String public var Description:String required public init(){} } public class BillingMethodQueryResponse : Codable { /** * The billing method id */ // @ApiMember(Description="The billing method id") public var id:Int /** * The billing method name */ // @ApiMember(Description="The billing method name") public var name:String /** * The billing method description */ // @ApiMember(Description="The billing method description") public var Description:String /** * The billing method is valid for the following countries */ // @ApiMember(Description="The billing method is valid for the following countries") public var countries:[String] = [] required public init(){} } public class CompanyInvoiceQueryResponse : Codable { /** * The company id */ // @ApiMember(Description="The company id") public var companyId:String /** * The invoice id */ // @ApiMember(Description="The invoice id") public var id:Int /** * Status of the invoice */ // @ApiMember(Description="Status of the invoice") public var statusId:Int /** * Date of the invoice */ // @ApiMember(Description="Date of the invoice") public var invoiceDate:Date /** * Due date of the invoice */ // @ApiMember(Description="Due date of the invoice") public var dueDate:Date? /** * What start date of the invoice period */ // @ApiMember(Description="What start date of the invoice period") public var periodFrom:Date /** * What end date of the invoice period */ // @ApiMember(Description="What end date of the invoice period") public var periodTo:Date /** * The total amount of the invoice */ // @ApiMember(Description="The total amount of the invoice") public var totalAmount:Double /** * The rounding of the total amount */ // @ApiMember(Description="The rounding of the total amount") public var rounding:Double /** * The VAT */ // @ApiMember(Description="The VAT") public var vat:Double /** * The VAT registration number */ // @ApiMember(Description="The VAT registration number") public var vatRegistrationNo:String /** * The company registration number */ // @ApiMember(Description="The company registration number") public var registrationNumber:String /** * The company name */ // @ApiMember(Description="The company name") public var companyName:String /** * The company owner, used for grouping invoices per CompanyOwner */ // @ApiMember(Description="The company owner, used for grouping invoices per CompanyOwner") public var companyOwner:CompanyOwnerResponse /** * The company type */ // @ApiMember(Description="The company type") public var companyType:CompanyTypeResponse /** * The company contact person */ // @ApiMember(Description="The company contact person") public var contactPerson:String /** * The company street */ // @ApiMember(Description="The company street") public var street1:String /** * The company street */ // @ApiMember(Description="The company street") public var street2:String /** * The company city */ // @ApiMember(Description="The company city") public var city:String /** * The company zip */ // @ApiMember(Description="The company zip") public var zip:String /** * The company country */ // @ApiMember(Description="The company country") public var countryId:String /** * The invoice currency */ // @ApiMember(Description="The invoice currency") public var currencyId:String /** * The invoice created date */ // @ApiMember(Description="The invoice created date") public var created:Date? /** * The invoice updated date */ // @ApiMember(Description="The invoice updated date") public var updated:Date? /** * The reference to promikbook invoice */ // @ApiMember(Description="The reference to promikbook invoice") public var promikBookInvoiceId:Int? /** * Any invoice message */ // @ApiMember(Description="Any invoice message") public var message:String /** * The currency information */ // @ApiMember(Description="The currency information") public var currencyInfo:CurrencyInfoResponse /** * The currency information */ // @ApiMember(Description="The currency information") public var invoiceStatus:InvoiceStatusResponse /** * The currency information */ // @ApiMember(Description="The currency information") public var invoiceLines:[InvoiceLineResponse] = [] /** * Billing information */ // @ApiMember(Description="Billing information") public var billingInformation:BillingInformationResponse public var externalReferences:[ExternalReference] = [] required public init(){} } public class BookingStatusQueryResponse : Codable { public var id:Int public var name:String public var Description:String public var icon:String public var color:String required public init(){} } public class GroupedBookingQueryResponse : Codable { public var companyId:String public var date:Date public var bookings:[BookingQueryResponse] = [] required public init(){} } public class CategoryQueryResponse : Codable { public var id:Int public var name:String public var Description:String public var header:String public var imageUrl:Uri public var active:Bool public var responseStatus:ResponseStatus required public init(){} } public class CompanyTypeQueryResponse : Codable { public var id:Int public var name:String public var Description:String required public init(){} } 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 CountryQueryResponse : Codable { public var id:String public var name:String public var Description:String public var responseStatus:ResponseStatus required public init(){} } 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 CurrencyQueryResponse : Codable { public var id:String public var name:String public var Description:String public var currencySign:String public var active:Bool public var responseStatus:ResponseStatus required public init(){} } public class GeoDataCitiesQueryResponse : Codable { public var id:String public var city:String public var longitude:String public var latitude:String public var country:String public var iso2:String public var admin:String public var capital:String public var population:Int? public var populationProper:Int? required public init(){} } public class IncentiveAction : BaseModel { public var id:Int public var Description:String public var actionType:IncentiveActionType public var page:String public var segment:String public var element:String public var licenseTypeId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case Description case actionType case page case segment case element case licenseTypeId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(Int.self, forKey: .id) Description = try container.decodeIfPresent(String.self, forKey: .Description) actionType = try container.decodeIfPresent(IncentiveActionType.self, forKey: .actionType) page = try container.decodeIfPresent(String.self, forKey: .page) segment = try container.decodeIfPresent(String.self, forKey: .segment) element = try container.decodeIfPresent(String.self, forKey: .element) licenseTypeId = try container.decodeIfPresent(Int.self, forKey: .licenseTypeId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if Description != nil { try container.encode(Description, forKey: .Description) } if actionType != nil { try container.encode(actionType, forKey: .actionType) } if page != nil { try container.encode(page, forKey: .page) } if segment != nil { try container.encode(segment, forKey: .segment) } if element != nil { try container.encode(element, forKey: .element) } if licenseTypeId != nil { try container.encode(licenseTypeId, forKey: .licenseTypeId) } } } public class LicenseTypeQueryResponse : Codable { /** * The license type id */ // @ApiMember(Description="The license type id") public var id:Int /** * The license type name */ // @ApiMember(Description="The license type name") public var name:String /** * The license type description */ // @ApiMember(Description="The license type description") public var Description:String /** * If the license type is not a standard license but instead an extra license option. An example would be sending new letter license. */ // @ApiMember(Description="If the license type is not a standard license but instead an extra license option. An example would be sending new letter license.") public var isExtraLicenseOption:Bool /** * The period of notice for the license in days. */ // @ApiMember(Description="The period of notice for the license in days.") public var periodOfNoticeDays:Int /** * The license items for the license type */ // @ApiMember(Description="The license items for the license type") public var items:[LicenseItemsResponse] = [] /** * The license prices in each country for the license type */ // @ApiMember(Description="The license prices in each country for the license type") public var prices:[LicensePrice] = [] required public init(){} } public class LicenseInformationQueryResponse : Codable { public var name:String public var Description:String public var url:Uri public var freeEdition:Bool public var startEdition:Bool public var proEdition:Bool public var smartEdition:Bool public var enterpriseEdition:Bool public var freeEditionValue:String public var startEditionValue:String public var proEditionValue:String public var smartEditionValue:String public var enterpriseEditionValue:String public var licenseInformationTypeId:Int required public init(){} } public class LicenseInformationTypeQueryResponse : Codable { /** * The license information type id */ // @ApiMember(Description="The license information type id") public var id:Int /** * The license information type name */ // @ApiMember(Description="The license information type name") public var name:String required public init(){} } public class DashboardMessageQueryResponse : Codable { /** * The message id */ // @ApiMember(Description="The message id") public var id:Int /** * The message title. */ // @ApiMember(Description="The message title.") public var title:String /** * The message body. */ // @ApiMember(Description="The message body.") public var body:String /** * If the message is important. */ // @ApiMember(Description="If the message is important.") public var important:Bool /** * If the message visible from date. */ // @ApiMember(Description="If the message visible from date.") public var visibleFrom:Date /** * If the message visible to date. */ // @ApiMember(Description="If the message visible to date.") public var visibleTo:Date /** * If the message created date. */ // @ApiMember(Description="If the message created date.") public var created:Date /** * If the message type id. */ // @ApiMember(Description="If the message type id.") public var messageTypeId:Int /** * If the message is connected to a support case. */ // @ApiMember(Description="If the message is connected to a support case.") public var supportCaseId:Int? /** * If the message type information. */ // @ApiMember(Description="If the message type information.") public var messageType:DasboardMessageTypeResponse required public init(){} } public class MessageTypeQueryResponse : Codable { /** * The message type id */ // @ApiMember(Description="The message type id") public var id:Int /** * The message type name. */ // @ApiMember(Description="The message type name.") public var name:String /** * The message type description. */ // @ApiMember(Description="The message type description.") public var Description:String /** * The maximum number of charachters that can be entered into message body using this type. */ // @ApiMember(Description="The maximum number of charachters that can be entered into message body using this type.") public var maxCharacters:Int /** * The default text that is always included when sending messages of this type. */ // @ApiMember(Description="The default text that is always included when sending messages of this type.") public var defaultText:String /** * The send method for this type. 1 = Email, 2 = SMS. */ // @ApiMember(Description="The send method for this type. 1 = Email, 2 = SMS.") public var sendMethodId:Int required public init(){} } public class FieldTranslationResponse : Codable { /** * The field translation id */ // @ApiMember(Description="The field translation id") public var id:Int /** * The field translation code. */ // @ApiMember(Description="The field translation code.") public var code:String /** * The field translation name. */ // @ApiMember(Description="The field translation name.") public var name:String /** * The field translation description. */ // @ApiMember(Description="The field translation description.") public var Description:String /** * The field translation group. */ // @ApiMember(Description="The field translation group.") public var group:String required public init(){} } public class MessageSendMethodQueryResponse : Codable { /** * The send method id */ // @ApiMember(Description="The send method id") public var id:Int /** * The send method name. */ // @ApiMember(Description="The send method name.") public var name:String /** * The send method description. */ // @ApiMember(Description="The send method description.") public var Description:String required public init(){} } public class NewsletterSendMethodQueryResponse : Codable { /** * The send method id */ // @ApiMember(Description="The send method id") public var id:Int /** * The send method name. */ // @ApiMember(Description="The send method name.") public var name:String /** * The send method description. */ // @ApiMember(Description="The send method description.") public var Description:String required public init(){} } public class NewsletterFieldTranslationResponse : Codable { /** * The field translation id */ // @ApiMember(Description="The field translation id") public var id:Int /** * The field translation code. */ // @ApiMember(Description="The field translation code.") public var code:String /** * The field translation name. */ // @ApiMember(Description="The field translation name.") public var name:String /** * The field translation description. */ // @ApiMember(Description="The field translation description.") public var Description:String /** * The field translation group. */ // @ApiMember(Description="The field translation group.") public var group:String required public init(){} } public class NewsletterEmailTemplatesQueryResponse : Codable { /** * The email template id */ // @ApiMember(Description="The email template id") public var id:Int /** * The email template name. */ // @ApiMember(Description="The email template name.") public var name:String /** * The email template description. */ // @ApiMember(Description="The email template description.") public var Description:String /** * The email template html content. */ // @ApiMember(Description="The email template html content.") public var body:String required public init(){} } 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 RebateCodeTransactionQueryResponse : Codable { public var id:Int public var companyId:String public var note:String public var rebateCodeId:Int public var rebateCodeSign:String public var rebateCodeTypeId:Int? public var rebateCodeTypeName:String public var amount:Double public var usage:String public var bookingId:Int? public var updatedDate:Date public var createdDate:Date public var service:RebateCodeServiceResponse public var customer:RebateCodeCustomerResponse public var priceSign:String required public init(){} } 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 BookingReportFieldTranslationResponse : Codable { /** * The field translation id */ // @ApiMember(Description="The field translation id") public var id:Int /** * The field translation code. */ // @ApiMember(Description="The field translation code.") public var code:String /** * The field translation name. */ // @ApiMember(Description="The field translation name.") public var name:String /** * The field translation description. */ // @ApiMember(Description="The field translation description.") public var Description:String /** * The field translation group. */ // @ApiMember(Description="The field translation group.") public var group:String required public init(){} } public class GroupedServiceQueryResponse : Codable { public var group:String public var sortOrder:Int public var items:[ServiceQueryResponse] = [] public var responseStatus:ResponseStatus required public init(){} } public class PriceViewTypeQueryResponse : Codable { public var id:Int public var name:String public var Description:String required public init(){} } public class SupportCaseStatusResponse : Codable { /** * The status id */ // @ApiMember(Description="The status id") public var id:Int /** * The status name */ // @ApiMember(Description="The status name") public var name:String /** * The status description */ // @ApiMember(Description="The status description") public var Description:String /** * The status icon */ // @ApiMember(Description="The status icon") public var icon:String /** * The status color */ // @ApiMember(Description="The status color") public var color:String required public init(){} } public class SupportCaseTypeResponse : Codable { /** * The type id */ // @ApiMember(Description="The type id") public var id:Int /** * The type name */ // @ApiMember(Description="The type name") public var name:String /** * The type description */ // @ApiMember(Description="The type description") public var Description:String required public init(){} } public class SupportCaseAreaResponse : Codable { /** * The area id */ // @ApiMember(Description="The area id") public var id:Int /** * The area name */ // @ApiMember(Description="The area name") public var name:String /** * The area description */ // @ApiMember(Description="The area description") public var Description:String required public init(){} } public class TrialQueryResponse : Codable { public var id:Int public var name:String public var trialDays:Int required public init(){} } public class RebateCodeServiceResponse : Codable { public var id:Int public var name:String public var Description:String public var active:Bool required public init(){} } public class RebateCodeCustomerResponse : Codable { public var id:String public var firstname:String public var lastname:String public var email:String public var phone:String public var imageUrl:String required public init(){} } public class BaseModel : Codable { required public init(){} } public class CompanyOwnerResponse : Codable { /** * Company owner id */ // @ApiMember(Description="Company owner id") public var id:Int /** * Company owner name */ // @ApiMember(Description="Company owner name") public var name:String required public init(){} } public class CompanyTypeResponse : Codable { /** * Company type id */ // @ApiMember(Description="Company type id") public var id:Int /** * Company type name */ // @ApiMember(Description="Company type name") public var name:String required public init(){} } public class CurrencyInfoResponse : Codable { /** * The currency id */ // @ApiMember(Description="The currency id") public var id:String /** * The currency id */ // @ApiMember(Description="The currency id") public var name:String /** * The currency id */ // @ApiMember(Description="The currency id") public var currencySign:String required public init(){} } public class InvoiceStatusResponse : Codable { /** * The status id */ // @ApiMember(Description="The status id") public var id:Int /** * The status name */ // @ApiMember(Description="The status name") public var name:String /** * The status description */ // @ApiMember(Description="The status description") public var Description:String required public init(){} } public class InvoiceLineResponse : Codable { /** * The invoice id */ // @ApiMember(Description="The invoice id") public var invoiceId:Int /** * The invoice line id */ // @ApiMember(Description="The invoice line id") public var id:Int /** * The invoice line period from date */ // @ApiMember(Description="The invoice line period from date") public var periodFrom:Date /** * The invoice line period to date */ // @ApiMember(Description="The invoice line period to date") public var periodTo:Date /** * The invoice line article number */ // @ApiMember(Description="The invoice line article number") public var articleNumber:Int? /** * The invoice line article name */ // @ApiMember(Description="The invoice line article name") public var articleName:String /** * The invoice line article description */ // @ApiMember(Description="The invoice line article description") public var articleDescription:String /** * The invoice line quantity */ // @ApiMember(Description="The invoice line quantity") public var quantity:Int /** * The invoice line unit price */ // @ApiMember(Description="The invoice line unit price") public var unitPrice:Double /** * The invoice line sub total */ // @ApiMember(Description="The invoice line sub total") public var subTotal:Double /** * The invoice line rebate in percent */ // @ApiMember(Description="The invoice line rebate in percent") public var rebate:Int /** * The invoice line updated date */ // @ApiMember(Description="The invoice line updated date") public var updated:Date? /** * The invoice line created date */ // @ApiMember(Description="The invoice line created date") public var created:Date? required public init(){} } public enum IncentiveActionType : Int, Codable { case Upgrade = 1 case AddOn = 2 case Information = 3 } 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 LicenseItemsResponse : Codable { public var id:Int public var name:String public var allowedItems:Int required public init(){} } public class DasboardMessageTypeResponse : Codable { /** * The message type id */ // @ApiMember(Description="The message type id") public var id:Int /** * The message type name */ // @ApiMember(Description="The message type name") public var name:String /** * The message type description */ // @ApiMember(Description="The message type description") public var Description:String /** * The message type image */ // @ApiMember(Description="The message type image") public var imageUrl:String /** * If the message type is a application message */ // @ApiMember(Description="If the message type is a application message") public var applicationMessage:Bool? /** * The message type icon */ // @ApiMember(Description="The message type icon") public var icon:String /** * The message type color */ // @ApiMember(Description="The message type color") public var color:String required public init(){} } public enum Currency : Int, Codable { case SEK = 1 case EUR = 2 } public class BillingInformationResponse : Codable { /** * The company id. */ // @ApiMember(Description="The company id.") public var companyId:String /** * The prefered billing method. */ // @ApiMember(Description="The prefered billing method.", IsRequired=true) public var billingMethodId:Int /** * The name that should be printed on the billing information, normally this would be your company name. */ // @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.") public var name:String /** * If you want to add the attention to the billing address. */ // @ApiMember(Description="If you want to add the attention to the billing address.") public var attention:String /** * The street for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.") public var street1:String /** * The street for the billing adress. */ // @ApiMember(Description="The street for the billing adress.") public var street2:String /** * The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.") public var zipCode:String /** * The city for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.") public var city:String /** * The country for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.") public var countryId:String /** * The billing email. This is required when having email invoice as billing method. */ // @ApiMember(Description="The billing email. This is required when having email invoice as billing method.") public var email:String /** * The company global location number. */ // @ApiMember(Description="The company global location number.") public var gln:String /** * You're internal rereference. */ // @ApiMember(Description="You're internal rereference.") public var referenceLine1:String /** * You're internal rereference. */ // @ApiMember(Description="You're internal rereference.") public var referenceLine2:String /** * The billing payment terms in days. This is default 15 days. */ // @ApiMember(Description="The billing payment terms in days. This is default 15 days.") public var paymentTermsDays:Int /** * The company vat registration number. */ // @ApiMember(Description="The company vat registration number.") public var vatRegistrationNumber:String /** * The billing method options to choose from */ // @ApiMember(Description="The billing method options to choose from") public var billingMethodOptions:[BillingMethod] = [] required public init(){} } public class BookingQueryResponse : Codable { public var id:Int public var companyId:String public var from:Date public var to:Date public var status:BookingStatusEnum public var statusId:Int public var statusName:String public var statusInfo:BookingStatusQueryResponse public var sendEmailReminder:Bool public var sendSmsReminder:Bool public var sendSmsConfirmation:Bool public var sendEmailConfirmation:Bool public var lastTimeToUnBook:Date? public var customFields:[CustomFieldConfigData] = [] public var customFieldValues:[CustomFieldDataResponse] = [] public var bookedResourceTypes:[BookedResourceType] = [] public var company:BookedCompany public var customer:BookedCustomer public var quantities:[BookedQuantity] = [] public var service:ServiceInfoResponse public var paymentExpiration:Date? public var log:[BookingLogQueryResponse] = [] public var paymentLog:[BookingPaymentLogQueryResponse] = [] public var checkoutLog:[BookingCheckoutQueryResponse] = [] public var externalReference:[ExternalReferenceResponse] = [] public var responseStatus:ResponseStatus public var calendarExportStatus:BookingCalendarExportStatus public var lengthInMinutes:Int? public var bookedBy:String public var bookedComments:String public var unbookedComments:String public var commentsToCustomer:String public var createdDate:Date public var updatedDate:Date public var unbookedOn:Date? public var cancellationCode:String public var ratingCode:String 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(){} }