/* Options: Date: 2024-11-21 11:36:17 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: CreateInvoice.* //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; } enum RotPropertyTypes { Apartment, Property, } enum RotReducedInvoicingTypes { Normal, Rot, Rut, } enum EAccountingInvoiceSendTypes { None, AutoInvoiceElectronic, AutoInvoicePrint, AutoInvoiceB2C, } class InvoiceQueryResponse implements IConvertible { String? InvoiceId; DateTime? CreatedDate; double? TotalAmount; double? TotalVatAmount; String? CustomerId; List? Rows; List? VatSpecification; String? InvoiceDate; String? DueDate; DateTime? DeliveryDate; List? Persons; String? InvoiceCustomerName; InvoiceAddress? InvoiceAddress; bool? CustomerIsPrivatePerson; String? TermsOfPaymentId; EAccountingTermsOfPaymentQueryResponse? TermsOfPaymentData; String? CustomerEmail; int? InvoiceNumber; String? CustomerNumber; List? Notes; List? NoteIds; DateTime? CreatedUtc; DateTime? ModifiedUtc; bool? IncludesVat; EAccountingInvoiceSendTypes? SendType; bool? IsSold; DateTime? PaymentDate; PaymentStatus? PaymentStatus; String? PaymentStatusTitle; List? CreditedBy; String? PriceSign; String? BookingId; InvoiceQueryResponse({this.InvoiceId,this.CreatedDate,this.TotalAmount,this.TotalVatAmount,this.CustomerId,this.Rows,this.VatSpecification,this.InvoiceDate,this.DueDate,this.DeliveryDate,this.Persons,this.InvoiceCustomerName,this.InvoiceAddress,this.CustomerIsPrivatePerson,this.TermsOfPaymentId,this.TermsOfPaymentData,this.CustomerEmail,this.InvoiceNumber,this.CustomerNumber,this.Notes,this.NoteIds,this.CreatedUtc,this.ModifiedUtc,this.IncludesVat,this.SendType,this.IsSold,this.PaymentDate,this.PaymentStatus,this.PaymentStatusTitle,this.CreditedBy,this.PriceSign,this.BookingId}); InvoiceQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { InvoiceId = json['InvoiceId']; CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); TotalAmount = JsonConverters.toDouble(json['TotalAmount']); TotalVatAmount = JsonConverters.toDouble(json['TotalVatAmount']); CustomerId = json['CustomerId']; Rows = JsonConverters.fromJson(json['Rows'],'List',context!); VatSpecification = JsonConverters.fromJson(json['VatSpecification'],'List',context!); InvoiceDate = json['InvoiceDate']; DueDate = json['DueDate']; DeliveryDate = JsonConverters.fromJson(json['DeliveryDate'],'DateTime',context!); Persons = JsonConverters.fromJson(json['Persons'],'List',context!); InvoiceCustomerName = json['InvoiceCustomerName']; InvoiceAddress = JsonConverters.fromJson(json['InvoiceAddress'],'InvoiceAddress',context!); CustomerIsPrivatePerson = json['CustomerIsPrivatePerson']; TermsOfPaymentId = json['TermsOfPaymentId']; TermsOfPaymentData = JsonConverters.fromJson(json['TermsOfPaymentData'],'EAccountingTermsOfPaymentQueryResponse',context!); CustomerEmail = json['CustomerEmail']; InvoiceNumber = json['InvoiceNumber']; CustomerNumber = json['CustomerNumber']; Notes = JsonConverters.fromJson(json['Notes'],'List',context!); NoteIds = JsonConverters.fromJson(json['NoteIds'],'List',context!); CreatedUtc = JsonConverters.fromJson(json['CreatedUtc'],'DateTime',context!); ModifiedUtc = JsonConverters.fromJson(json['ModifiedUtc'],'DateTime',context!); IncludesVat = json['IncludesVat']; SendType = JsonConverters.fromJson(json['SendType'],'EAccountingInvoiceSendTypes',context!); IsSold = json['IsSold']; PaymentDate = JsonConverters.fromJson(json['PaymentDate'],'DateTime',context!); PaymentStatus = JsonConverters.fromJson(json['PaymentStatus'],'PaymentStatus',context!); PaymentStatusTitle = json['PaymentStatusTitle']; CreditedBy = JsonConverters.fromJson(json['CreditedBy'],'List',context!); PriceSign = json['PriceSign']; BookingId = json['BookingId']; return this; } Map toJson() => { 'InvoiceId': InvoiceId, 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'TotalAmount': TotalAmount, 'TotalVatAmount': TotalVatAmount, 'CustomerId': CustomerId, 'Rows': JsonConverters.toJson(Rows,'List',context!), 'VatSpecification': JsonConverters.toJson(VatSpecification,'List',context!), 'InvoiceDate': InvoiceDate, 'DueDate': DueDate, 'DeliveryDate': JsonConverters.toJson(DeliveryDate,'DateTime',context!), 'Persons': JsonConverters.toJson(Persons,'List',context!), 'InvoiceCustomerName': InvoiceCustomerName, 'InvoiceAddress': JsonConverters.toJson(InvoiceAddress,'InvoiceAddress',context!), 'CustomerIsPrivatePerson': CustomerIsPrivatePerson, 'TermsOfPaymentId': TermsOfPaymentId, 'TermsOfPaymentData': JsonConverters.toJson(TermsOfPaymentData,'EAccountingTermsOfPaymentQueryResponse',context!), 'CustomerEmail': CustomerEmail, 'InvoiceNumber': InvoiceNumber, 'CustomerNumber': CustomerNumber, 'Notes': JsonConverters.toJson(Notes,'List',context!), 'NoteIds': JsonConverters.toJson(NoteIds,'List',context!), 'CreatedUtc': JsonConverters.toJson(CreatedUtc,'DateTime',context!), 'ModifiedUtc': JsonConverters.toJson(ModifiedUtc,'DateTime',context!), 'IncludesVat': IncludesVat, 'SendType': JsonConverters.toJson(SendType,'EAccountingInvoiceSendTypes',context!), 'IsSold': IsSold, 'PaymentDate': JsonConverters.toJson(PaymentDate,'DateTime',context!), 'PaymentStatus': JsonConverters.toJson(PaymentStatus,'PaymentStatus',context!), 'PaymentStatusTitle': PaymentStatusTitle, 'CreditedBy': JsonConverters.toJson(CreditedBy,'List',context!), 'PriceSign': PriceSign, 'BookingId': BookingId }; getTypeName() => "InvoiceQueryResponse"; TypeContext? context = _ctx; } class CreateInvoiceQueryResponse implements IConvertible { InvoiceQueryResponse? Invoice; String? InvoiceUri; ResponseStatus? ResponseStatus; CreateInvoiceQueryResponse({this.Invoice,this.InvoiceUri,this.ResponseStatus}); CreateInvoiceQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Invoice = JsonConverters.fromJson(json['Invoice'],'InvoiceQueryResponse',context!); InvoiceUri = json['InvoiceUri']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Invoice': JsonConverters.toJson(Invoice,'InvoiceQueryResponse',context!), 'InvoiceUri': InvoiceUri, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "CreateInvoiceQueryResponse"; TypeContext? context = _ctx; } // @Route("/eaccounting/invoice", "POST") class CreateInvoice extends InvoiceAddress implements IReturn, ICompany, IConvertible, IPost { /** * The booking id, to be used to create the customer. */ // @ApiMember(Description="The booking id, to be used to create the customer.", IsRequired=true) int? BookingId; /** * The Term of payment Id, to be used to create the invoice. */ // @ApiMember(Description="The Term of payment Id, to be used to create the invoice.", IsRequired=true) String? TermsOfPaymentId; /** * Note id's to add to this invoice */ // @ApiMember(Description="Note id's to add to this invoice") List? Notes; /** * Invoice Customer name */ // @ApiMember(Description="Invoice Customer name") String? InvoiceCustomerName; /** * Used for sending the invoice via Auto-invoice Default:None, 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C = ['0', '1', '2', '3']. */ // @ApiMember(Description="Used for sending the invoice via Auto-invoice Default:None, 0 = None, 1 = AutoInvoiceElectronic, 2 = AutoInvoicePrint, 3 = AutoInvoiceB2C = ['0', '1', '2', '3'].", IsRequired=true) EAccountingInvoiceSendTypes? SendType; /** * 1 = Apartment, 2 = Property Leave blank or set to null if you do not intend to use ROT or Green Technology functionality. */ // @ApiMember(Description="1 = Apartment, 2 = Property Leave blank or set to null if you do not intend to use ROT or Green Technology functionality.", IsRequired=true) RotPropertyTypes? RotPropertyType; /** * 0 = Normal, 1 = Rot, 2 = Rut = ['0', '1', '2'] */ // @ApiMember(Description="0 = Normal, 1 = Rot, 2 = Rut = ['0', '1', '2']", IsRequired=true) RotReducedInvoicingTypes? RotReducedInvoicingType; /** * 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; CreateInvoice({this.BookingId,this.TermsOfPaymentId,this.Notes,this.InvoiceCustomerName,this.SendType,this.RotPropertyType,this.RotReducedInvoicingType,this.CompanyId}); CreateInvoice.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); BookingId = json['BookingId']; TermsOfPaymentId = json['TermsOfPaymentId']; Notes = JsonConverters.fromJson(json['Notes'],'List',context!); InvoiceCustomerName = json['InvoiceCustomerName']; SendType = JsonConverters.fromJson(json['SendType'],'EAccountingInvoiceSendTypes',context!); RotPropertyType = JsonConverters.fromJson(json['RotPropertyType'],'RotPropertyTypes',context!); RotReducedInvoicingType = JsonConverters.fromJson(json['RotReducedInvoicingType'],'RotReducedInvoicingTypes',context!); CompanyId = json['CompanyId']; return this; } Map toJson() => super.toJson()..addAll({ 'BookingId': BookingId, 'TermsOfPaymentId': TermsOfPaymentId, 'Notes': JsonConverters.toJson(Notes,'List',context!), 'InvoiceCustomerName': InvoiceCustomerName, 'SendType': JsonConverters.toJson(SendType,'EAccountingInvoiceSendTypes',context!), 'RotPropertyType': JsonConverters.toJson(RotPropertyType,'RotPropertyTypes',context!), 'RotReducedInvoicingType': JsonConverters.toJson(RotReducedInvoicingType,'RotReducedInvoicingTypes',context!), 'CompanyId': CompanyId }); createResponse() => CreateInvoiceQueryResponse(); getResponseTypeName() => "CreateInvoiceQueryResponse"; getTypeName() => "CreateInvoice"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'InvoiceAddress': TypeInfo(TypeOf.Class, create:() => InvoiceAddress()), 'RotPropertyTypes': TypeInfo(TypeOf.Enum, enumValues:RotPropertyTypes.values), 'RotReducedInvoicingTypes': TypeInfo(TypeOf.Enum, enumValues:RotReducedInvoicingTypes.values), 'EAccountingInvoiceSendTypes': TypeInfo(TypeOf.Enum, enumValues:EAccountingInvoiceSendTypes.values), 'InvoiceQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'InvoiceLineQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceLineQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'VatSpecificationQueryResponse': TypeInfo(TypeOf.Class, create:() => VatSpecificationQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Person': TypeInfo(TypeOf.Class, create:() => Person()), 'EAccountingTermsOfPaymentQueryResponse': TypeInfo(TypeOf.Class, create:() => EAccountingTermsOfPaymentQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'NoteQueryResponse': TypeInfo(TypeOf.Class, create:() => NoteQueryResponse()), 'PaymentStatus': TypeInfo(TypeOf.Class, create:() => PaymentStatus()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreditedBy': TypeInfo(TypeOf.Class, create:() => CreditedBy()), 'CreateInvoiceQueryResponse': TypeInfo(TypeOf.Class, create:() => CreateInvoiceQueryResponse()), 'CreateInvoice': TypeInfo(TypeOf.Class, create:() => CreateInvoice()), });