Server

<back to all web services

PutHeizbetriebskosten

Heizbetriebskosten
Requires Authentication
The following routes are available for this service:
PUT/api/v1/heizbetriebskosten
<?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};


class PutHeizbetriebskostenResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

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

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

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

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

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

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

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

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

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

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

        // @DataMember
        /** @var bool|null */
        public ?bool $isCreatedByApp=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['salesTax'])) $this->salesTax = $o['salesTax'];
        if (isset($o['haushatlsnahediensteBrutto'])) $this->haushatlsnahediensteBrutto = $o['haushatlsnahediensteBrutto'];
        if (isset($o['brutto'])) $this->brutto = $o['brutto'];
        if (isset($o['haushatlsnahediensteLabel'])) $this->haushatlsnahediensteLabel = $o['haushatlsnahediensteLabel'];
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['isDeleted'])) $this->isDeleted = $o['isDeleted'];
        if (isset($o['isCreatedByApp'])) $this->isCreatedByApp = $o['isCreatedByApp'];
    }
    
    /** @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->salesTax)) $o['salesTax'] = $this->salesTax;
        if (isset($this->haushatlsnahediensteBrutto)) $o['haushatlsnahediensteBrutto'] = $this->haushatlsnahediensteBrutto;
        if (isset($this->brutto)) $o['brutto'] = $this->brutto;
        if (isset($this->haushatlsnahediensteLabel)) $o['haushatlsnahediensteLabel'] = $this->haushatlsnahediensteLabel;
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->isDeleted)) $o['isDeleted'] = $this->isDeleted;
        if (isset($this->isCreatedByApp)) $o['isCreatedByApp'] = $this->isCreatedByApp;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class RelatedTo implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var string */
        public string $guid=''
    ) {
    }

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

class PutHeizbetriebskosten implements IHasBearerToken, JsonSerializable
{
    public function __construct(
        // @ApiMember(IsRequired=true, ParameterType="body")
        /** @var Heizbetriebskosten|null */
        public ?Heizbetriebskosten $heizbetriebskosten=null,

        // @ApiMember(IsRequired=true, ParameterType="body")
        /** @var RelatedTo|null */
        public ?RelatedTo $relatedToObjekt=null,

        // @ApiMember(IsRequired=true, ParameterType="body")
        /** @var RelatedTo|null */
        public ?RelatedTo $relatedToBillingInformation=null,

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

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['heizbetriebskosten'])) $this->heizbetriebskosten = JsonConverters::from('Heizbetriebskosten', $o['heizbetriebskosten']);
        if (isset($o['relatedToObjekt'])) $this->relatedToObjekt = JsonConverters::from('RelatedTo', $o['relatedToObjekt']);
        if (isset($o['relatedToBillingInformation'])) $this->relatedToBillingInformation = JsonConverters::from('RelatedTo', $o['relatedToBillingInformation']);
        if (isset($o['bearerToken'])) $this->bearerToken = $o['bearerToken'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->heizbetriebskosten)) $o['heizbetriebskosten'] = JsonConverters::to('Heizbetriebskosten', $this->heizbetriebskosten);
        if (isset($this->relatedToObjekt)) $o['relatedToObjekt'] = JsonConverters::to('RelatedTo', $this->relatedToObjekt);
        if (isset($this->relatedToBillingInformation)) $o['relatedToBillingInformation'] = JsonConverters::to('RelatedTo', $this->relatedToBillingInformation);
        if (isset($this->bearerToken)) $o['bearerToken'] = $this->bearerToken;
        return empty($o) ? new class(){} : $o;
    }
}

PHP PutHeizbetriebskosten 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.

PUT /api/v1/heizbetriebskosten HTTP/1.1 
Host: g-lange-servdesk.eras-online.de 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PutHeizbetriebskosten xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Put">
  <BearerToken>String</BearerToken>
  <Heizbetriebskosten xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models">
    <d2p1:Brutto>0</d2p1:Brutto>
    <d2p1:Description>String</d2p1:Description>
    <d2p1:From>0001-01-01T00:00:00</d2p1:From>
    <d2p1:Guid>00000000-0000-0000-0000-000000000000</d2p1:Guid>
    <d2p1:HaushatlsnahediensteBrutto>0</d2p1:HaushatlsnahediensteBrutto>
    <d2p1:HaushatlsnahediensteLabel>String</d2p1:HaushatlsnahediensteLabel>
    <d2p1:IsCreatedByApp>false</d2p1:IsCreatedByApp>
    <d2p1:IsDeleted>false</d2p1:IsDeleted>
    <d2p1:SalesTax>0</d2p1:SalesTax>
    <d2p1:To>0001-01-01T00:00:00</d2p1:To>
  </Heizbetriebskosten>
  <RelatedToBillingInformation xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models">
    <d2p1:Guid>00000000-0000-0000-0000-000000000000</d2p1:Guid>
  </RelatedToBillingInformation>
  <RelatedToObjekt xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Models">
    <d2p1:Guid>00000000-0000-0000-0000-000000000000</d2p1:Guid>
  </RelatedToObjekt>
</PutHeizbetriebskosten>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PutHeizbetriebskostenResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2WebExt.Put">
  <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>
</PutHeizbetriebskostenResponse>