| GET | /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};
// @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;
}
}
class GetHeizbetriebskostenListResponse implements JsonSerializable
{
public function __construct(
/** @var array<Heizbetriebskosten>|null */
public ?array $heizbetriebskostenList=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['heizbetriebskostenList'])) $this->heizbetriebskostenList = JsonConverters::fromArray('Heizbetriebskosten', $o['heizbetriebskostenList']);
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->heizbetriebskostenList)) $o['heizbetriebskostenList'] = JsonConverters::toArray('Heizbetriebskosten', $this->heizbetriebskostenList);
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
return empty($o) ? new class(){} : $o;
}
}
class GetHeizbetriebskostenList implements IHasBearerToken, JsonSerializable
{
public function __construct(
// @ApiMember(IsRequired=true, ParameterType="query")
/** @var string */
public string $bearerToken='',
/** @description Optional! Follow the format : /api/v1/heizbetriebskosten?filter[ObjektGuid]=* */
// @DataMember(Name="filter[ObjektGuid]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/heizbetriebskosten?filter[ObjektGuid]=*", ParameterType="query")
/** @var string|null */
public ?string $filter_ObjektGuid_=null,
/** @description Optional! Follow the format : /api/v1/heizbetriebskosten?filter[BillingInformationGuid]=* */
// @DataMember(Name="filter[BillingInformationGuid]")
// @ApiMember(Description="Optional! Follow the format : /api/v1/heizbetriebskosten?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_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_BillingInformationGuid_)) $o['filter_BillingInformationGuid_'] = $this->filter_BillingInformationGuid_;
return empty($o) ? new class(){} : $o;
}
}
PHP GetHeizbetriebskostenList 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 HTTP/1.1 Host: stoetzer-servdesk.eras-online.de Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}