| POST | /api/v1/brennstofflieferung |
|---|
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 PostBrennstoffResponse:
response_status: Optional[ResponseStatus] = None
checksum_m_d5: Optional[str] = None
@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 Brennstofflieferung:
guid: Optional[str] = None
delivery_date: datetime.datetime = datetime.datetime(1, 1, 1)
salex_tax: Optional[Decimal] = None
emisions_tax: Optional[Decimal] = None
c02_taxes: Optional[Decimal] = None
customs_tax: Optional[Decimal] = None
other_charges: Optional[Decimal] = None
c02_price: Optional[Decimal] = None
c02_tons: Optional[Decimal] = None
quantity: Optional[Decimal] = None
amount: Optional[Decimal] = None
start_meter_reading_value: Optional[Decimal] = None
end_meter_reading_value: Optional[Decimal] = None
heizwert: Decimal = decimal.Decimal(0)
brennwert: bool = False
energy_relief_amount_description: Optional[str] = None
energy_relief_amount: Optional[Decimal] = None
electricity_relief_amount_description: Optional[str] = None
electricity_relief_amount: Optional[Decimal] = None
c_o2_emissions_factor: Optional[Decimal] = None
c_o2_text: Optional[str] = None
c_o2_active: Optional[bool] = None
c_o2_price_knd: Optional[bool] = None
c_o2_price_landlord: Optional[Decimal] = None
c_o2_price_renter: Optional[Decimal] = None
c_o2_area: Optional[Decimal] = None
is_for_commercial_use: Optional[bool] = None
is_renovation_required: Optional[bool] = None
is_heating_pads_improved: Optional[bool] = None
c_o2_k_wh: Optional[Decimal] = None
included_c_o2_sales_tax: Optional[Decimal] = None
c_o2_costs: Optional[Decimal] = None
total_c02_weight: Optional[Decimal] = None
no_total_deduction_c02_costs: Optional[bool] = None
is_deleted: bool = False
is_created_by_app: bool = False
brennstoff_medium_guid: Optional[str] = None
billing_information: Optional[BillingInformation] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RelatedTo:
guid: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PostBrennstoff(IHasBearerToken):
# @ApiMember(IsRequired=true, ParameterType="body")
brennstofflieferung: Optional[Brennstofflieferung] = None
# @ApiMember(IsRequired=true, ParameterType="body")
related_to_energie_verwerter: Optional[RelatedTo] = None
# @ApiMember(IsRequired=true, ParameterType="body")
related_to_brennstoff_medium: Optional[RelatedTo] = None
# @ApiMember(ParameterType="body")
related_to_billing_information: Optional[RelatedTo] = None
# @ApiMember(IsRequired=true, ParameterType="body")
bearer_token: Optional[str] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/v1/brennstofflieferung HTTP/1.1
Host: eca-abrechnungsservice-servdesk.eras-online.de
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
brennstofflieferung:
{
guid: 00000000000000000000000000000000,
deliveryDate: 0001-01-01T00:00:00Z,
salexTax: 0,
emisionsTax: 0,
c02Taxes: 0,
customsTax: 0,
otherCharges: 0,
c02Price: 0,
c02Tons: 0,
quantity: 0,
amount: 0,
startMeterReadingValue: 0,
endMeterReadingValue: 0,
heizwert: 0,
brennwert: False,
energyReliefAmountDescription: String,
energyReliefAmount: 0,
electricityReliefAmountDescription: String,
electricityReliefAmount: 0,
cO2EmissionsFactor: 0,
cO2Text: String,
cO2Active: False,
cO2PriceKnd: False,
cO2PriceLandlord: 0,
cO2PriceRenter: 0,
cO2Area: 0,
isForCommercialUse: False,
isRenovationRequired: False,
isHeatingPadsImproved: False,
cO2KWh: 0,
includedCO2SalesTax: 0,
cO2Costs: 0,
totalC02Weight: 0,
noTotalDeductionC02Costs: False,
isDeleted: False,
isCreatedByApp: False,
brennstoffMediumGuid: 00000000000000000000000000000000,
billingInformation:
{
guid: String,
from: 0001-01-01T00:00:00Z,
to: 0001-01-01T00:00:00Z,
isCompleted: False,
hasNebenkosten: False
}
},
relatedToEnergieVerwerter:
{
guid: 00000000000000000000000000000000
},
relatedToBrennstoffMedium:
{
guid: 00000000000000000000000000000000
},
relatedToBillingInformation:
{
guid: 00000000000000000000000000000000
},
bearerToken: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
},
checksumMD5: String
}