BokaMera.API.Host

<back to all web services

EAccountingInvoiceDraftQuery

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

class EAccountingPagination implements IConvertible
{
    /**
    * Page number that will be fetched to e-accounting client; Default 1
    */
    // @DataMember(Order=1)
    // @ApiMember(Description="Page number that will be fetched to e-accounting client; Default 1")
    int? PageNumber;

    /**
    * Page size that will be fetched to e-accounting client; Default 75~
    */
    // @DataMember(Order=2)
    // @ApiMember(Description="Page size that will be fetched to e-accounting client; Default 75~")
    int? PageSize;

    EAccountingPagination({this.PageNumber,this.PageSize});
    EAccountingPagination.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    getTypeName() => "EAccountingPagination";
    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 InvoiceDraftLineQueryResponse 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;

    InvoiceDraftLineQueryResponse({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});
    InvoiceDraftLineQueryResponse.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() => "InvoiceDraftLineQueryResponse";
    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 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;
}

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;
}

class InvoiceDraftQueryResponse implements IConvertible
{
    String? InvoiceId;
    DateTime? CreatedDate;
    double? TotalAmount;
    double? TotalVatAmount;
    String? CustomerId;
    List<InvoiceDraftLineQueryResponse>? Rows;
    String? InvoiceDate;
    String? DueDate;
    DateTime? DeliveryDate;
    List<Person>? Persons;
    String? InvoiceCustomerName;
    InvoiceAddress? InvoiceAddress;
    bool? CustomerIsPrivatePerson;
    String? CustomerNumber;
    List<NoteQueryResponse>? Notes;
    List<String>? 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<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<InvoiceDraftLineQueryResponse>',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'];
        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!);
        IncludesVat = json['IncludesVat'];
        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<InvoiceDraftLineQueryResponse>',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,
        'CustomerNumber': CustomerNumber,
        'Notes': JsonConverters.toJson(Notes,'List<NoteQueryResponse>',context!),
        'NoteIds': JsonConverters.toJson(NoteIds,'List<String>',context!),
        'CreatedUtc': JsonConverters.toJson(CreatedUtc,'DateTime',context!),
        'IncludesVat': IncludesVat,
        'PriceSign': PriceSign,
        'BookingId': BookingId
    };

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

class EAccountingInvoiceDraftQuery extends EAccountingPagination implements ICompany, IConvertible
{
    int? BookingId;
    bool? IncludeInvoiceLines;
    bool? IncludeInvoiceNotes;
    String? CompanyId;

    EAccountingInvoiceDraftQuery({this.BookingId,this.IncludeInvoiceLines,this.IncludeInvoiceNotes,this.CompanyId});
    EAccountingInvoiceDraftQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        BookingId = json['BookingId'];
        IncludeInvoiceLines = json['IncludeInvoiceLines'];
        IncludeInvoiceNotes = json['IncludeInvoiceNotes'];
        CompanyId = json['CompanyId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'BookingId': BookingId,
        'IncludeInvoiceLines': IncludeInvoiceLines,
        'IncludeInvoiceNotes': IncludeInvoiceNotes,
        'CompanyId': CompanyId
    });

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'EAccountingPagination': TypeInfo(TypeOf.Class, create:() => EAccountingPagination()),
    'GreenTechnologyType': TypeInfo(TypeOf.Enum, enumValues:GreenTechnologyType.values),
    'ContributionMargin': TypeInfo(TypeOf.Class, create:() => ContributionMargin()),
    'InvoiceDraftLineQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceDraftLineQueryResponse()),
    'Person': TypeInfo(TypeOf.Class, create:() => Person()),
    'InvoiceAddress': TypeInfo(TypeOf.Class, create:() => InvoiceAddress()),
    'NoteQueryResponse': TypeInfo(TypeOf.Class, create:() => NoteQueryResponse()),
    'InvoiceDraftQueryResponse': TypeInfo(TypeOf.Class, create:() => InvoiceDraftQueryResponse()),
    'List<InvoiceDraftLineQueryResponse>': TypeInfo(TypeOf.Class, create:() => <InvoiceDraftLineQueryResponse>[]),
    'List<Person>': TypeInfo(TypeOf.Class, create:() => <Person>[]),
    'List<NoteQueryResponse>': TypeInfo(TypeOf.Class, create:() => <NoteQueryResponse>[]),
    'EAccountingInvoiceDraftQuery': TypeInfo(TypeOf.Class, create:() => EAccountingInvoiceDraftQuery()),
});

