Tax Filing Service

<back to all web services

GetDefinitionKeysAsync

AsyncUmsatzsteuerKeysReturnBuilder

An asynchronous service to retrieve keys for the identification of VAT properties.

Requires Authentication
The following routes are available for this service:
GET/GetDefinitionKeysAsyncAn asynchronous service to retrieve keys for the identification of VAT properties.
<?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 VatType : string
{
    case UStVA = 'UStVA';
    case UStDV = 'UStDV';
    case UStSV = 'UStSV';
    case USt = 'USt';
    case ZM = 'ZM';
}

/** @description Create a VAT return from a Return Builder definition. Use the retrieved values as keys for the dictionary of properties that Return Builder provides. */
// @Api(Description="Create a VAT return from a Return Builder definition.\n Use the retrieved values as keys for the dictionary of properties that Return Builder provides.")
class GetDefinitionKeysBase implements IGet, JsonSerializable
{
    public function __construct(
        /** @description The year of the assessment (Veranlagungsjahr). */
        // @ApiMember(Description="The year of the assessment (Veranlagungsjahr).")
        /** @var int */
        public int $year=0,

        /** @description The type of VAT return. */
        // @ApiMember(Description="The type of VAT return.")
        /** @var VatType|null */
        public ?VatType $vatType=null
    ) {
    }

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

/** @description An asynchronous service to retrieve keys for the identification of VAT properties. */
// @Api(Description="An asynchronous service to retrieve keys for the identification of VAT properties.")
class GetDefinitionKeysAsync extends GetDefinitionKeysBase implements JsonSerializable
{
    /**
     * @param int $year
     * @param VatType|null $vatType
     */
    public function __construct(
        int $year=0,
        ?VatType $vatType=null
    ) {
        parent::__construct($year,$vatType);
    }

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

PHP GetDefinitionKeysAsync DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /GetDefinitionKeysAsync HTTP/1.1 
Host: taxfiling.pwc.de 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[{"name":"String","description":"String","type":"String","mandatory":"String"}]