BokaMera.API.Host

<back to all web services

UpdateEAccountingSettingsQuery

The following routes are available for this service:
PUT/eaccounting/settingsCreate a new settings in e-accounting system; Should be uniques per company; If settings exists, they will be updated instead
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 UpdateEAccountingSettingsQuery implements ICompany, IConvertible
{
    /**
    * Article id for 25% VAT in e-accounting system
    */
    // @ApiMember(Description="Article id for 25% VAT in e-accounting system")
    String? DefaultArticle25PercentVat;

    /**
    * Article id for 12% VAT in e-accounting system
    */
    // @ApiMember(Description="Article id for 12% VAT in e-accounting system")
    String? DefaultArticle12PercentVat;

    /**
    * Article id for 6% VAT in e-accounting system
    */
    // @ApiMember(Description="Article id for 6% VAT in e-accounting system")
    String? DefaultArticle6PercentVat;

    /**
    * Default invoice create type for invoice creation
    */
    // @ApiMember(Description="Default invoice create type for invoice creation")
    String? DefaultCreateType;

    /**
    * Determines wether e-accounting intergration is active or not
    */
    // @ApiMember(Description="Determines wether e-accounting intergration is active or not")
    bool? EAccountingIntegrationActive;

    /**
    * Default terms of payment value for invoice creation
    */
    // @ApiMember(Description="Default terms of payment value for invoice creation")
    String? DefaultTermsOfPaymentId;

    /**
    * E-Accounting settings company Id.
    */
    // @ApiMember(Description="E-Accounting settings company Id.")
    String? CompanyId;

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

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

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

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

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

Dart UpdateEAccountingSettingsQuery 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.

PUT /eaccounting/settings HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"DefaultArticle25PercentVat":"String","DefaultArticle12PercentVat":"String","DefaultArticle6PercentVat":"String","DefaultCreateType":"String","EAccountingIntegrationActive":false,"DefaultTermsOfPaymentId":"String","CompanyId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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