DigiOffice Gateway Web Services

<back to all web services

EntityQuicklookup

Requires Authentication
<?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 QuickAddOption implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $EntityType=null
    ) {
    }

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

class QuickLookupResponse implements IBaseQuickLookupResponse, JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $NumberOfAllRecords=0,
        /** @var array<SerializableKeyValuePair<string,string>>|null */
        public ?array $Values=null,
        /** @var array<QuickAddOption>|null */
        public ?array $QuickAddOptions=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['NumberOfAllRecords'])) $this->NumberOfAllRecords = $o['NumberOfAllRecords'];
        if (isset($o['Values'])) $this->Values = JsonConverters::fromArray('SerializableKeyValuePair<String,String>', $o['Values']);
        if (isset($o['QuickAddOptions'])) $this->QuickAddOptions = JsonConverters::fromArray('QuickAddOption', $o['QuickAddOptions']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->NumberOfAllRecords)) $o['NumberOfAllRecords'] = $this->NumberOfAllRecords;
        if (isset($this->Values)) $o['Values'] = JsonConverters::toArray('SerializableKeyValuePair<String,String>', $this->Values);
        if (isset($this->QuickAddOptions)) $o['QuickAddOptions'] = JsonConverters::toArray('QuickAddOption', $this->QuickAddOptions);
        return empty($o) ? new class(){} : $o;
    }
}

class EntityQuicklookup implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $LookupValue=null
    ) {
    }

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

PHP EntityQuicklookup DTOs

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

HTTP + CSV

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

POST /csv/reply/EntityQuicklookup HTTP/1.1 
Host: test-dogw.klokgroep.nl 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Name":"String","LookupValue":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"NumberOfAllRecords":0,"Values":[{}],"QuickAddOptions":[{"Name":"String","EntityType":"String"}]}