BokaMera.API.Host

<back to all web services

CreateInvoice

The following routes are available for this service:
POST/eaccounting/invoice
import 'package:servicestack/servicestack.dart';

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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CorporateIdentityNumber = json['CorporateIdentityNumber'];
        InvoiceAddress1 = json['InvoiceAddress1'];
        InvoiceAddress2 = json['InvoiceAddress2'];
        InvoiceCity = json['InvoiceCity'];
        InvoicePostalCode = json['InvoicePostalCode'];
        InvoiceCountryCode = json['InvoiceCountryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CorporateIdentityNumber': CorporateIdentityNumber,
        'InvoiceAddress1': InvoiceAddress1,
        'InvoiceAddress2': InvoiceAddress2,
        'InvoiceCity': InvoiceCity,
        'InvoicePostalCode': InvoicePostalCode,
        'InvoiceCountryCode': InvoiceCountryCode
    };

    getTypeName() => "InvoiceAddress";
    TypeContext? context = _ctx;
}

enum GreenTechnologyType
{
    None,
    SolarCellInstallation,
    ElectricEnergyStorageInstallation,
    ElectricVehicleChargingPointInstallation,
}

class ContributionMargin implements IConvertible
{
    int? Amount;
    int? Percentage;

    ContributionMargin({this.Amount,this.Percentage});
    ContributionMargin.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Amount = json['Amount'];
        Percentage = json['Percentage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Amount': Amount,
        'Percentage': Percentage
    };

    getTypeName() => "ContributionMargin";
    TypeContext? context = _ctx;
}

class InvoiceLineQueryResponse implements IConvertible
{
    String? ArticleNumber;
    String? ArticleId;
    bool? IsServiceArticle;
    double? AmountNoVat;
    double? PercentVat;
    int? LineNumber;
    bool? IsTextRow;
    String? Text;
    double? UnitPrice;
    String? UnitAbbreviation;
    String? UnitAbbreviationEnglish;
    double? DiscountPercentage;
    double? Quantity;
    bool? IsWorkCost;
    bool? IsVatFree;
    String? CostCenterItemId1;
    String? CostCenterItemId2;
    String? CostCenterItemId3;
    String? UnitId;
    String? ProjectId;
    int? WorkCostType;
    double? WorkHours;
    double? MaterialCosts;
    GreenTechnologyType? GreenTechnologyType;
    ContributionMargin? ContributionMargin;

