/* Options: Date: 2024-11-21 13:23:45 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateEaccountingCustomer.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class InvoiceAddress implements IConvertible { String? CorporateIdentityNumber; String? InvoiceAddress1; String? InvoiceAddress2; String? InvoiceCity; String? InvoicePostalCode; String? InvoiceCountryCode; InvoiceAddress({this.CorporateIdentityNumber,this.InvoiceAddress1,this.InvoiceAddress2,this.InvoiceCity,this.InvoicePostalCode,this.InvoiceCountryCode}); InvoiceAddress.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() => "InvoiceAddress"; TypeContext? context = _ctx; } class EAccountingTermsOfPayment implements IConvertible { String? Id; String? Name; String? NameEnglish; int? NumberOfDays; int? TermsOfPaymentTypeId; String? TermsOfPaymentTypeText; bool? AvailableForSales; bool? AvailableForPurchase; EAccountingTermsOfPayment({this.Id,this.Name,this.NameEnglish,this.NumberOfDays,this.TermsOfPaymentTypeId,this.TermsOfPaymentTypeText,this.AvailableForSales,this.AvailableForPurchase}); EAccountingTermsOfPayment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; NameEnglish = json['NameEnglish']; NumberOfDays = json['NumberOfDays']; TermsOfPaymentTypeId = json['TermsOfPaymentTypeId']; TermsOfPaymentTypeText = json['TermsOfPaymentTypeText']; AvailableForSales = json['AvailableForSales']; AvailableForPurchase = json['AvailableForPurchase']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'NameEnglish': NameEnglish, 'NumberOfDays': NumberOfDays, 'TermsOfPaymentTypeId': TermsOfPaymentTypeId, 'TermsOfPaymentTypeText': TermsOfPaymentTypeText, 'AvailableForSales': AvailableForSales, 'AvailableForPurchase': AvailableForPurchase }; getTypeName() => "EAccountingTermsOfPayment"; TypeContext? context = _ctx; } class CustomerLabel implements IConvertible { String? Id; String? Name; String? Description; CustomerLabel({this.Id,this.Name,this.Description}); CustomerLabel.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description }; getTypeName() => "CustomerLabel"; TypeContext? context = _ctx; } class DirectDebitCustomerSettings implements IConvertible { String? MandateId; int? MandateType; int? SequenceType; DateTime? SigningDate; DateTime? EndDate; DateTime? LatestDirectDebit; DirectDebitCustomerSettings({this.MandateId,this.MandateType,this.SequenceType,this.SigningDate,this.EndDate,this.LatestDirectDebit}); DirectDebitCustomerSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { MandateId = json['MandateId']; MandateType = json['MandateType']; SequenceType = json['SequenceType']; SigningDate = JsonConverters.fromJson(json['SigningDate'],'DateTime',context!); EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!); LatestDirectDebit = JsonConverters.fromJson(json['LatestDirectDebit'],'DateTime',context!); return this; } Map toJson() => { 'MandateId': MandateId, 'MandateType': MandateType, 'SequenceType': SequenceType, 'SigningDate': JsonConverters.toJson(SigningDate,'DateTime',context!), 'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!), 'LatestDirectDebit': JsonConverters.toJson(LatestDirectDebit,'DateTime',context!) }; getTypeName() => "DirectDebitCustomerSettings"; TypeContext? context = _ctx; } class CreateEAccountingCustomer extends InvoiceAddress implements IConvertible { String? CustomerNumber; String? ContactPersonEmail; String? ContactPersonMobile; String? ContactPersonName; String? ContactPersonPhone; String? CurrencyCode; String? GLN; String? EmailAddress; String? EmailAddressOrder; String? EmailAddressQuote; String? DeliveryCustomerName; String? DeliveryAddress1; String? DeliveryAddress2; String? DeliveryCity; String? DeliveryCountryCode; String? DeliveryPostalCode; String? DeliveryMethodId; String? DeliveryTermId; String? PayToAccountId; String? Name; String? Note; bool? ReverseChargeOnConstructionServices; int? WebshopCustomerNumber; String? MobilePhone; String? Telephone; String? TermsOfPaymentId; EAccountingTermsOfPayment? EAccountingTermsOfPayment; String? VatNumber; String? WwwAddress; String? LastInvoiceDate; bool? IsPrivatePerson; bool? IsNorthernIreland; double? DiscountPercentage; DateTime? ChangedUtc; bool? IsActive; bool? ForceBookkeepVat; String? EdiGlnNumber; String? SalesDocumentLanguage; String? ElectronicAddress; String? ElectronicReference; String? EdiServiceDelivererId; DateTime? AutoInvoiceActivationEmailSentDate; DateTime? AutoInvoiceRegistrationRequestSentDate; List? EmailAddresses; List? CustomerLabels; List? MessageThreads; List? Notes; bool? IsFutureInvoiceDateAllowed; bool? DeliveryBasedVat; String? SalesPriceListId; String? Iban; DirectDebitCustomerSettings? DirectDebitCustomerSettings; String? DiscountAgreementId; double? UnpaidInvoicesAmount; CreateEAccountingCustomer({this.CustomerNumber,this.ContactPersonEmail,this.ContactPersonMobile,this.ContactPersonName,this.ContactPersonPhone,this.CurrencyCode,this.GLN,this.EmailAddress,this.EmailAddressOrder,this.EmailAddressQuote,this.DeliveryCustomerName,this.DeliveryAddress1,this.DeliveryAddress2,this.DeliveryCity,this.DeliveryCountryCode,this.DeliveryPostalCode,this.DeliveryMethodId,this.DeliveryTermId,this.PayToAccountId,this.Name,this.Note,this.ReverseChargeOnConstructionServices,this.WebshopCustomerNumber,this.MobilePhone,this.Telephone,this.TermsOfPaymentId,this.EAccountingTermsOfPayment,this.VatNumber,this.WwwAddress,this.LastInvoiceDate,this.IsPrivatePerson,this.IsNorthernIreland,this.DiscountPercentage,this.ChangedUtc,this.IsActive,this.ForceBookkeepVat,this.EdiGlnNumber,this.SalesDocumentLanguage,this.ElectronicAddress,this.ElectronicReference,this.EdiServiceDelivererId,this.AutoInvoiceActivationEmailSentDate,this.AutoInvoiceRegistrationRequestSentDate,this.EmailAddresses,this.CustomerLabels,this.MessageThreads,this.Notes,this.IsFutureInvoiceDateAllowed,this.DeliveryBasedVat,this.SalesPriceListId,this.Iban,this.DirectDebitCustomerSettings,this.DiscountAgreementId,this.UnpaidInvoicesAmount}); CreateEAccountingCustomer.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CustomerNumber = json['CustomerNumber']; ContactPersonEmail = json['ContactPersonEmail']; ContactPersonMobile = json['ContactPersonMobile']; ContactPersonName = json['ContactPersonName']; ContactPersonPhone = json['ContactPersonPhone']; CurrencyCode = json['CurrencyCode']; GLN = json['GLN']; EmailAddress = json['EmailAddress']; EmailAddressOrder = json['EmailAddressOrder']; EmailAddressQuote = json['EmailAddressQuote']; DeliveryCustomerName = json['DeliveryCustomerName']; DeliveryAddress1 = json['DeliveryAddress1']; DeliveryAddress2 = json['DeliveryAddress2']; DeliveryCity = json['DeliveryCity']; DeliveryCountryCode = json['DeliveryCountryCode']; DeliveryPostalCode = json['DeliveryPostalCode']; DeliveryMethodId = json['DeliveryMethodId']; DeliveryTermId = json['DeliveryTermId']; PayToAccountId = json['PayToAccountId']; Name = json['Name']; Note = json['Note']; ReverseChargeOnConstructionServices = json['ReverseChargeOnConstructionServices']; WebshopCustomerNumber = json['WebshopCustomerNumber']; MobilePhone = json['MobilePhone']; Telephone = json['Telephone']; TermsOfPaymentId = json['TermsOfPaymentId']; EAccountingTermsOfPayment = JsonConverters.fromJson(json['EAccountingTermsOfPayment'],'EAccountingTermsOfPayment',context!); VatNumber = json['VatNumber']; WwwAddress = json['WwwAddress']; LastInvoiceDate = json['LastInvoiceDate']; IsPrivatePerson = json['IsPrivatePerson']; IsNorthernIreland = json['IsNorthernIreland']; DiscountPercentage = JsonConverters.toDouble(json['DiscountPercentage']); ChangedUtc = JsonConverters.fromJson(json['ChangedUtc'],'DateTime',context!); IsActive = json['IsActive']; ForceBookkeepVat = json['ForceBookkeepVat']; EdiGlnNumber = json['EdiGlnNumber']; SalesDocumentLanguage = json['SalesDocumentLanguage']; ElectronicAddress = json['ElectronicAddress']; ElectronicReference = json['ElectronicReference']; EdiServiceDelivererId = json['EdiServiceDelivererId']; AutoInvoiceActivationEmailSentDate = JsonConverters.fromJson(json['AutoInvoiceActivationEmailSentDate'],'DateTime',context!); AutoInvoiceRegistrationRequestSentDate = JsonConverters.fromJson(json['AutoInvoiceRegistrationRequestSentDate'],'DateTime',context!); EmailAddresses = JsonConverters.fromJson(json['EmailAddresses'],'List',context!); CustomerLabels = JsonConverters.fromJson(json['CustomerLabels'],'List',context!); MessageThreads = JsonConverters.fromJson(json['MessageThreads'],'List',context!); Notes = JsonConverters.fromJson(json['Notes'],'List',context!); IsFutureInvoiceDateAllowed = json['IsFutureInvoiceDateAllowed']; DeliveryBasedVat = json['DeliveryBasedVat']; SalesPriceListId = json['SalesPriceListId']; Iban = json['Iban']; DirectDebitCustomerSettings = JsonConverters.fromJson(json['DirectDebitCustomerSettings'],'DirectDebitCustomerSettings',context!); DiscountAgreementId = json['DiscountAgreementId']; UnpaidInvoicesAmount = JsonConverters.toDouble(json['UnpaidInvoicesAmount']); return this; } Map toJson() => super.toJson()..addAll({ 'CustomerNumber': CustomerNumber, 'ContactPersonEmail': ContactPersonEmail, 'ContactPersonMobile': ContactPersonMobile, 'ContactPersonName': ContactPersonName, 'ContactPersonPhone': ContactPersonPhone, 'CurrencyCode': CurrencyCode, 'GLN': GLN, 'EmailAddress': EmailAddress, 'EmailAddressOrder': EmailAddressOrder, 'EmailAddressQuote': EmailAddressQuote, 'DeliveryCustomerName': DeliveryCustomerName, 'DeliveryAddress1': DeliveryAddress1, 'DeliveryAddress2': DeliveryAddress2, 'DeliveryCity': DeliveryCity, 'DeliveryCountryCode': DeliveryCountryCode, 'DeliveryPostalCode': DeliveryPostalCode, 'DeliveryMethodId': DeliveryMethodId, 'DeliveryTermId': DeliveryTermId, 'PayToAccountId': PayToAccountId, 'Name': Name, 'Note': Note, 'ReverseChargeOnConstructionServices': ReverseChargeOnConstructionServices, 'WebshopCustomerNumber': WebshopCustomerNumber, 'MobilePhone': MobilePhone, 'Telephone': Telephone, 'TermsOfPaymentId': TermsOfPaymentId, 'EAccountingTermsOfPayment': JsonConverters.toJson(EAccountingTermsOfPayment,'EAccountingTermsOfPayment',context!), 'VatNumber': VatNumber, 'WwwAddress': WwwAddress, 'LastInvoiceDate': LastInvoiceDate, 'IsPrivatePerson': IsPrivatePerson, 'IsNorthernIreland': IsNorthernIreland, 'DiscountPercentage': DiscountPercentage, 'ChangedUtc': JsonConverters.toJson(ChangedUtc,'DateTime',context!), 'IsActive': IsActive, 'ForceBookkeepVat': ForceBookkeepVat, 'EdiGlnNumber': EdiGlnNumber, 'SalesDocumentLanguage': SalesDocumentLanguage, 'ElectronicAddress': ElectronicAddress, 'ElectronicReference': ElectronicReference, 'EdiServiceDelivererId': EdiServiceDelivererId, 'AutoInvoiceActivationEmailSentDate': JsonConverters.toJson(AutoInvoiceActivationEmailSentDate,'DateTime',context!), 'AutoInvoiceRegistrationRequestSentDate': JsonConverters.toJson(AutoInvoiceRegistrationRequestSentDate,'DateTime',context!), 'EmailAddresses': JsonConverters.toJson(EmailAddresses,'List',context!), 'CustomerLabels': JsonConverters.toJson(CustomerLabels,'List',context!), 'MessageThreads': JsonConverters.toJson(MessageThreads,'List',context!), 'Notes': JsonConverters.toJson(Notes,'List',context!), 'IsFutureInvoiceDateAllowed': IsFutureInvoiceDateAllowed, 'DeliveryBasedVat': DeliveryBasedVat, 'SalesPriceListId': SalesPriceListId, 'Iban': Iban, 'DirectDebitCustomerSettings': JsonConverters.toJson(DirectDebitCustomerSettings,'DirectDebitCustomerSettings',context!), 'DiscountAgreementId': DiscountAgreementId, 'UnpaidInvoicesAmount': UnpaidInvoicesAmount }); getTypeName() => "CreateEAccountingCustomer"; TypeContext? context = _ctx; } class EAccountingCustomerResponse extends CreateEAccountingCustomer implements IConvertible { String? Id; EAccountingCustomerResponse({this.Id}); EAccountingCustomerResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Id': Id }); getTypeName() => "EAccountingCustomerResponse"; TypeContext? context = _ctx; } // @Route("/eaccounting/customers", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class UpdateEaccountingCustomer implements IReturn, ICompany, IConvertible, IPut { /** * Customer Id in e-accounting. */ // @ApiMember(Description="Customer Id in e-accounting.", IsRequired=true) String? Id; /** * */ // @ApiMember(Description="") String? InvoiceCity; /** * Max length: 10 characters */ // @ApiMember(Description="Max length: 10 characters") String? InvoicePostalCode; /** * Max length: 50 characters */ // @ApiMember(Description="Max length: 50 characters") String? Name; /** * */ // @ApiMember(Description="") String? TermsOfPaymentId; /** * */ // @ApiMember(Description="") bool? IsPrivatePerson; /** * */ // @ApiMember(Description="") bool? IsActive; /** * */ // @ApiMember(Description="") String? Telephone; /** * */ // @ApiMember(Description="") String? EmailAddress; /** * */ // @ApiMember(Description="") String? MobilePhone; /** * 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; UpdateEaccountingCustomer({this.Id,this.InvoiceCity,this.InvoicePostalCode,this.Name,this.TermsOfPaymentId,this.IsPrivatePerson,this.IsActive,this.Telephone,this.EmailAddress,this.MobilePhone,this.CompanyId}); UpdateEaccountingCustomer.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; InvoiceCity = json['InvoiceCity']; InvoicePostalCode = json['InvoicePostalCode']; Name = json['Name']; TermsOfPaymentId = json['TermsOfPaymentId']; IsPrivatePerson = json['IsPrivatePerson']; IsActive = json['IsActive']; Telephone = json['Telephone']; EmailAddress = json['EmailAddress']; MobilePhone = json['MobilePhone']; CompanyId = json['CompanyId']; return this; } Map toJson() => { 'Id': Id, 'InvoiceCity': InvoiceCity, 'InvoicePostalCode': InvoicePostalCode, 'Name': Name, 'TermsOfPaymentId': TermsOfPaymentId, 'IsPrivatePerson': IsPrivatePerson, 'IsActive': IsActive, 'Telephone': Telephone, 'EmailAddress': EmailAddress, 'MobilePhone': MobilePhone, 'CompanyId': CompanyId }; createResponse() => EAccountingCustomerResponse(); getResponseTypeName() => "EAccountingCustomerResponse"; getTypeName() => "UpdateEaccountingCustomer"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'InvoiceAddress': TypeInfo(TypeOf.Class, create:() => InvoiceAddress()), 'EAccountingTermsOfPayment': TypeInfo(TypeOf.Class, create:() => EAccountingTermsOfPayment()), 'CustomerLabel': TypeInfo(TypeOf.Class, create:() => CustomerLabel()), 'DirectDebitCustomerSettings': TypeInfo(TypeOf.Class, create:() => DirectDebitCustomerSettings()), 'CreateEAccountingCustomer': TypeInfo(TypeOf.Class, create:() => CreateEAccountingCustomer()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'EAccountingCustomerResponse': TypeInfo(TypeOf.Class, create:() => EAccountingCustomerResponse()), 'UpdateEaccountingCustomer': TypeInfo(TypeOf.Class, create:() => UpdateEaccountingCustomer()), });