Server

<back to all web services

GetBrennstoff

Brennstofflieferung
Requires Authentication
The following routes are available for this service:
GET/api/v1/brennstofflieferung/{Guid}
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


// @DataContract
class BillingInformation implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var string|null */
        public ?string $guid=null,

        // @DataMember
        /** @var DateTime */
        public DateTime $from=new DateTime(),

        // @DataMember
        /** @var DateTime */
        public DateTime $to=new DateTime(),

        // @DataMember
        /** @var bool|null */
        public ?bool $isCompleted=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $hasNebenkosten=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['guid'])) $this->guid = $o['guid'];
        if (isset($o['from'])) $this->from = JsonConverters::from('DateTime', $o['from']);
        if (isset($o['to'])) $this->to = JsonConverters::from('DateTime', $o['to']);
        if (isset($o['isCompleted'])) $this->isCompleted = $o['isCompleted'];
        if (isset($o['hasNebenkosten'])) $this->hasNebenkosten = $o['hasNebenkosten'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->guid)) $o['guid'] = $this->guid;
        if (isset($this->from)) $o['from'] = JsonConverters::to('DateTime', $this->from);
        if (isset($this->to)) $o['to'] = JsonConverters::to('DateTime', $this->to);
        if (isset($this->isCompleted)) $o['isCompleted'] = $this->isCompleted;
        if (isset($this->hasNebenkosten)) $o['hasNebenkosten'] = $this->hasNebenkosten;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class Brennstofflieferung implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var string */
        public string $guid='',

        // @DataMember
        /** @var DateTime */
        public DateTime $deliveryDate=new DateTime(),

        // @DataMember
        /** @var float|null */
        public ?float $salexTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $emisionsTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $c02Taxes=null,

        // @DataMember
        /** @var float|null */
        public ?float $customsTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $otherCharges=null,

        // @DataMember
        /** @var float|null */
        public ?float $c02Price=null,

        // @DataMember
        /** @var float|null */
        public ?float $c02Tons=null,

        // @DataMember
        /** @var float|null */
        public ?float $quantity=null,

        // @DataMember
        /** @var float|null */
        public ?float $amount=null,

        // @DataMember
        /** @var float|null */
        public ?float $startMeterReadingValue=null,

        // @DataMember
        /** @var float|null */
        public ?float $endMeterReadingValue=null,

        // @DataMember
        /** @var float */
        public float $heizwert=0.0,

        // @DataMember
        /** @var bool|null */
        public ?bool $brennwert=null,

        // @DataMember
        /** @var string|null */
        public ?string $energyReliefAmountDescription=null,

        // @DataMember
        /** @var float|null */
        public ?float $energyReliefAmount=null,

        // @DataMember
        /** @var string|null */
        public ?string $electricityReliefAmountDescription=null,

        // @DataMember
        /** @var float|null */
        public ?float $electricityReliefAmount=null,

        // @DataMember
        /** @var float|null */
        public ?float $cO2EmissionsFactor=null,

        // @DataMember
        /** @var string|null */
        public ?string $cO2Text=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $cO2Active=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $cO2PriceKnd=null,

        // @DataMember
        /** @var float|null */
        public ?float $cO2PriceLandlord=null,

        // @DataMember
        /** @var float|null */
        public ?float $cO2PriceRenter=null,

        // @DataMember
        /** @var float|null */
        public ?float $cO2Area=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $isForCommercialUse=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $isRenovationRequired=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $isHeatingPadsImproved=null,

        // @DataMember
        /** @var float|null */
        public ?float $cO2KWh=null,

        // @DataMember
        /** @var float|null */
        public ?float $includedCO2SalesTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $cO2Costs=null,

        // @DataMember
        /** @var float|null */
        public ?float $totalC02Weight=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $noTotalDeductionC02Costs=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $isDeleted=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $isCreatedByApp=null,

        // @DataMember
        /** @var string */
        public string $brennstoffMediumGuid='',

        // @DataMember
        /** @var BillingInformation|null */
        public ?BillingInformation $billingInformation=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['guid'])) $this->guid = $o['guid'];
        if (isset($o['deliveryDate'])) $this->deliveryDate = JsonConverters::from('DateTime', $o['deliveryDate']);
        if (isset($o['salexTax'])) $this->salexTax = $o['salexTax'];
        if (isset($o['emisionsTax'])) $this->emisionsTax = $o['emisionsTax'];
        if (isset($o['c02Taxes'])) $this->c02Taxes = $o['c02Taxes'];
        if (isset($o['customsTax'])) $this->customsTax = $o['customsTax'];
        if (isset($o['otherCharges'])) $this->otherCharges = $o['otherCharges'];
        if (isset($o['c02Price'])) $this->c02Price = $o['c02Price'];
        if (isset($o['c02Tons'])) $this->c02Tons = $o['c02Tons'];
        if (isset($o['quantity'])) $this->quantity = $o['quantity'];
        if (isset($o['amount'])) $this->amount = $o['amount'];
        if (isset($o['startMeterReadingValue'])) $this->startMeterReadingValue = $o['startMeterReadingValue'];
        if (isset($o['endMeterReadingValue'])) $this->endMeterReadingValue = $o['endMeterReadingValue'];
        if (isset($o['heizwert'])) $this->heizwert = $o['heizwert'];
        if (isset($o['brennwert'])) $this->brennwert = $o['brennwert'];
        if (isset($o['energyReliefAmountDescription'])) $this->energyReliefAmountDescription = $o['energyReliefAmountDescription'];
        if (isset($o['energyReliefAmount'])) $this->energyReliefAmount = $o['energyReliefAmount'];
        if (isset($o['electricityReliefAmountDescription'])) $this->electricityReliefAmountDescription = $o['electricityReliefAmountDescription'];
        if (isset($o['electricityReliefAmount'])) $this->electricityReliefAmount = $o['electricityReliefAmount'];
        if (isset($o['cO2EmissionsFactor'])) $this->cO2EmissionsFactor = $o['cO2EmissionsFactor'];
        if (isset($o['cO2Text'])) $this->cO2Text = $o['cO2Text'];
        if (isset($o['cO2Active'])) $this->cO2Active = $o['cO2Active'];
        if (isset($o['cO2PriceKnd'])) $this->cO2PriceKnd = $o['cO2PriceKnd'];
        if (isset($o['cO2PriceLandlord'])) $this->cO2PriceLandlord = $o['cO2PriceLandlord'];
        if (isset($o['cO2PriceRenter'])) $this->cO2PriceRenter = $o['cO2PriceRenter'];
        if (isset($o['cO2Area'])) $this->cO2Area = $o['cO2Area'];
        if (isset($o['isForCommercialUse'])) $this->isForCommercialUse = $o['isForCommercialUse'];
        if (isset($o['isRenovationRequired'])) $this->isRenovationRequired = $o['isRenovationRequired'];
        if (isset($o['isHeatingPadsImproved'])) $this->isHeatingPadsImproved = $o['isHeatingPadsImproved'];
        if (isset($o['cO2KWh'])) $this->cO2KWh = $o['cO2KWh'];
        if (isset($o['includedCO2SalesTax'])) $this->includedCO2SalesTax = $o['includedCO2SalesTax'];
        if (isset($o['cO2Costs'])) $this->cO2Costs = $o['cO2Costs'];
        if (isset($o['totalC02Weight'])) $this->totalC02Weight = $o['totalC02Weight'];
        if (isset($o['noTotalDeductionC02Costs'])) $this->noTotalDeductionC02Costs = $o['noTotalDeductionC02Costs'];
        if (isset($o['isDeleted'])) $this->isDeleted = $o['isDeleted'];
        if (isset($o['isCreatedByApp'])) $this->isCreatedByApp = $o['isCreatedByApp'];
        if (isset($o['brennstoffMediumGuid'])) $this->brennstoffMediumGuid = $o['brennstoffMediumGuid'];
        if (isset($o['billingInformation'])) $this->billingInformation = JsonConverters::from('BillingInformation', $o['billingInformation']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->guid)) $o['guid'] = $this->guid;
        if (isset($this->deliveryDate)) $o['deliveryDate'] = JsonConverters::to('DateTime', $this->deliveryDate);
        if (isset($this->salexTax)) $o['salexTax'] = $this->salexTax;
        if (isset($this->emisionsTax)) $o['emisionsTax'] = $this->emisionsTax;
        if (isset($this->c02Taxes)) $o['c02Taxes'] = $this->c02Taxes;
        if (isset($this->customsTax)) $o['customsTax'] = $this->customsTax;
        if (isset($this->otherCharges)) $o['otherCharges'] = $this->otherCharges;
        if (isset($this->c02Price)) $o['c02Price'] = $this->c02Price;
        if (isset($this->c02Tons)) $o['c02Tons'] = $this->c02Tons;
        if (isset($this->quantity)) $o['quantity'] = $this->quantity;
        if (isset($this->amount)) $o['amount'] = $this->amount;
        if (isset($this->startMeterReadingValue)) $o['startMeterReadingValue'] = $this->startMeterReadingValue;
        if (isset($this->endMeterReadingValue)) $o['endMeterReadingValue'] = $this->endMeterReadingValue;
        if (isset($this->heizwert)) $o['heizwert'] = $this->heizwert;
        if (isset($this->brennwert)) $o['brennwert'] = $this->brennwert;
        if (isset($this->energyReliefAmountDescription)) $o['energyReliefAmountDescription'] = $this->energyReliefAmountDescription;
        if (isset($this->energyReliefAmount)) $o['energyReliefAmount'] = $this->energyReliefAmount;
        if (isset($this->electricityReliefAmountDescription)) $o['electricityReliefAmountDescription'] = $this->electricityReliefAmountDescription;
        if (isset($this->electricityReliefAmount)) $o['electricityReliefAmount'] = $this->electricityReliefAmount;
        if (isset($this->cO2EmissionsFactor)) $o['cO2EmissionsFactor'] = $this->cO2EmissionsFactor;
        if (isset($this->cO2Text)) $o['cO2Text'] = $this->cO2Text;
        if (isset($this->cO2Active)) $o['cO2Active'] = $this->cO2Active;
        if (isset($this->cO2PriceKnd)) $o['cO2PriceKnd'] = $this->cO2PriceKnd;
        if (isset($this->cO2PriceLandlord)) $o['cO2PriceLandlord'] = $this->cO2PriceLandlord;
        if (isset($this->cO2PriceRenter)) $o['cO2PriceRenter'] = $this->cO2PriceRenter;
        if (isset($this->cO2Area)) $o['cO2Area'] = $this->cO2Area;
        if (isset($this->isForCommercialUse)) $o['isForCommercialUse'] = $this->isForCommercialUse;
        if (isset($this->isRenovationRequired)) $o['isRenovationRequired'] = $this->isRenovationRequired;
        if (isset($this->isHeatingPadsImproved)) $o['isHeatingPadsImproved'] = $this->isHeatingPadsImproved;
        if (isset($this->cO2KWh)) $o['cO2KWh'] = $this->cO2KWh;
        if (isset($this->includedCO2SalesTax)) $o['includedCO2SalesTax'] = $this->includedCO2SalesTax;
        if (isset($this->cO2Costs)) $o['cO2Costs'] = $this->cO2Costs;
        if (isset($this->totalC02Weight)) $o['totalC02Weight'] = $this->totalC02Weight;
        if (isset($this->noTotalDeductionC02Costs)) $o['noTotalDeductionC02Costs'] = $this->noTotalDeductionC02Costs;
        if (isset($this->isDeleted)) $o['isDeleted'] = $this->isDeleted;
        if (isset($this->isCreatedByApp)) $o['isCreatedByApp'] = $this->isCreatedByApp;
        if (isset($this->brennstoffMediumGuid)) $o['brennstoffMediumGuid'] = $this->brennstoffMediumGuid;
        if (isset($this->billingInformation)) $o['billingInformation'] = JsonConverters::to('BillingInformation', $this->billingInformation);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class BrennstoffMedium implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="Guid")
        /** @var string|null */
        public ?string $Guid=null,

        // @DataMember(Name="Bezeichnung")
        /** @var string|null */
        public ?string $Bezeichnung=null,

        // @DataMember(Name="Lagernd")
        /** @var bool|null */
        public ?bool $Lagernd=null,

        // @DataMember(Name="EinheitTyp")
        /** @var string|null */
        public ?string $EinheitTyp=null,

        // @DataMember(Name="Heizwert")
        /** @var float|null */
        public ?float $Heizwert=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Guid'])) $this->Guid = $o['Guid'];
        if (isset($o['Bezeichnung'])) $this->Bezeichnung = $o['Bezeichnung'];
        if (isset($o['Lagernd'])) $this->Lagernd = $o['Lagernd'];
        if (isset($o['EinheitTyp'])) $this->EinheitTyp = $o['EinheitTyp'];
        if (isset($o['Heizwert'])) $this->Heizwert = $o['Heizwert'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Guid)) $o['Guid'] = $this->Guid;
        if (isset($this->Bezeichnung)) $o['Bezeichnung'] = $this->Bezeichnung;
        if (isset($this->Lagernd)) $o['Lagernd'] = $this->Lagernd;
        if (isset($this->EinheitTyp)) $o['EinheitTyp'] = $this->EinheitTyp;
        if (isset($this->Heizwert)) $o['Heizwert'] = $this->Heizwert;
        return empty($o) ? new class(){} : $o;
    }
}

