/* Options: Date: 2026-05-10 18:04:47 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: CreateRebateCode.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; 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 PromoCodeReceiver implements IConvertible { String? CustomerId; String Firstname = ""; String Lastname = ""; String Email = ""; String ReceiverMessage = ""; PromoCodeReceiver({this.CustomerId,this.Firstname,this.Lastname,this.Email,this.ReceiverMessage}); PromoCodeReceiver.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CustomerId = json['CustomerId']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; ReceiverMessage = json['ReceiverMessage']; return this; } Map toJson() => { 'CustomerId': CustomerId, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'ReceiverMessage': ReceiverMessage }; getTypeName() => "PromoCodeReceiver"; TypeContext? context = _ctx; } class RebateCodeServiceResponse implements IConvertible { int Id = 0; String Name = ""; String Description = ""; bool Active; RebateCodeServiceResponse({this.Id,this.Name,this.Description,this.Active}); RebateCodeServiceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Active = json['Active']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Active': Active }; getTypeName() => "RebateCodeServiceResponse"; TypeContext? context = _ctx; } class RebateCodeCustomerResponse implements IConvertible { String Id = ""; String Firstname = ""; String Lastname = ""; String Email = ""; String Phone = ""; String ImageUrl = ""; RebateCodeCustomerResponse({this.Id,this.Firstname,this.Lastname,this.Email,this.Phone,this.ImageUrl}); RebateCodeCustomerResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; Phone = json['Phone']; ImageUrl = json['ImageUrl']; return this; } Map toJson() => { 'Id': Id, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'Phone': Phone, 'ImageUrl': ImageUrl }; getTypeName() => "RebateCodeCustomerResponse"; TypeContext? context = _ctx; } class RebateCodeTransactionQueryResponse implements IConvertible { int Id = 0; String CompanyId = ""; String Note = ""; int RebateCodeId = 0; String RebateCodeSign = ""; int? RebateCodeTypeId; String RebateCodeTypeName = ""; double Amount = 0; String Usage = ""; int? BookingId; DateTime UpdatedDate = DateTime(0); DateTime CreatedDate = DateTime(0); RebateCodeServiceResponse Service; RebateCodeCustomerResponse Customer; String PriceSign = ""; RebateCodeTransactionQueryResponse({this.Id,this.CompanyId,this.Note,this.RebateCodeId,this.RebateCodeSign,this.RebateCodeTypeId,this.RebateCodeTypeName,this.Amount,this.Usage,this.BookingId,this.UpdatedDate,this.CreatedDate,this.Service,this.Customer,this.PriceSign}); RebateCodeTransactionQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; Note = json['Note']; RebateCodeId = json['RebateCodeId']; RebateCodeSign = json['RebateCodeSign']; RebateCodeTypeId = json['RebateCodeTypeId']; RebateCodeTypeName = json['RebateCodeTypeName']; Amount = JsonConverters.toDouble(json['Amount']); Usage = json['Usage']; BookingId = json['BookingId']; UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); Service = JsonConverters.fromJson(json['Service'],'RebateCodeServiceResponse',context!); Customer = JsonConverters.fromJson(json['Customer'],'RebateCodeCustomerResponse',context!); PriceSign = json['PriceSign']; return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'Note': Note, 'RebateCodeId': RebateCodeId, 'RebateCodeSign': RebateCodeSign, 'RebateCodeTypeId': RebateCodeTypeId, 'RebateCodeTypeName': RebateCodeTypeName, 'Amount': Amount, 'Usage': Usage, 'BookingId': BookingId, 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'Service': JsonConverters.toJson(Service,'RebateCodeServiceResponse',context!), 'Customer': JsonConverters.toJson(Customer,'RebateCodeCustomerResponse',context!), 'PriceSign': PriceSign }; getTypeName() => "RebateCodeTransactionQueryResponse"; 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 DaysOfWeekResponse implements IConvertible { int Id = 0; String DayOfWeek = ""; String DayOfWeekTranslation = ""; bool? DayOfWeekActive; int? DayOfWeekSortOrder; DaysOfWeekResponse({this.Id,this.DayOfWeek,this.DayOfWeekTranslation,this.DayOfWeekActive,this.DayOfWeekSortOrder}); DaysOfWeekResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; DayOfWeek = json['DayOfWeek']; DayOfWeekTranslation = json['DayOfWeekTranslation']; DayOfWeekActive = json['DayOfWeekActive']; DayOfWeekSortOrder = json['DayOfWeekSortOrder']; return this; } Map toJson() => { 'Id': Id, 'DayOfWeek': DayOfWeek, 'DayOfWeekTranslation': DayOfWeekTranslation, 'DayOfWeekActive': DayOfWeekActive, 'DayOfWeekSortOrder': DayOfWeekSortOrder }; getTypeName() => "DaysOfWeekResponse"; TypeContext? context = _ctx; } class RebateCodeCompanyResponse implements IConvertible { String SitePath = ""; int? PaymentProviderId; RebateCodeCompanyResponse({this.SitePath,this.PaymentProviderId}); RebateCodeCompanyResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { SitePath = json['SitePath']; PaymentProviderId = json['PaymentProviderId']; return this; } Map toJson() => { 'SitePath': SitePath, 'PaymentProviderId': PaymentProviderId }; getTypeName() => "RebateCodeCompanyResponse"; 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); 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 RebateCodeResponse implements IConvertible { int Id = 0; String? CompanyId; DateTime ValidFrom = DateTime(0); DateTime ValidTo = DateTime(0); /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") Duration FromTime; /** * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") Duration ToTime; String CreatedBy = ""; DateTime Created = DateTime(0); String UpdatedBy = ""; DateTime Updated = DateTime(0); String PersonalNote = ""; String RebateCodeSign = ""; int RebateCodeValue = 0; int RebateCodeTypeId = 0; String Name = ""; int RebateCodeStatusId = 0; String StatusName = ""; int MaxNumberOfUses = 0; int MaxNumberOfUsesPerCustomer = 0; int NumberOfUsesUsed = 0; List DaysOfWeek = []; List Services = []; ArticleResponse Article; List Transactions = []; double? RemainingAmount; int? RemainingUsage; List Customers = []; ResponseStatus ResponseStatus; bool PaymentReceived; String RebateCodeCurrencySign = ""; bool ActiveByStatus; String PriceSign = ""; String RebateCodeTypeName = ""; RebateCodeCompanyResponse Company; List PaymentLog = []; RebateCodeResponse({this.Id,this.CompanyId,this.ValidFrom,this.ValidTo,this.FromTime,this.ToTime,this.CreatedBy,this.Created,this.UpdatedBy,this.Updated,this.PersonalNote,this.RebateCodeSign,this.RebateCodeValue,this.RebateCodeTypeId,this.Name,this.RebateCodeStatusId,this.StatusName,this.MaxNumberOfUses,this.MaxNumberOfUsesPerCustomer,this.NumberOfUsesUsed,this.DaysOfWeek,this.Services,this.Article,this.Transactions,this.RemainingAmount,this.RemainingUsage,this.Customers,this.ResponseStatus,this.PaymentReceived,this.RebateCodeCurrencySign,this.ActiveByStatus,this.PriceSign,this.RebateCodeTypeName,this.Company,this.PaymentLog}); RebateCodeResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; ValidFrom = JsonConverters.fromJson(json['ValidFrom'],'DateTime',context!); ValidTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!); FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!); ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!); CreatedBy = json['CreatedBy']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); UpdatedBy = json['UpdatedBy']; Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); PersonalNote = json['PersonalNote']; RebateCodeSign = json['RebateCodeSign']; RebateCodeValue = json['RebateCodeValue']; RebateCodeTypeId = json['RebateCodeTypeId']; Name = json['Name']; RebateCodeStatusId = json['RebateCodeStatusId']; StatusName = json['StatusName']; MaxNumberOfUses = json['MaxNumberOfUses']; MaxNumberOfUsesPerCustomer = json['MaxNumberOfUsesPerCustomer']; NumberOfUsesUsed = json['NumberOfUsesUsed']; DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); Article = JsonConverters.fromJson(json['Article'],'ArticleResponse',context!); Transactions = JsonConverters.fromJson(json['Transactions'],'List',context!); RemainingAmount = JsonConverters.toDouble(json['RemainingAmount']); RemainingUsage = json['RemainingUsage']; Customers = JsonConverters.fromJson(json['Customers'],'List',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); PaymentReceived = json['PaymentReceived']; RebateCodeCurrencySign = json['RebateCodeCurrencySign']; ActiveByStatus = json['ActiveByStatus']; PriceSign = json['PriceSign']; RebateCodeTypeName = json['RebateCodeTypeName']; Company = JsonConverters.fromJson(json['Company'],'RebateCodeCompanyResponse',context!); PaymentLog = JsonConverters.fromJson(json['PaymentLog'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'ValidFrom': JsonConverters.toJson(ValidFrom,'DateTime',context!), 'ValidTo': JsonConverters.toJson(ValidTo,'DateTime',context!), 'FromTime': JsonConverters.toJson(FromTime,'Duration',context!), 'ToTime': JsonConverters.toJson(ToTime,'Duration',context!), 'CreatedBy': CreatedBy, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'UpdatedBy': UpdatedBy, 'Updated': JsonConverters.toJson(Updated,'DateTime',context!), 'PersonalNote': PersonalNote, 'RebateCodeSign': RebateCodeSign, 'RebateCodeValue': RebateCodeValue, 'RebateCodeTypeId': RebateCodeTypeId, 'Name': Name, 'RebateCodeStatusId': RebateCodeStatusId, 'StatusName': StatusName, 'MaxNumberOfUses': MaxNumberOfUses, 'MaxNumberOfUsesPerCustomer': MaxNumberOfUsesPerCustomer, 'NumberOfUsesUsed': NumberOfUsesUsed, 'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'Article': JsonConverters.toJson(Article,'ArticleResponse',context!), 'Transactions': JsonConverters.toJson(Transactions,'List',context!), 'RemainingAmount': RemainingAmount, 'RemainingUsage': RemainingUsage, 'Customers': JsonConverters.toJson(Customers,'List',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'PaymentReceived': PaymentReceived, 'RebateCodeCurrencySign': RebateCodeCurrencySign, 'ActiveByStatus': ActiveByStatus, 'PriceSign': PriceSign, 'RebateCodeTypeName': RebateCodeTypeName, 'Company': JsonConverters.toJson(Company,'RebateCodeCompanyResponse',context!), 'PaymentLog': JsonConverters.toJson(PaymentLog,'List',context!) }; getTypeName() => "RebateCodeResponse"; TypeContext? context = _ctx; } // @Route("/rebatecodes", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class CreateRebateCode implements IReturn, IConvertible, IPost { /** * */ // @ApiMember(Description="") String? CompanyId; /** * The default value is 9999 */ // @ApiMember(Description="The default value is 9999") int? MaxNumberOfUses; /** * The default value is 1 */ // @ApiMember(Description="The default value is 1") int? MaxNumberOfUsesPerCustomer; /** * */ // @ApiMember(Description="", IsRequired=true) DateTime ValidFrom = DateTime(0); /** * */ // @ApiMember(Description="", IsRequired=true) DateTime ValidTo = DateTime(0); /** * If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") Duration? FromTime; /** * If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") Duration? ToTime; /** * 1 - Percent, 2 - Сurrency, 3 - PunchTicket, 4 - ValueCard, 5 - GiftCard */ // @ApiMember(Description="1 - Percent, 2 - Сurrency, 3 - PunchTicket, 4 - ValueCard, 5 - GiftCard", IsRequired=true) int RebateCodeTypeId = 0; /** * If it's connected to an Article, add the Article Id here. */ // @ApiMember(Description="If it's connected to an Article, add the Article Id here.") int? ArticleId; /** * */ // @ApiMember(Description="", IsRequired=true) int RebateCodeValue = 0; /** * If AutoGenerateRebateCodeSign=false - more than four letters, unique among active codes */ // @ApiMember(Description="If AutoGenerateRebateCodeSign=false - more than four letters, unique among active codes") String RebateCodeSign = ""; /** * AutoGenerateRebateCodeSign=true - random generate code */ // @ApiMember(Description="AutoGenerateRebateCodeSign=true - random generate code") bool AutoGenerateRebateCodeSign; /** * */ // @ApiMember(Description="") String PersonalNote = ""; /** * */ // @ApiMember(Description="") List DaysOfWeek = []; /** * */ // @ApiMember(Description="") List Services = []; /** * */ // @ApiMember(Description="") List Customers = []; /** * The price */ // @ApiMember(Description="The price") double? PriceVat; /** * The price VAT in percent */ // @ApiMember(Description="The price VAT in percent") double? VAT; /** * The price currency */ // @ApiMember(Description="The price currency") String CurrencyId = ""; /** * Promo code receiver information */ // @ApiMember(Description="Promo code receiver information") PromoCodeReceiver PromoCodeReceiver; /** * If you wish to save some invoice address information for the rebate code, you can do so here. This is optional. */ // @ApiMember(Description="If you wish to save some invoice address information for the rebate code, you can do so here. This is optional.") InvoiceAddressToHandle? InvoiceAddress; /** * Determines if the rebate code is active on creation or if it should await payment. If you set this to true, make sure to mark the code as payed when you receive the payment, by using the MarkRebateCodeAsPayed endpoint. The default value is false. */ // @ApiMember(Description="Determines if the rebate code is active on creation or if it should await payment. If you set this to true, make sure to mark the code as payed when you receive the payment, by using the MarkRebateCodeAsPayed endpoint. The default value is false.") bool? Paid; CreateRebateCode({this.CompanyId,this.MaxNumberOfUses,this.MaxNumberOfUsesPerCustomer,this.ValidFrom,this.ValidTo,this.FromTime,this.ToTime,this.RebateCodeTypeId,this.ArticleId,this.RebateCodeValue,this.RebateCodeSign,this.AutoGenerateRebateCodeSign,this.PersonalNote,this.DaysOfWeek,this.Services,this.Customers,this.PriceVat,this.VAT,this.CurrencyId,this.PromoCodeReceiver,this.InvoiceAddress,this.Paid}); CreateRebateCode.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; MaxNumberOfUses = json['MaxNumberOfUses']; MaxNumberOfUsesPerCustomer = json['MaxNumberOfUsesPerCustomer']; ValidFrom = JsonConverters.fromJson(json['ValidFrom'],'DateTime',context!); ValidTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!); FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!); ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!); RebateCodeTypeId = json['RebateCodeTypeId']; ArticleId = json['ArticleId']; RebateCodeValue = json['RebateCodeValue']; RebateCodeSign = json['RebateCodeSign']; AutoGenerateRebateCodeSign = json['AutoGenerateRebateCodeSign']; PersonalNote = json['PersonalNote']; DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); Customers = JsonConverters.fromJson(json['Customers'],'List',context!); PriceVat = JsonConverters.toDouble(json['PriceVat']); VAT = JsonConverters.toDouble(json['VAT']); CurrencyId = json['CurrencyId']; PromoCodeReceiver = JsonConverters.fromJson(json['PromoCodeReceiver'],'PromoCodeReceiver',context!); InvoiceAddress = JsonConverters.fromJson(json['InvoiceAddress'],'InvoiceAddressToHandle',context!); Paid = json['Paid']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'MaxNumberOfUses': MaxNumberOfUses, 'MaxNumberOfUsesPerCustomer': MaxNumberOfUsesPerCustomer, 'ValidFrom': JsonConverters.toJson(ValidFrom,'DateTime',context!), 'ValidTo': JsonConverters.toJson(ValidTo,'DateTime',context!), 'FromTime': JsonConverters.toJson(FromTime,'Duration',context!), 'ToTime': JsonConverters.toJson(ToTime,'Duration',context!), 'RebateCodeTypeId': RebateCodeTypeId, 'ArticleId': ArticleId, 'RebateCodeValue': RebateCodeValue, 'RebateCodeSign': RebateCodeSign, 'AutoGenerateRebateCodeSign': AutoGenerateRebateCodeSign, 'PersonalNote': PersonalNote, 'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'Customers': JsonConverters.toJson(Customers,'List',context!), 'PriceVat': PriceVat, 'VAT': VAT, 'CurrencyId': CurrencyId, 'PromoCodeReceiver': JsonConverters.toJson(PromoCodeReceiver,'PromoCodeReceiver',context!), 'InvoiceAddress': JsonConverters.toJson(InvoiceAddress,'InvoiceAddressToHandle',context!), 'Paid': Paid }; createResponse() => RebateCodeResponse(); getResponseTypeName() => "RebateCodeResponse"; getTypeName() => "CreateRebateCode"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'InvoiceAddressToHandle': TypeInfo(TypeOf.Class, create:() => InvoiceAddressToHandle()), 'PromoCodeReceiver': TypeInfo(TypeOf.Class, create:() => PromoCodeReceiver()), 'RebateCodeServiceResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeServiceResponse()), 'RebateCodeCustomerResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeCustomerResponse()), 'RebateCodeTransactionQueryResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeTransactionQueryResponse()), 'PaymentLogResponse': TypeInfo(TypeOf.Class, create:() => PaymentLogResponse()), 'DaysOfWeekResponse': TypeInfo(TypeOf.Class, create:() => DaysOfWeekResponse()), 'RebateCodeCompanyResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeCompanyResponse()), 'IInvoiceAddress': TypeInfo(TypeOf.Interface), 'ArticleResponse': TypeInfo(TypeOf.Class, create:() => ArticleResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ArticleServiceRelation': TypeInfo(TypeOf.Class, create:() => ArticleServiceRelation()), 'RebateCodeResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreateRebateCode': TypeInfo(TypeOf.Class, create:() => CreateRebateCode()), });