| GET | /api/v1/heizbetriebskosten/{Guid} |
|---|
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 BillingInformation:
guid: Optional[str] = None
from_: datetime.datetime = field(metadata=config(field_name='from'), default=datetime.datetime(1, 1, 1))
to: datetime.datetime = datetime.datetime(1, 1, 1)
is_completed: bool = False
has_nebenkosten: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Direktkosten:
guid: Optional[str] = None
label: Optional[str] = None
date: datetime.datetime = datetime.datetime(1, 1, 1)
brutto: Decimal = decimal.Decimal(0)
sales_tax: Decimal = decimal.Decimal(0)
quantity: Decimal = decimal.Decimal(0)
type: Optional[str] = None
is_deleted: bool = False
is_created_by_app: bool = False
nutzer_guid: Optional[str] = None
billing_information: Optional[BillingInformation] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDirektkostenResponse:
direktkosten: Optional[Direktkosten] = None
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetHeizbetriebskosten(IHasBearerToken):
# @ApiMember(IsRequired=true, ParameterType="query")
bearer_token: Optional[str] = None
# @ApiMember(IsRequired=true, ParameterType="path")
guid: Optional[str] = None
Python GetHeizbetriebskosten DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/heizbetriebskosten/{Guid} HTTP/1.1
Host: g-lange-servdesk.eras-online.de
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"direktkosten":{"guid":"00000000000000000000000000000000","label":"String","date":"0001-01-01T00:00:00.0000000Z","brutto":0,"salesTax":0,"quantity":0,"type":"String","isDeleted":false,"isCreatedByApp":false,"nutzerGuid":"00000000000000000000000000000000","billingInformation":{"guid":"String","from":"0001-01-01T00:00:00.0000000Z","to":"0001-01-01T00:00:00.0000000Z","isCompleted":false,"hasNebenkosten":false}},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}