/* Options: Date: 2026-02-20 05:15:26 Version: 10.05 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateCustomerArticleFromArticle.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class CustomerBase implements ICustomerBase, IConvertible { String? CustomerId; String Firstname = ""; String Lastname = ""; String Email = ""; String Phone = ""; bool SubscribedToNewsletter; String PersonalIdentityNumber = ""; CustomerBase({this.CustomerId,this.Firstname,this.Lastname,this.Email,this.Phone,this.SubscribedToNewsletter,this.PersonalIdentityNumber}); CustomerBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CustomerId = json['CustomerId']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; Phone = json['Phone']; SubscribedToNewsletter = json['SubscribedToNewsletter']; PersonalIdentityNumber = json['PersonalIdentityNumber']; return this; } Map toJson() => { 'CustomerId': CustomerId, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'Phone': Phone, 'SubscribedToNewsletter': SubscribedToNewsletter, 'PersonalIdentityNumber': PersonalIdentityNumber }; getTypeName() => "CustomerBase"; TypeContext? context = _ctx; } class CustomerToHandle extends CustomerBase implements IConvertible { CustomerToHandle(); CustomerToHandle.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "CustomerToHandle"; TypeContext? context = _ctx; } class InvoiceAddressToHandle implements IInvoiceAddress, IConvertible { String CorporateIdentityNumber = ""; String InvoiceAddress1 = ""; String InvoiceAddress2 = ""; String InvoiceCity = ""; String InvoicePostalCode = ""; String InvoiceCountryCode = ""; InvoiceAddressToHandle({this.CorporateIdentityNumber,this.InvoiceAddress1,this.InvoiceAddress2,this.InvoiceCity,this.InvoicePostalCode,this.InvoiceCountryCode}); InvoiceAddressToHandle.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CorporateIdentityNumber = json['CorporateIdentityNumber']; InvoiceAddress1 = json['InvoiceAddress1']; InvoiceAddress2 = json['InvoiceAddress2']; InvoiceCity = json['InvoiceCity']; InvoicePostalCode = json['InvoicePostalCode']; InvoiceCountryCode = json['InvoiceCountryCode']; return this; } Map toJson() => { 'CorporateIdentityNumber': CorporateIdentityNumber, 'InvoiceAddress1': InvoiceAddress1, 'InvoiceAddress2': InvoiceAddress2, 'InvoiceCity': InvoiceCity, 'InvoicePostalCode': InvoicePostalCode, 'InvoiceCountryCode': InvoiceCountryCode }; getTypeName() => "InvoiceAddressToHandle"; TypeContext? context = _ctx; } class FromArticleBase implements IConvertible { /** * */ // @ApiMember(Description="") String? CompanyId; /** * Article ID for the rebate code */ // @ApiMember(Description="Article ID for the rebate code", IsRequired=true) int ArticleId = 0; /** * Customer information */ // @ApiMember(Description="Customer information") CustomerToHandle Customer; /** * 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. ") InvoiceAddressToHandle InvoiceAddress; FromArticleBase({this.CompanyId,this.ArticleId,this.Customer,this.InvoiceAddress}); FromArticleBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; ArticleId = json['ArticleId']; Customer = JsonConverters.fromJson(json['Customer'],'CustomerToHandle',context!); InvoiceAddress = JsonConverters.fromJson(json['InvoiceAddress'],'InvoiceAddressToHandle',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'ArticleId': ArticleId, 'Customer': JsonConverters.toJson(Customer,'CustomerToHandle',context!), 'InvoiceAddress': JsonConverters.toJson(InvoiceAddress,'InvoiceAddressToHandle',context!) }; getTypeName() => "FromArticleBase"; TypeContext? context = _ctx; } abstract class ICustomerBase { String? CustomerId; String Firstname = ""; String Lastname = ""; String Email = ""; String Phone = ""; bool SubscribedToNewsletter; String PersonalIdentityNumber = ""; } class CustomerArticleCustomerResponse implements IConvertible { String Id = ""; String Firstname = ""; String Lastname = ""; String Email = ""; String Phone = ""; CustomerArticleCustomerResponse({this.Id,this.Firstname,this.Lastname,this.Email,this.Phone}); CustomerArticleCustomerResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; Phone = json['Phone']; return this; } Map toJson() => { 'Id': Id, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'Phone': Phone }; getTypeName() => "CustomerArticleCustomerResponse"; TypeContext? context = _ctx; } class CustomerArticleCompanyResponse implements IConvertible { String Id = ""; String Name = ""; String LogoType = ""; String Email = ""; String Phone = ""; String City = ""; String Street1 = ""; String ZipCode = ""; String CountryId = ""; CustomerArticleCompanyResponse({this.Id,this.Name,this.LogoType,this.Email,this.Phone,this.City,this.Street1,this.ZipCode,this.CountryId}); CustomerArticleCompanyResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; LogoType = json['LogoType']; Email = json['Email']; Phone = json['Phone']; City = json['City']; Street1 = json['Street1']; ZipCode = json['ZipCode']; CountryId = json['CountryId']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'LogoType': LogoType, 'Email': Email, 'Phone': Phone, 'City': City, 'Street1': Street1, 'ZipCode': ZipCode, 'CountryId': CountryId }; getTypeName() => "CustomerArticleCompanyResponse"; TypeContext? context = _ctx; } class PaymentLogResponse implements IConvertible { int Id = 0; double? Amount; double? AmountCredited; String CurrencyId = ""; String Comments = ""; DateTime Created = DateTime(0); DateTime Updated = DateTime(0); PaymentLogResponse({this.Id,this.Amount,this.AmountCredited,this.CurrencyId,this.Comments,this.Created,this.Updated}); PaymentLogResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Amount = JsonConverters.toDouble(json['Amount']); AmountCredited = JsonConverters.toDouble(json['AmountCredited']); CurrencyId = json['CurrencyId']; Comments = json['Comments']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); return this; } Map toJson() => { 'Id': Id, 'Amount': Amount, 'AmountCredited': AmountCredited, 'CurrencyId': CurrencyId, 'Comments': Comments, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'Updated': JsonConverters.toJson(Updated,'DateTime',context!) }; getTypeName() => "PaymentLogResponse"; TypeContext? context = _ctx; } abstract class IInvoiceAddress { String CorporateIdentityNumber = ""; String InvoiceAddress1 = ""; String InvoiceAddress2 = ""; String InvoiceCity = ""; String InvoicePostalCode = ""; String InvoiceCountryCode = ""; } class ArticleResponse implements IConvertible { String CompanyId = ""; int Id = 0; String Name = ""; int ArticleTypeId = 0; String Description = ""; String ImageUrl = ""; bool Active; int Amount = 0; double Price = 0; String CurrencyId = ""; int SortOrder = 0; DateTime UpdatedDate = DateTime(0); DateTime CreatedDate = DateTime(0); List Services = []; List ServiceIds = []; String PriceSign = ""; double? VAT; ArticleResponse({this.CompanyId,this.Id,this.Name,this.ArticleTypeId,this.Description,this.ImageUrl,this.Active,this.Amount,this.Price,this.CurrencyId,this.SortOrder,this.UpdatedDate,this.CreatedDate,this.Services,this.ServiceIds,this.PriceSign,this.VAT}); ArticleResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; Name = json['Name']; ArticleTypeId = json['ArticleTypeId']; Description = json['Description']; ImageUrl = json['ImageUrl']; Active = json['Active']; Amount = json['Amount']; Price = JsonConverters.toDouble(json['Price']); CurrencyId = json['CurrencyId']; SortOrder = json['SortOrder']; UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); ServiceIds = JsonConverters.fromJson(json['ServiceIds'],'List',context!); PriceSign = json['PriceSign']; VAT = JsonConverters.toDouble(json['VAT']); return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'Name': Name, 'ArticleTypeId': ArticleTypeId, 'Description': Description, 'ImageUrl': ImageUrl, 'Active': Active, 'Amount': Amount, 'Price': Price, 'CurrencyId': CurrencyId, 'SortOrder': SortOrder, 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'ServiceIds': JsonConverters.toJson(ServiceIds,'List',context!), 'PriceSign': PriceSign, 'VAT': VAT }; getTypeName() => "ArticleResponse"; TypeContext? context = _ctx; } class CustomerArticleResponse implements IConvertible { int Id = 0; String CompanyId = ""; int? ArticleId; double? Price; double? VAT; String CurrencyId = ""; int StatusId = 0; String StatusName = ""; String? CustomerId; DateTime CreatedDate = DateTime(0); DateTime UpdatedDate = DateTime(0); ArticleResponse Article; CustomerArticleCustomerResponse Customer; CustomerArticleCompanyResponse Company; List PaymentLog = []; ResponseStatus ResponseStatus; CustomerArticleResponse({this.Id,this.CompanyId,this.ArticleId,this.Price,this.VAT,this.CurrencyId,this.StatusId,this.StatusName,this.CustomerId,this.CreatedDate,this.UpdatedDate,this.Article,this.Customer,this.Company,this.PaymentLog,this.ResponseStatus}); CustomerArticleResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; ArticleId = json['ArticleId']; Price = JsonConverters.toDouble(json['Price']); VAT = JsonConverters.toDouble(json['VAT']); CurrencyId = json['CurrencyId']; StatusId = json['StatusId']; StatusName = json['StatusName']; CustomerId = json['CustomerId']; CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); Article = JsonConverters.fromJson(json['Article'],'ArticleResponse',context!); Customer = JsonConverters.fromJson(json['Customer'],'CustomerArticleCustomerResponse',context!); Company = JsonConverters.fromJson(json['Company'],'CustomerArticleCompanyResponse',context!); PaymentLog = JsonConverters.fromJson(json['PaymentLog'],'List',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'ArticleId': ArticleId, 'Price': Price, 'VAT': VAT, 'CurrencyId': CurrencyId, 'StatusId': StatusId, 'StatusName': StatusName, 'CustomerId': CustomerId, 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!), 'Article': JsonConverters.toJson(Article,'ArticleResponse',context!), 'Customer': JsonConverters.toJson(Customer,'CustomerArticleCustomerResponse',context!), 'Company': JsonConverters.toJson(Company,'CustomerArticleCompanyResponse',context!), 'PaymentLog': JsonConverters.toJson(PaymentLog,'List',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "CustomerArticleResponse"; TypeContext? context = _ctx; } // @Route("/customerarticle/fromarticle", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class CreateCustomerArticleFromArticle extends FromArticleBase implements IReturn, ICompany, IConvertible, IPost { CreateCustomerArticleFromArticle(); CreateCustomerArticleFromArticle.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); createResponse() => CustomerArticleResponse(); getResponseTypeName() => "CustomerArticleResponse"; getTypeName() => "CreateCustomerArticleFromArticle"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'CustomerBase': TypeInfo(TypeOf.Class, create:() => CustomerBase()), 'CustomerToHandle': TypeInfo(TypeOf.Class, create:() => CustomerToHandle()), 'InvoiceAddressToHandle': TypeInfo(TypeOf.Class, create:() => InvoiceAddressToHandle()), 'FromArticleBase': TypeInfo(TypeOf.Class, create:() => FromArticleBase()), 'ICustomerBase': TypeInfo(TypeOf.Interface), 'CustomerArticleCustomerResponse': TypeInfo(TypeOf.Class, create:() => CustomerArticleCustomerResponse()), 'CustomerArticleCompanyResponse': TypeInfo(TypeOf.Class, create:() => CustomerArticleCompanyResponse()), 'PaymentLogResponse': TypeInfo(TypeOf.Class, create:() => PaymentLogResponse()), 'IInvoiceAddress': TypeInfo(TypeOf.Interface), 'ArticleResponse': TypeInfo(TypeOf.Class, create:() => ArticleResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ArticleServiceRelation': TypeInfo(TypeOf.Class, create:() => ArticleServiceRelation()), 'CustomerArticleResponse': TypeInfo(TypeOf.Class, create:() => CustomerArticleResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreateCustomerArticleFromArticle': TypeInfo(TypeOf.Class, create:() => CreateCustomerArticleFromArticle()), });