Dart EAccountingInvoiceDraftQuery DTOs

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

HTTP + XML

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

GET /eaccounting/invoicedrafts HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EAccountingDtos.InvoiceDraftQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookingId>String</BookingId>
  <CreatedDate>0001-01-01T00:00:00</CreatedDate>
  <CreatedUtc>0001-01-01T00:00:00</CreatedUtc>
  <CustomerId>String</CustomerId>
  <CustomerIsPrivatePerson>false</CustomerIsPrivatePerson>
  <CustomerNumber>String</CustomerNumber>
  <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
  <DueDate>String</DueDate>
  <IncludesVat>false</IncludesVat>
  <InvoiceAddress>
    <CorporateIdentityNumber>String</CorporateIdentityNumber>
    <InvoiceAddress1>String</InvoiceAddress1>
    <InvoiceAddress2>String</InvoiceAddress2>
    <InvoiceCity>String</InvoiceCity>
    <InvoiceCountryCode>String</InvoiceCountryCode>
    <InvoicePostalCode>String</InvoicePostalCode>
  </InvoiceAddress>
  <InvoiceCustomerName>String</InvoiceCustomerName>
  <InvoiceDate>String</InvoiceDate>
  <InvoiceId>00000000-0000-0000-0000-000000000000</InvoiceId>
  <NoteIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </NoteIds>
  <Notes>
    <EAccountingDtos.NoteQueryResponse>
      <CreatedUtc>0001-01-01T00:00:00</CreatedUtc>
      <Id>String</Id>
      <ModifiedUtc>0001-01-01T00:00:00</ModifiedUtc>
      <Text>String</Text>
    </EAccountingDtos.NoteQueryResponse>
  </Notes>
  <Persons>
    <EAccountingClientDtos.Person>
      <Amount>0</Amount>
      <Ssn>String</Ssn>
    </EAccountingClientDtos.Person>
  </Persons>
  <PriceSign>String</PriceSign>
  <Rows>
    <EAccountingDtos.InvoiceDraftLineQueryResponse>
      <AmountNoVat>0</AmountNoVat>
      <ArticleId>String</ArticleId>
      <ArticleNumber>String</ArticleNumber>
      <ContributionMargin>
        <Amount>0</Amount>
        <Percentage>0</Percentage>
      </ContributionMargin>
      <CostCenterItemId1>String</CostCenterItemId1>
      <CostCenterItemId2>String</CostCenterItemId2>
      <CostCenterItemId3>String</CostCenterItemId3>
      <DiscountPercentage>0</DiscountPercentage>
      <GreenTechnologyType>None</GreenTechnologyType>
      <IsServiceArticle>false</IsServiceArticle>
      <IsTextRow>false</IsTextRow>
      <IsVatFree>false</IsVatFree>
      <IsWorkCost>false</IsWorkCost>
      <LineNumber>0</LineNumber>
      <MaterialCosts>0</MaterialCosts>
      <PercentVat>0</PercentVat>
      <ProjectId>String</ProjectId>
      <Quantity>0</Quantity>
      <Text>String</Text>
      <UnitAbbreviation>String</UnitAbbreviation>
      <UnitAbbreviationEnglish>String</UnitAbbreviationEnglish>
      <UnitId>String</UnitId>
      <UnitPrice>0</UnitPrice>
      <WorkCostType>0</WorkCostType>
      <WorkHours>0</WorkHours>
    </EAccountingDtos.InvoiceDraftLineQueryResponse>
  </Rows>
  <TotalAmount>0</TotalAmount>
  <TotalVatAmount>0</TotalVatAmount>
</EAccountingDtos.InvoiceDraftQueryResponse>