Server

<back to all web services

GetNebenkostenList

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


enum NebenkostenTargetAllocation : string
{
    case Null = 'Null';
    case AlleNutzer = 'AlleNutzer';
    case ZugeordneteNutzer = 'ZugeordneteNutzer';
    case ZugeordneteNutzeinheiten = 'ZugeordneteNutzeinheiten';
    case ZugeordneteNutzerDiff = 'ZugeordneteNutzerDiff';
    case ZugeordneteNutzeinheitenDiff = 'ZugeordneteNutzeinheitenDiff';
}

enum NebenkostenTargetAllocationIn : string
{
    case Nebenkosten = 'Nebenkosten';
    case Heizkosten = 'Heizkosten';
    case Warmwasserkosten = 'Warmwasserkosten';
}

// @DataContract
class NebenkostenNutzeinheit implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var float|null */
        public ?float $relativeAmount=null,

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

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

        // @DataMember
        /** @var string */
        public string $nutzeinheitGuid=''
    ) {
    }

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

// @DataContract
class NebenkostenNutzer implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var float|null */
        public ?float $relativeAmount=null,

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

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

        // @DataMember
        /** @var string */
        public string $nutzerGuid=''
    ) {
    }

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

// @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 Nebenkosten implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var string */
        public string $guid='',

        // @DataMember
        /** @var int */
        public int $number=0,

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

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

        // @DataMember
        /** @var NebenkostenTargetAllocation|null */
        public ?NebenkostenTargetAllocation $targetAllocation=null,

        // @DataMember
        /** @var NebenkostenTargetAllocationIn|null */
        public ?NebenkostenTargetAllocationIn $targetAllocationIn=null,

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

        /** @description Freitext */
        // @DataMember
        // @ApiMember(Description="Freitext")
        /** @var string|null */
        public ?string $kostenart=null,

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

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

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

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

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

        /** @description Freitext */
        // @DataMember
        // @ApiMember(Description="Freitext")
        /** @var string|null */
        public ?string $kostenartUnit=null,

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

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

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

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

        // @DataMember
        /** @var array<NebenkostenNutzeinheit>|null */
        public ?array $nebenkostenNutzeinheiten=null,

        // @DataMember
        /** @var array<NebenkostenNutzer>|null */
        public ?array $nebenkostenNutzer=null,

        // @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['number'])) $this->number = $o['number'];
        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['targetAllocation'])) $this->targetAllocation = JsonConverters::from('NebenkostenTargetAllocation', $o['targetAllocation']);
        if (isset($o['targetAllocationIn'])) $this->targetAllocationIn = JsonConverters::from('NebenkostenTargetAllocationIn', $o['targetAllocationIn']);
        if (isset($o['nebenkostenKind'])) $this->nebenkostenKind = $o['nebenkostenKind'];
        if (isset($o['kostenart'])) $this->kostenart = $o['kostenart'];
        if (isset($o['brutto'])) $this->brutto = $o['brutto'];
        if (isset($o['bruttoLastYear'])) $this->bruttoLastYear = $o['bruttoLastYear'];
        if (isset($o['salesTax'])) $this->salesTax = $o['salesTax'];
        if (isset($o['haushaltsnahediensteLabel'])) $this->haushaltsnahediensteLabel = $o['haushaltsnahediensteLabel'];
        if (isset($o['haushaltsnahediensteBrutto'])) $this->haushaltsnahediensteBrutto = $o['haushaltsnahediensteBrutto'];
        if (isset($o['kostenartUnit'])) $this->kostenartUnit = $o['kostenartUnit'];
        if (isset($o['reduzierungsartType'])) $this->reduzierungsartType = $o['reduzierungsartType'];
        if (isset($o['comment'])) $this->comment = $o['comment'];
        if (isset($o['isDeleted'])) $this->isDeleted = $o['isDeleted'];
        if (isset($o['isCreatedByApp'])) $this->isCreatedByApp = $o['isCreatedByApp'];
        if (isset($o['nebenkostenNutzeinheiten'])) $this->nebenkostenNutzeinheiten = JsonConverters::fromArray('NebenkostenNutzeinheit', $o['nebenkostenNutzeinheiten']);
        if (isset($o['nebenkostenNutzer'])) $this->nebenkostenNutzer = JsonConverters::fromArray('NebenkostenNutzer', $o['nebenkostenNutzer']);
        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->number)) $o['number'] = $this->number;
        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->targetAllocation)) $o['targetAllocation'] = JsonConverters::to('NebenkostenTargetAllocation', $this->targetAllocation);
        if (isset($this->targetAllocationIn)) $o['targetAllocationIn'] = JsonConverters::to('NebenkostenTargetAllocationIn', $this->targetAllocationIn);
        if (isset($this->nebenkostenKind)) $o['nebenkostenKind'] = $this->nebenkostenKind;
        if (isset($this->kostenart)) $o['kostenart'] = $this->kostenart;
        if (isset($this->brutto)) $o['brutto'] = $this->brutto;
        if (isset($this->bruttoLastYear)) $o['bruttoLastYear'] = $this->bruttoLastYear;
        if (isset($this->salesTax)) $o['salesTax'] = $this->salesTax;
        if (isset($this->haushaltsnahediensteLabel)) $o['haushaltsnahediensteLabel'] = $this->haushaltsnahediensteLabel;
        if (isset($this->haushaltsnahediensteBrutto)) $o['haushaltsnahediensteBrutto'] = $this->haushaltsnahediensteBrutto;
        if (isset($this->kostenartUnit)) $o['kostenartUnit'] = $this->kostenartUnit;
        if (isset($this->reduzierungsartType)) $o['reduzierungsartType'] = $this->reduzierungsartType;
        if (isset($this->comment)) $o['comment'] = $this->comment;
        if (isset($this->isDeleted)) $o['isDeleted'] = $this->isDeleted;
        if (isset($this->isCreatedByApp)) $o['isCreatedByApp'] = $this->isCreatedByApp;
        if (isset($this->nebenkostenNutzeinheiten)) $o['nebenkostenNutzeinheiten'] = JsonConverters::toArray('NebenkostenNutzeinheit', $this->nebenkostenNutzeinheiten);
        if (isset($this->nebenkostenNutzer)) $o['nebenkostenNutzer'] = JsonConverters::toArray('NebenkostenNutzer', $this->nebenkostenNutzer);
        if (isset($this->billingInformation)) $o['billingInformation'] = JsonConverters::to('BillingInformation', $this->billingInformation);
        return empty($o) ? new class(){} : $o;
    }
}

class GetNebenkostenListResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<Nebenkosten>|null */
        public ?array $nebenkostenList=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

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

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

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

        /** @description Optional! Follow the format : /api/v1/nebenkosten?filter[BillingInformationGuid]=* */
        // @DataMember(Name="filter[BillingInformationGuid]")
        // @ApiMember(Description="Optional! Follow the format : /api/v1/nebenkosten?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 GetNebenkostenList DTOs

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

HTTP + OTHER

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

GET /api/v1/nebenkosten HTTP/1.1 
Host: imm-con-gmbh-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"}}}