/* Options: Date: 2025-12-07 23:56:18 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetVossCustomerInvoiceBalance.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/voss/invoice/balance", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) public class GetVossCustomerInvoiceBalance : VossPagination { /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") public var companyId:String? /** * Controls up to which point of time transactions are included in invoice, can be set to any date, if not provided current UTC time will be used instead */ // @ApiMember(Description="Controls up to which point of time transactions are included in invoice, can be set to any date, if not provided current UTC time will be used instead") public var invoiceDate:Date? /** * If present the operation will start only after this date */ // @ApiMember(Description="If present the operation will start only after this date") public var scheduledStartTime:Date? /** * Optional CRON expression for recurring operations. */ // @ApiMember(Description="Optional CRON expression for recurring operations.") public var recurringSchedule:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case companyId case invoiceDate case scheduledStartTime case recurringSchedule } 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) invoiceDate = try container.decodeIfPresent(Date.self, forKey: .invoiceDate) scheduledStartTime = try container.decodeIfPresent(Date.self, forKey: .scheduledStartTime) recurringSchedule = try container.decodeIfPresent(String.self, forKey: .recurringSchedule) } 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 invoiceDate != nil { try container.encode(invoiceDate, forKey: .invoiceDate) } if scheduledStartTime != nil { try container.encode(scheduledStartTime, forKey: .scheduledStartTime) } if recurringSchedule != nil { try container.encode(recurringSchedule, forKey: .recurringSchedule) } } } public enum SortDirectionEnum : String, Codable { case Ascending case Descending } public class VossPagination : Codable { public var searchText:String? public var pageIndex:Int? public var pageSize:Int? public var sortField:String? public var sortDirection:SortDirectionEnum? required public init(){} }