class GetBrennstoffResponse implements JsonSerializable
{
    public function __construct(
        /** @var Brennstofflieferung|null */
        public ?Brennstofflieferung $brennstofflieferung=null,
        /** @var BrennstoffMedium|null */
        public ?BrennstoffMedium $brennstoffMedium=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['brennstofflieferung'])) $this->brennstofflieferung = JsonConverters::from('Brennstofflieferung', $o['brennstofflieferung']);
        if (isset($o['brennstoffMedium'])) $this->brennstoffMedium = JsonConverters::from('BrennstoffMedium', $o['brennstoffMedium']);
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->brennstofflieferung)) $o['brennstofflieferung'] = JsonConverters::to('Brennstofflieferung', $this->brennstofflieferung);
        if (isset($this->brennstoffMedium)) $o['brennstoffMedium'] = JsonConverters::to('BrennstoffMedium', $this->brennstoffMedium);
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class GetBrennstoff implements IHasBearerToken, JsonSerializable
{
    public function __construct(
        // @ApiMember(IsRequired=true, ParameterType="query")
        /** @var string */
        public string $bearerToken='',

        // @ApiMember(IsRequired=true, ParameterType="path")
        /** @var string */
        public string $guid=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['bearerToken'])) $this->bearerToken = $o['bearerToken'];
        if (isset($o['guid'])) $this->guid = $o['guid'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->bearerToken)) $o['bearerToken'] = $this->bearerToken;
        if (isset($this->guid)) $o['guid'] = $this->guid;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetBrennstoff 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 /api/v1/brennstofflieferung/{Guid} HTTP/1.1 
Host: g-lange-servdesk.eras-online.de 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"brennstofflieferung":{"guid":"00000000000000000000000000000000","deliveryDate":"0001-01-01T00:00:00.0000000Z","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:00.0000000Z","to":"0001-01-01T00:00:00.0000000Z","isCompleted":false,"hasNebenkosten":false}},"brennstoffMedium":{"Guid":"String","Bezeichnung":"String","Lagernd":false,"EinheitTyp":"String","Heizwert":0},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}