/* Options: Date: 2024-11-21 11:45:55 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: CreateInvoiceDraft.* //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, } class InvoiceDraftQueryResponse implements IConvertible { String? InvoiceId; DateTime? CreatedDate; double? TotalAmount; double? TotalVatAmount; String? CustomerId; List? Rows; String? InvoiceDate; String? DueDate; DateTime? DeliveryDate; List? Persons; String? InvoiceCustomerName; InvoiceAddress? InvoiceAddress; bool? CustomerIsPrivatePerson; String? CustomerNumber; List? Notes; List? NoteIds; DateTime? CreatedUtc; bool? IncludesVat; String? PriceSign; String? BookingId; InvoiceDraftQueryResponse({this.InvoiceId,this.CreatedDate,this.TotalAmount,this.TotalVatAmount,this.CustomerId,this.Rows,this.InvoiceDate,this.DueDate,this.DeliveryDate,this.Persons,this.InvoiceCustomerName,this.InvoiceAddress,this.CustomerIsPrivatePerson,this.CustomerNumber,this.Notes,this.NoteIds,this.CreatedUtc,this.IncludesVat,this.PriceSign,this.BookingId}); InvoiceDraftQueryResponse.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!); 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']; CustomerNumber = json['CustomerNumber']; Notes = JsonConverters.fromJson(json['Notes'],'List',context!); NoteIds = JsonConverters.fromJson(json['NoteIds'],'List',context!); CreatedUtc = JsonConverters.fromJson(json['CreatedUtc'],'DateTime',context!); IncludesVat = json['IncludesVat']; 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!), '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, 'CustomerNumber': CustomerNumber, 'Notes': JsonConverters.toJson(Notes,'List',context!), 'NoteIds': JsonConverters.toJson(NoteIds,'List',context!), 'CreatedUtc': JsonConverters.toJson(CreatedUtc,'DateTime',context!), 'IncludesVat': IncludesVat, 'PriceSign': PriceSign, 'BookingId': BookingId }; getTypeName() => "InvoiceDraftQueryResponse"; TypeContext? context = _ctx; } class CreateInvoiceDraftQueryResponse implements IConvertible { InvoiceDraftQueryResponse? Invoice; String? InvoiceUri; ResponseStatus? ResponseStatus; CreateInvoiceDraftQueryResponse({this.Invoice,this.InvoiceUri,this.ResponseStatus}); CreateInvoiceDraftQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Invoice = JsonConverters.fromJson(json['Invoice'],'InvoiceDraftQueryResponse',context!); InvoiceUri = json['InvoiceUri']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Invoice': JsonConverters.toJson(Invoice,'InvoiceDraftQueryResponse',context!), 'InvoiceUri': InvoiceUri, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "CreateInvoiceDraftQueryResponse"; TypeContext? context = _ctx; } // @Route("/eaccounting/invoicedraft", "POST") class CreateInvoiceDraft 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; /** * 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; CreateInvoiceDraft({this.BookingId,this.TermsOfPaymentId,this.Notes,this.InvoiceCustomerName,this.RotPropertyType,this.RotReducedInvoicingType,this.CompanyId}); CreateInvoiceDraft.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']; 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, 'RotPropertyType': JsonConverters.toJson(RotPropertyType,'RotPropertyTypes',context!), 'RotReducedInvoicingType': JsonConverters.toJson(RotReducedInvoicingType,'RotReducedInvoicingTypes',context!), 'CompanyId': CompanyId }); createResponse() => CreateInvoiceDraftQueryResponse(); getResponseTypeName() => "CreateInvoiceDraftQueryResponse"; getTypeName() => "CreateInvoiceDraft"; 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), 'InvoiceDraftQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceDraftQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'InvoiceDraftLineQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceDraftLineQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Person': TypeInfo(TypeOf.Class, create:() => Person()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'NoteQueryResponse': TypeInfo(TypeOf.Class, create:() => NoteQueryResponse()), 'CreateInvoiceDraftQueryResponse': TypeInfo(TypeOf.Class, create:() => CreateInvoiceDraftQueryResponse()), 'CreateInvoiceDraft': TypeInfo(TypeOf.Class, create:() => CreateInvoiceDraft()), });