    InvoiceLineQueryResponse({this.ArticleNumber,this.ArticleId,this.IsServiceArticle,this.AmountNoVat,this.PercentVat,this.LineNumber,this.IsTextRow,this.Text,this.UnitPrice,this.UnitAbbreviation,this.UnitAbbreviationEnglish,this.DiscountPercentage,this.Quantity,this.IsWorkCost,this.IsVatFree,this.CostCenterItemId1,this.CostCenterItemId2,this.CostCenterItemId3,this.UnitId,this.ProjectId,this.WorkCostType,this.WorkHours,this.MaterialCosts,this.GreenTechnologyType,this.ContributionMargin});
    InvoiceLineQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ArticleNumber = json['ArticleNumber'];
        ArticleId = json['ArticleId'];
        IsServiceArticle = json['IsServiceArticle'];
        AmountNoVat = JsonConverters.toDouble(json['AmountNoVat']);
        PercentVat = JsonConverters.toDouble(json['PercentVat']);
        LineNumber = json['LineNumber'];
        IsTextRow = json['IsTextRow'];
        Text = json['Text'];
        UnitPrice = JsonConverters.toDouble(json['UnitPrice']);
        UnitAbbreviation = json['UnitAbbreviation'];
        UnitAbbreviationEnglish = json['UnitAbbreviationEnglish'];
        DiscountPercentage = JsonConverters.toDouble(json['DiscountPercentage']);
        Quantity = JsonConverters.toDouble(json['Quantity']);
        IsWorkCost = json['IsWorkCost'];
        IsVatFree = json['IsVatFree'];
        CostCenterItemId1 = json['CostCenterItemId1'];
        CostCenterItemId2 = json['CostCenterItemId2'];
        CostCenterItemId3 = json['CostCenterItemId3'];
        UnitId = json['UnitId'];
        ProjectId = json['ProjectId'];
        WorkCostType = json['WorkCostType'];
        WorkHours = JsonConverters.toDouble(json['WorkHours']);
        MaterialCosts = JsonConverters.toDouble(json['MaterialCosts']);
        GreenTechnologyType = JsonConverters.fromJson(json['GreenTechnologyType'],'GreenTechnologyType',context!);
        ContributionMargin = JsonConverters.fromJson(json['ContributionMargin'],'ContributionMargin',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ArticleNumber': ArticleNumber,
        'ArticleId': ArticleId,
        'IsServiceArticle': IsServiceArticle,
        'AmountNoVat': AmountNoVat,
        'PercentVat': PercentVat,
        'LineNumber': LineNumber,
        'IsTextRow': IsTextRow,
        'Text': Text,
        'UnitPrice': UnitPrice,
        'UnitAbbreviation': UnitAbbreviation,
        'UnitAbbreviationEnglish': UnitAbbreviationEnglish,
        'DiscountPercentage': DiscountPercentage,
        'Quantity': Quantity,
        'IsWorkCost': IsWorkCost,
        'IsVatFree': IsVatFree,
        'CostCenterItemId1': CostCenterItemId1,
        'CostCenterItemId2': CostCenterItemId2,
        'CostCenterItemId3': CostCenterItemId3,
        'UnitId': UnitId,
        'ProjectId': ProjectId,
        'WorkCostType': WorkCostType,
        'WorkHours': WorkHours,
        'MaterialCosts': MaterialCosts,
        'GreenTechnologyType': JsonConverters.toJson(GreenTechnologyType,'GreenTechnologyType',context!),
        'ContributionMargin': JsonConverters.toJson(ContributionMargin,'ContributionMargin',context!)
    };

    getTypeName() => "InvoiceLineQueryResponse";
    TypeContext? context = _ctx;
}

class VatSpecificationQueryResponse implements IConvertible
{
    double? AmountInvoiceCurrency;
    double? VatAmountInvoiceCurrency;
    double? VatPercent;

    VatSpecificationQueryResponse({this.AmountInvoiceCurrency,this.VatAmountInvoiceCurrency,this.VatPercent});
    VatSpecificationQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AmountInvoiceCurrency = JsonConverters.toDouble(json['AmountInvoiceCurrency']);
        VatAmountInvoiceCurrency = JsonConverters.toDouble(json['VatAmountInvoiceCurrency']);
        VatPercent = JsonConverters.toDouble(json['VatPercent']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AmountInvoiceCurrency': AmountInvoiceCurrency,
        'VatAmountInvoiceCurrency': VatAmountInvoiceCurrency,
        'VatPercent': VatPercent
    };

    getTypeName() => "VatSpecificationQueryResponse";
    TypeContext? context = _ctx;
}

class Person implements IConvertible
{
    String? Ssn;
    int? Amount;

    Person({this.Ssn,this.Amount});
    Person.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Ssn = json['Ssn'];
        Amount = json['Amount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Ssn': Ssn,
        'Amount': Amount
    };

    getTypeName() => "Person";
    TypeContext? context = _ctx;
}

class EAccountingTermsOfPaymentQueryResponse implements IConvertible
{
    String? Id;
    String? Name;
    String? NameEnglish;
    int? NumberOfDays;
    int? TermsOfPaymentTypeId;
    String? TermsOfPaymentTypeText;
    bool? AvailableForSales;
    bool? AvailableForPurchase;

