BokaMera.API.Host

<back to all web services

GetEAccountingSettingsQuery

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

class EAccountingSettingsQueryResponse implements IConvertible
{
    String? CompanyId;
    bool? Active;
    String? DefaultArticle6PercentVat;
    double? DefaultArticle12PercentVat;
    double? DefaultArticle25PercentVat;
    String? DefaultCreateType;
    String? DefaultTermsOfPaymentId;

    EAccountingSettingsQueryResponse({this.CompanyId,this.Active,this.DefaultArticle6PercentVat,this.DefaultArticle12PercentVat,this.DefaultArticle25PercentVat,this.DefaultCreateType,this.DefaultTermsOfPaymentId});
    EAccountingSettingsQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Active = json['Active'];
        DefaultArticle6PercentVat = json['DefaultArticle6PercentVat'];
        DefaultArticle12PercentVat = JsonConverters.toDouble(json['DefaultArticle12PercentVat']);
        DefaultArticle25PercentVat = JsonConverters.toDouble(json['DefaultArticle25PercentVat']);
        DefaultCreateType = json['DefaultCreateType'];
        DefaultTermsOfPaymentId = json['DefaultTermsOfPaymentId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Active': Active,
        'DefaultArticle6PercentVat': DefaultArticle6PercentVat,
        'DefaultArticle12PercentVat': DefaultArticle12PercentVat,
        'DefaultArticle25PercentVat': DefaultArticle25PercentVat,
        'DefaultCreateType': DefaultCreateType,
        'DefaultTermsOfPaymentId': DefaultTermsOfPaymentId
    };

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

class GetEAccountingSettingsQuery implements ICompany, IConvertible
{
    /**
    * E-Accounting settings company Id.
    */
    // @ApiMember(Description="E-Accounting settings company Id.")
    String? CompanyId;

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

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

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

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

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

Dart GetEAccountingSettingsQuery DTOs

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

HTTP + CSV

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

GET /eaccounting/settings HTTP/1.1 
Host: api.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Active":false,"DefaultArticle6PercentVat":"String","DefaultArticle12PercentVat":0,"DefaultArticle25PercentVat":0,"DefaultCreateType":"String","DefaultTermsOfPaymentId":"String"}