/* Options: Date: 2026-07-14 05:02:05 SwiftVersion: 6.0 Version: 10.05 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bookmore.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: CalculateTotalPriceOnService.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/services/{Id}/calculateprice", "PUT") public class CalculateTotalPriceOnService : IReturn, ICompany, Codable { public typealias Return = TotalPriceInformationResponse /** * 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? /** * Id of the service */ // @ApiMember(Description="Id of the service", IsRequired=true, ParameterType="path") public var id:Int? /** * Optional booking id. If provided, the response will also contain the price difference compared to the existing booking price. */ // @ApiMember(Description="Optional booking id. If provided, the response will also contain the price difference compared to the existing booking price.") public var bookingId:Int? /** * The price interval to be used for calculations */ // @ApiMember(Description="The price interval to be used for calculations", IsRequired=true) public var interval:PriceInterval? /** * Rebate codes applied to booking */ // @ApiMember(Description="Rebate codes applied to booking") public var rebateCodeIds:[Int] = [] /** * DEPRECATED — use Articles instead. Article ids that should be included in the price calculation. The articles must be of type ServiceAddonArticle and connected to the service. Duplicate ids are counted as quantity. */ // @ApiMember(Description="DEPRECATED — use Articles instead. Article ids that should be included in the price calculation. The articles must be of type ServiceAddonArticle and connected to the service. Duplicate ids are counted as quantity.") public var articleIds:[Int] = [] /** * Articles (with quantity) that should be included in the price calculation. The articles must be of type ServiceAddonArticle and connected to the service. */ // @ApiMember(Description="Articles (with quantity) that should be included in the price calculation. The articles must be of type ServiceAddonArticle and connected to the service.") public var articles:[ArticleToCreateBase] = [] /** * 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] = [] /** * */ // @ApiMember(Description="") public var customerEmail:String? required public init(){} } public class TotalPriceInformationResponse : Codable { public var priceSign:String? public var currencyId:String? public var totalPrice:Double? public var totalVatAmount:Double? public var totalPriceBeforeRebate:Double? public var priceDifference:Double? public var appliedCodes:[AppliedRebateCodesResponse] = [] public var priceDetails:[TotalPricePriceDetail] = [] required public init(){} } public protocol ICompany { var companyId:String? { get set } } public class PriceInterval : Codable { /** * The start date and time for the price to be calculated. Normally the booking start datetime. */ // @ApiMember(Description="The start date and time for the price to be calculated. Normally the booking start datetime.", IsRequired=true) public var from:Date? /** * The end date and time for the price to be calculated.Normally the booking end datetime. If nothing entered it will use the service length. */ // @ApiMember(Description="The end date and time for the price to be calculated.Normally the booking end datetime. If nothing entered it will use the service length.") public var to:Date? required public init(){} } public class RebateCodeTypeResponse : Codable { public var id:Int? public var name:String? public var Description:String? required public init(){} } public class AppliedRebateCodesResponse : Codable { public var rebateCodeSign:String? public var rebateCodeValue:Int? public var rebateCodeType:RebateCodeTypeResponse? public var rebateCodeId:Int? public var rebateAmount:Double? required public init(){} } public class TotalPricePriceDetail : Codable { public var quantity:Int? public var price:Double? public var vatAmount:Double? public var Description:String? public var articleId:Int? public var maxQuantity:Int? required public init(){} }