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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EAccountingSettingsQueryResponse:
    company_id: Optional[str] = None
    active: bool = False
    default_article6_percent_vat: Optional[str] = None
    default_article12_percent_vat: Decimal = decimal.Decimal(0)
    default_article25_percent_vat: Decimal = decimal.Decimal(0)
    default_create_type: Optional[str] = None
    default_terms_of_payment_id: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateEAccountingSettingsQuery(ICompany):
    # @ApiMember(Description="Article id for 25% VAT in e-accounting system")
    default_article25_percent_vat: Optional[str] = None
    """
    Article id for 25% VAT in e-accounting system
    """


    # @ApiMember(Description="Article id for 12% VAT in e-accounting system")
    default_article12_percent_vat: Optional[str] = None
    """
    Article id for 12% VAT in e-accounting system
    """


    # @ApiMember(Description="Article id for 6% VAT in e-accounting system")
    default_article6_percent_vat: Optional[str] = None
    """
    Article id for 6% VAT in e-accounting system
    """


    # @ApiMember(Description="Default invoice create type for invoice creation")
    default_create_type: Optional[str] = None
    """
    Default invoice create type for invoice creation
    """


    # @ApiMember(Description="Determines wether e-accounting intergration is active or not")
    e_accounting_integration_active: bool = False
    """
    Determines wether e-accounting intergration is active or not
    """


    # @ApiMember(Description="Default terms of payment value for invoice creation")
    default_terms_of_payment_id: Optional[str] = None
    """
    Default terms of payment value for invoice creation
    """


    # @ApiMember(Description="E-Accounting settings company Id.")
    company_id: Optional[str] = None
    """
    E-Accounting settings company Id.
    """

Python UpdateEAccountingSettingsQuery DTOs

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

HTTP + OTHER

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: text/jsonl
Content-Type: text/jsonl
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: text/jsonl
Content-Length: length

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