    EAccountingTermsOfPaymentQueryResponse({this.Id,this.Name,this.NameEnglish,this.NumberOfDays,this.TermsOfPaymentTypeId,this.TermsOfPaymentTypeText,this.AvailableForSales,this.AvailableForPurchase});
    EAccountingTermsOfPaymentQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> 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<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'NameEnglish': NameEnglish,
        'NumberOfDays': NumberOfDays,
        'TermsOfPaymentTypeId': TermsOfPaymentTypeId,
        'TermsOfPaymentTypeText': TermsOfPaymentTypeText,
        'AvailableForSales': AvailableForSales,
        'AvailableForPurchase': AvailableForPurchase
    };

    getTypeName() => "EAccountingTermsOfPaymentQueryResponse";
    TypeContext? context = _ctx;
}

class NoteQueryResponse implements IConvertible
{
    String? Id;
    String? Text;
    DateTime? CreatedUtc;
    DateTime? ModifiedUtc;

    NoteQueryResponse({this.Id,this.Text,this.CreatedUtc,this.ModifiedUtc});
    NoteQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Text = json['Text'];
        CreatedUtc = JsonConverters.fromJson(json['CreatedUtc'],'DateTime',context!);
        ModifiedUtc = JsonConverters.fromJson(json['ModifiedUtc'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Text': Text,
        'CreatedUtc': JsonConverters.toJson(CreatedUtc,'DateTime',context!),
        'ModifiedUtc': JsonConverters.toJson(ModifiedUtc,'DateTime',context!)
    };

    getTypeName() => "NoteQueryResponse";
    TypeContext? context = _ctx;
}

enum EAccountingInvoiceSendTypes
{
    None,
    AutoInvoiceElectronic,
    AutoInvoicePrint,
    AutoInvoiceB2C,
}

enum PaymentStatus
{
    Paid,
    Unpaid,
    Overdue,
}

class CreditedBy implements IConvertible
{
    String? CreditInvoiceId;

    CreditedBy({this.CreditInvoiceId});
    CreditedBy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CreditInvoiceId = json['CreditInvoiceId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CreditInvoiceId': CreditInvoiceId
    };

