BokaMera.API.Host

<back to all web services

EAccountingArticleQuery

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

class BaseArticleDto implements IConvertible
{
    String? ArticleId;
    double? ArticlePrice;
    String? ArticleName;
    DateTime? CreatedDate;

    BaseArticleDto({this.ArticleId,this.ArticlePrice,this.ArticleName,this.CreatedDate});
    BaseArticleDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ArticleId = json['ArticleId'];
        ArticlePrice = JsonConverters.toDouble(json['ArticlePrice']);
        ArticleName = json['ArticleName'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ArticleId': ArticleId,
        'ArticlePrice': ArticlePrice,
        'ArticleName': ArticleName,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!)
    };

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

class EAccountingArticleQueryResponse extends BaseArticleDto implements IConvertible
{
    String? UnitId;
    String? CodingId;
    String? VatRate;
    String? VatRatePercent;
    String? CurrencySign;

    EAccountingArticleQueryResponse({this.UnitId,this.CodingId,this.VatRate,this.VatRatePercent,this.CurrencySign});
    EAccountingArticleQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        UnitId = json['UnitId'];
        CodingId = json['CodingId'];
        VatRate = json['VatRate'];
        VatRatePercent = json['VatRatePercent'];
        CurrencySign = json['CurrencySign'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'UnitId': UnitId,
        'CodingId': CodingId,
        'VatRate': VatRate,
        'VatRatePercent': VatRatePercent,
        'CurrencySign': CurrencySign
    });

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

class EAccountingArticleQuery implements ICompany, IConvertible
{
    String? CompanyId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'BaseArticleDto': TypeInfo(TypeOf.Class, create:() => BaseArticleDto()),
    'EAccountingArticleQueryResponse': TypeInfo(TypeOf.Class, create:() => EAccountingArticleQueryResponse()),
    'EAccountingArticleQuery': TypeInfo(TypeOf.Class, create:() => EAccountingArticleQuery()),
});

Dart EAccountingArticleQuery DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /eaccounting/articles HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"UnitId":"String","CodingId":"String","VatRate":"String","VatRatePercent":"String","CurrencySign":"String","ArticlePrice":0,"ArticleName":"String"}