/* Options: Date: 2026-04-23 04:02:36 Version: 10.05 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateCustomerArticle.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } enum CustomerArticleStatusEnum { AwaitingPayment, AwaitingPaymentFromProvider, AwaitingPaymentNoTimeLimit, Active, Off, } 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; } 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); int Duration = 0; List Services = []; List ServiceIds = []; String PriceSign = ""; double? VAT; int ValidDays = 0; bool SendNotification; String NotificationEmail = ""; 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.Duration,this.Services,this.ServiceIds,this.PriceSign,this.VAT,this.ValidDays,this.SendNotification,this.NotificationEmail}); 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!); Duration = json['Duration']; Services = JsonConverters.fromJson(json['Services'],'List',context!); ServiceIds = JsonConverters.fromJson(json['ServiceIds'],'List',context!); PriceSign = json['PriceSign']; VAT = JsonConverters.toDouble(json['VAT']); ValidDays = json['ValidDays']; SendNotification = json['SendNotification']; NotificationEmail = json['NotificationEmail']; 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!), 'Duration': Duration, 'Services': JsonConverters.toJson(Services,'List',context!), 'ServiceIds': JsonConverters.toJson(ServiceIds,'List',context!), 'PriceSign': PriceSign, 'VAT': VAT, 'ValidDays': ValidDays, 'SendNotification': SendNotification, 'NotificationEmail': NotificationEmail }; 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/{Id}", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class UpdateCustomerArticle implements IReturn, ICompany, IConvertible, IPut { /** * The customer article id */ // @ApiMember(Description="The customer article id", IsRequired=true, ParameterType="path") int Id = 0; /** * 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.") String? CompanyId; /** * The new status of the customer article */ // @ApiMember(Description="The new status of the customer article") CustomerArticleStatusEnum? StatusId; /** * Updated price */ // @ApiMember(Description="Updated price") double? Price; /** * Updated VAT */ // @ApiMember(Description="Updated VAT") double? VAT; /** * Updated currency */ // @ApiMember(Description="Updated currency") String CurrencyId = ""; UpdateCustomerArticle({this.Id,this.CompanyId,this.StatusId,this.Price,this.VAT,this.CurrencyId}); UpdateCustomerArticle.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; StatusId = JsonConverters.fromJson(json['StatusId'],'CustomerArticleStatusEnum',context!); Price = JsonConverters.toDouble(json['Price']); VAT = JsonConverters.toDouble(json['VAT']); CurrencyId = json['CurrencyId']; return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'StatusId': JsonConverters.toJson(StatusId,'CustomerArticleStatusEnum',context!), 'Price': Price, 'VAT': VAT, 'CurrencyId': CurrencyId }; createResponse() => CustomerArticleResponse(); getResponseTypeName() => "CustomerArticleResponse"; getTypeName() => "UpdateCustomerArticle"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'CustomerArticleStatusEnum': TypeInfo(TypeOf.Enum, enumValues:CustomerArticleStatusEnum.values), 'CustomerArticleCustomerResponse': TypeInfo(TypeOf.Class, create:() => CustomerArticleCustomerResponse()), 'CustomerArticleCompanyResponse': TypeInfo(TypeOf.Class, create:() => CustomerArticleCompanyResponse()), 'PaymentLogResponse': TypeInfo(TypeOf.Class, create:() => PaymentLogResponse()), '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:() => []), 'UpdateCustomerArticle': TypeInfo(TypeOf.Class, create:() => UpdateCustomerArticle()), });