/* Options: Date: 2026-02-20 05:23:57 SwiftVersion: 6.0 Version: 10.05 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: CreateCustomerArticleFromArticle.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/customerarticle/fromarticle", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) public class CreateCustomerArticleFromArticle : FromArticleBase, IReturn, ICompany { public typealias Return = CustomerArticleResponse required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class CustomerArticleResponse : Codable { public var id:Int? public var companyId:String? public var articleId:Int? public var price:Double? public var vat:Double? public var currencyId:String? public var statusId:Int? public var statusName:String? public var customerId:String? public var createdDate:Date? public var updatedDate:Date? public var article:ArticleResponse? public var customer:CustomerArticleCustomerResponse? public var company:CustomerArticleCompanyResponse? public var paymentLog:[PaymentLogResponse] = [] public var responseStatus:ResponseStatus? required public init(){} } public protocol ICompany { var companyId:String? { get set } } public class CustomerToHandle : CustomerBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class InvoiceAddressToHandle : IInvoiceAddress, Codable { 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 FromArticleBase : Codable { /** * */ // @ApiMember(Description="") public var companyId:String? /** * Article ID for the rebate code */ // @ApiMember(Description="Article ID for the rebate code", IsRequired=true) public var articleId:Int? /** * Customer information */ // @ApiMember(Description="Customer information") public var customer:CustomerToHandle? /** * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile. */ // @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile. ") public var invoiceAddress:InvoiceAddressToHandle? required public init(){} } public class CustomerBase : ICustomerBase, Codable { public var customerId:String? public var firstname:String? public var lastname:String? public var email:String? public var phone:String? public var subscribedToNewsletter:Bool? public var personalIdentityNumber:String? required public init(){} } public protocol ICustomerBase { var customerId:String? { get set } var firstname:String? { get set } var lastname:String? { get set } var email:String? { get set } var phone:String? { get set } var subscribedToNewsletter:Bool? { get set } var personalIdentityNumber:String? { get set } } public class CustomerArticleCustomerResponse : Codable { public var id:String? public var firstname:String? public var lastname:String? public var email:String? public var phone:String? required public init(){} } public class CustomerArticleCompanyResponse : Codable { public var id:String? public var name:String? public var logoType:String? public var email:String? public var phone:String? public var city:String? public var street1:String? public var zipCode:String? public var countryId:String? required public init(){} } public class PaymentLogResponse : Codable { public var id:Int? public var amount:Double? public var amountCredited:Double? public var currencyId:String? public var comments:String? public var created:Date? public var updated:Date? required public init(){} } public protocol IInvoiceAddress { var corporateIdentityNumber:String? { get set } var invoiceAddress1:String? { get set } var invoiceAddress2:String? { get set } var invoiceCity:String? { get set } var invoicePostalCode:String? { get set } var invoiceCountryCode:String? { get set } } public class ArticleResponse : Codable { public var companyId:String? public var id:Int? public var name:String? public var articleTypeId:Int? public var Description:String? public var imageUrl:String? public var active:Bool? public var amount:Int? public var price:Double? public var currencyId:String? public var sortOrder:Int? public var updatedDate:Date? public var createdDate:Date? public var services:[ArticleServiceRelation] = [] public var serviceIds:[Int] = [] public var priceSign:String? public var vat:Double? required public init(){} }