    getTypeName() => "CreditedBy";
    TypeContext? context = _ctx;
}

class InvoiceQueryResponse implements IConvertible
{
    String? InvoiceId;
    DateTime? CreatedDate;
    double? TotalAmount;
    double? TotalVatAmount;
    String? CustomerId;
    List<InvoiceLineQueryResponse>? Rows;
    List<VatSpecificationQueryResponse>? VatSpecification;
    String? InvoiceDate;
    String? DueDate;
    DateTime? DeliveryDate;
    List<Person>? Persons;
    String? InvoiceCustomerName;
    InvoiceAddress? InvoiceAddress;
    bool? CustomerIsPrivatePerson;
    String? TermsOfPaymentId;
    EAccountingTermsOfPaymentQueryResponse? TermsOfPaymentData;
    String? CustomerEmail;
    int? InvoiceNumber;
    String? CustomerNumber;
    List<NoteQueryResponse>? Notes;
    List<String>? NoteIds;
    DateTime? CreatedUtc;
    DateTime? ModifiedUtc;
    bool? IncludesVat;
    EAccountingInvoiceSendTypes? SendType;
    bool? IsSold;
    DateTime? PaymentDate;
    PaymentStatus? PaymentStatus;
    String? PaymentStatusTitle;
    List<CreditedBy>? 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> 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<InvoiceLineQueryResponse>',context!);
        VatSpecification = JsonConverters.fromJson(json['VatSpecification'],'List<VatSpecificationQueryResponse>',context!);
        InvoiceDate = json['InvoiceDate'];
        DueDate = json['DueDate'];
        DeliveryDate = JsonConverters.fromJson(json['DeliveryDate'],'DateTime',context!);
        Persons = JsonConverters.fromJson(json['Persons'],'List<Person>',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<NoteQueryResponse>',context!);
        NoteIds = JsonConverters.fromJson(json['NoteIds'],'List<String>',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<CreditedBy>',context!);
        PriceSign = json['PriceSign'];
        BookingId = json['BookingId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'InvoiceId': InvoiceId,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'TotalAmount': TotalAmount,
        'TotalVatAmount': TotalVatAmount,
        'CustomerId': CustomerId,
        'Rows': JsonConverters.toJson(Rows,'List<InvoiceLineQueryResponse>',context!),
        'VatSpecification': JsonConverters.toJson(VatSpecification,'List<VatSpecificationQueryResponse>',context!),
        'InvoiceDate': InvoiceDate,
        'DueDate': DueDate,
        'DeliveryDate': JsonConverters.toJson(DeliveryDate,'DateTime',context!),
        'Persons': JsonConverters.toJson(Persons,'List<Person>',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<NoteQueryResponse>',context!),
        'NoteIds': JsonConverters.toJson(NoteIds,'List<String>',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<CreditedBy>',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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Invoice = JsonConverters.fromJson(json['Invoice'],'InvoiceQueryResponse',context!);
        InvoiceUri = json['InvoiceUri'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Invoice': JsonConverters.toJson(Invoice,'InvoiceQueryResponse',context!),
        'InvoiceUri': InvoiceUri,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "CreateInvoiceQueryResponse";
    TypeContext? context = _ctx;
}

enum RotPropertyTypes
{
    Apartment,
    Property,
}

enum RotReducedInvoicingTypes
{
    Normal,
    Rot,
    Rut,
}

class CreateInvoice extends InvoiceAddress implements ICompany, IConvertible
{
    /**
    * 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<String>? 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<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        BookingId = json['BookingId'];
        TermsOfPaymentId = json['TermsOfPaymentId'];
        Notes = JsonConverters.fromJson(json['Notes'],'List<String>',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<String, dynamic> toJson() => super.toJson()..addAll({
        'BookingId': BookingId,
        'TermsOfPaymentId': TermsOfPaymentId,
        'Notes': JsonConverters.toJson(Notes,'List<String>',context!),
        'InvoiceCustomerName': InvoiceCustomerName,
        'SendType': JsonConverters.toJson(SendType,'EAccountingInvoiceSendTypes',context!),
        'RotPropertyType': JsonConverters.toJson(RotPropertyType,'RotPropertyTypes',context!),
        'RotReducedInvoicingType': JsonConverters.toJson(RotReducedInvoicingType,'RotReducedInvoicingTypes',context!),
        'CompanyId': CompanyId
    });

    getTypeName() => "CreateInvoice";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'InvoiceAddress': TypeInfo(TypeOf.Class, create:() => InvoiceAddress()),
    'GreenTechnologyType': TypeInfo(TypeOf.Enum, enumValues:GreenTechnologyType.values),
    'ContributionMargin': TypeInfo(TypeOf.Class, create:() => ContributionMargin()),
    'InvoiceLineQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceLineQueryResponse()),
    'VatSpecificationQueryResponse': TypeInfo(TypeOf.Class, create:() => VatSpecificationQueryResponse()),
    'Person': TypeInfo(TypeOf.Class, create:() => Person()),
    'EAccountingTermsOfPaymentQueryResponse': TypeInfo(TypeOf.Class, create:() => EAccountingTermsOfPaymentQueryResponse()),
    'NoteQueryResponse': TypeInfo(TypeOf.Class, create:() => NoteQueryResponse()),
    'EAccountingInvoiceSendTypes': TypeInfo(TypeOf.Enum, enumValues:EAccountingInvoiceSendTypes.values),
    'PaymentStatus': TypeInfo(TypeOf.Enum, enumValues:PaymentStatus.values),
    'CreditedBy': TypeInfo(TypeOf.Class, create:() => CreditedBy()),
    'InvoiceQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceQueryResponse()),
    'List<InvoiceLineQueryResponse>': TypeInfo(TypeOf.Class, create:() => <InvoiceLineQueryResponse>[]),
    'List<VatSpecificationQueryResponse>': TypeInfo(TypeOf.Class, create:() => <VatSpecificationQueryResponse>[]),
    'List<Person>': TypeInfo(TypeOf.Class, create:() => <Person>[]),
    'List<NoteQueryResponse>': TypeInfo(TypeOf.Class, create:() => <NoteQueryResponse>[]),
    'List<CreditedBy>': TypeInfo(TypeOf.Class, create:() => <CreditedBy>[]),
    'CreateInvoiceQueryResponse': TypeInfo(TypeOf.Class, create:() => CreateInvoiceQueryResponse()),
    'RotPropertyTypes': TypeInfo(TypeOf.Enum, enumValues:RotPropertyTypes.values),
    'RotReducedInvoicingTypes': TypeInfo(TypeOf.Enum, enumValues:RotReducedInvoicingTypes.values),
    'CreateInvoice': TypeInfo(TypeOf.Class, create:() => CreateInvoice()),
});

Dart CreateInvoice DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /eaccounting/invoice HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	BookingId: 0,
	Notes: 
	[
		String
	],
	InvoiceCustomerName: String,
	SendType: None,
	RotPropertyType: 0,
	RotReducedInvoicingType: Normal,
	CompanyId: 00000000-0000-0000-0000-000000000000,
	CorporateIdentityNumber: String,
	InvoiceAddress1: String,
	InvoiceAddress2: String,
	InvoiceCity: String,
	InvoicePostalCode: String,
	InvoiceCountryCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Invoice: 
	{
		TotalAmount: 0,
		TotalVatAmount: 0,
		CustomerId: String,
		Rows: 
		[
			{
				ArticleNumber: String,
				ArticleId: String,
				IsServiceArticle: False,
				AmountNoVat: 0,
				PercentVat: 0,
				LineNumber: 0,
				IsTextRow: False,
				Text: String,
				UnitPrice: 0,
				UnitAbbreviation: String,
				UnitAbbreviationEnglish: String,
				DiscountPercentage: 0,
				Quantity: 0,
				IsWorkCost: False,
				IsVatFree: False,
				CostCenterItemId1: String,
				CostCenterItemId2: String,
				CostCenterItemId3: String,
				UnitId: String,
				ProjectId: String,
				WorkCostType: 0,
				WorkHours: 0,
				MaterialCosts: 0,
				GreenTechnologyType: None,
				ContributionMargin: 
				{
					Amount: 0,
					Percentage: 0
				}
			}
		],
		VatSpecification: 
		[
			{
				AmountInvoiceCurrency: 0,
				VatAmountInvoiceCurrency: 0,
				VatPercent: 0
			}
		],
		InvoiceDate: String,
		DueDate: String,
		DeliveryDate: "0001-01-01T00:00:00",
		Persons: 
		[
			{
				Ssn: String,
				Amount: 0
			}
		],
		InvoiceCustomerName: String,
		InvoiceAddress: 
		{
			CorporateIdentityNumber: String,
			InvoiceAddress1: String,
			InvoiceAddress2: String,
			InvoiceCity: String,
			InvoicePostalCode: String,
			InvoiceCountryCode: String
		},
		CustomerIsPrivatePerson: False,
		TermsOfPaymentId: String,
		TermsOfPaymentData: 
		{
			Id: String,
			Name: String,
			NameEnglish: String,
			NumberOfDays: 0,
			TermsOfPaymentTypeId: 0,
			TermsOfPaymentTypeText: String,
			AvailableForSales: False,
			AvailableForPurchase: False
		},
		CustomerEmail: String,
		InvoiceNumber: 0,
		CustomerNumber: String,
		Notes: 
		[
			{
				Id: String,
				Text: String
			}
		],
		NoteIds: 
		[
			String
		],
		IncludesVat: False,
		SendType: None,
		IsSold: False,
		PaymentDate: "0001-01-01T00:00:00",
		PaymentStatus: Paid,
		PaymentStatusTitle: String,
		CreditedBy: 
		[
			{
				CreditInvoiceId: String
			}
		],
		PriceSign: String,
		BookingId: String
	},
	InvoiceUri: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}