Server

<back to all web services

GetBrennstoffList

Brennstofflieferung
Requires Authentication
The following routes are available for this service:
GET/api/v1/brennstofflieferung
<?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 GetBrennstoffListResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<Brennstofflieferung>|null */
        public ?array $brennstofflieferungen=null,
        /** @var array<BrennstoffMedium>|null */
        public ?array $brennstoffMedium=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

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

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

        /** @description Optional! Follow the format : /api/v1/brennstofflieferung?filter[ObjektGuid]=* */
        // @DataMember(Name="filter[ObjektGuid]")
        // @ApiMember(Description="Optional! Follow the format : /api/v1/brennstofflieferung?filter[ObjektGuid]=*", ParameterType="query")
        /** @var string|null */
        public ?string $filter_ObjektGuid_=null,

        /** @description Optional! Follow the format : /api/v1/brennstofflieferung?filter[EnergieVerwerterGuid]=* */
        // @DataMember(Name="filter[EnergieVerwerterGuid]")
        // @ApiMember(Description="Optional! Follow the format : /api/v1/brennstofflieferung?filter[EnergieVerwerterGuid]=*", ParameterType="query")
        /** @var string|null */
        public ?string $filter_EnergieVerwerterGuid_=null,

        /** @description Optional! Follow the format : /api/v1/brennstofflieferung?filter[BillingInformationGuid]=* */
        // @DataMember(Name="filter[BillingInformationGuid]")
        // @ApiMember(Description="Optional! Follow the format : /api/v1/brennstofflieferung?filter[BillingInformationGuid]=*", ParameterType="query")
        /** @var string|null */
        public ?string $filter_BillingInformationGuid_=null
    ) {
    }

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

PHP GetBrennstoffList DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/v1/brennstofflieferung HTTP/1.1 
Host: isp-plauen-servdesk.eras-online.de 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetBrennstoffListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Get">
  <BrennstoffMedium xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Stammdaten" i:nil="true" />
  <Brennstofflieferungen xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models" i:nil="true" />
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GetBrennstoffListResponse>