| POST | /api/4PSBC/ImportBouwnummer |
|---|
<?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 Header implements JsonSerializable
{
public function __construct(
/** @description Inhoud van het bericht */
// @ApiMember(Description="Inhoud van het bericht")
/** @var string|null */
public ?string $Contains=null,
/** @description Datum aanmaak bericht */
// @ApiMember(Description="Datum aanmaak bericht")
/** @var string|null */
public ?string $Date=null,
/** @description ID voor het bericht */
// @ApiMember(Description="ID voor het bericht")
/** @var string|null */
public ?string $MessageID=null,
/** @description Verzender van het bericht */
// @ApiMember(Description="Verzender van het bericht")
/** @var string|null */
public ?string $Sender=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Contains'])) $this->Contains = $o['Contains'];
if (isset($o['Date'])) $this->Date = $o['Date'];
if (isset($o['MessageID'])) $this->MessageID = $o['MessageID'];
if (isset($o['Sender'])) $this->Sender = $o['Sender'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Contains)) $o['Contains'] = $this->Contains;
if (isset($this->Date)) $o['Date'] = $this->Date;
if (isset($this->MessageID)) $o['MessageID'] = $this->MessageID;
if (isset($this->Sender)) $o['Sender'] = $this->Sender;
return empty($o) ? new class(){} : $o;
}
}
class Response_Bouwnummer implements JsonSerializable
{
public function __construct(
/** @description Reponse status (Ok/Error) */
// @ApiMember(Description="Reponse status (Ok/Error)", IsRequired=true)
/** @var string */
public string $Status='',
/** @description Errors summary */
// @ApiMember(Description="Errors summary")
/** @var string|null */
public ?string $Errors=null,
/** @description ID of the bouwnummer in DigiOffice */
// @ApiMember(Description="ID of the bouwnummer in DigiOffice", IsRequired=true)
/** @var string */
public string $DigiOfficeBouwnummerID='',
/** @description GlobalID (digiOfficeId) of the bouwnummer in DigiOffice */
// @ApiMember(Description="GlobalID (digiOfficeId) of the bouwnummer in DigiOffice", IsRequired=true)
/** @var string */
public string $DigiOfficeGlobalID=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Errors'])) $this->Errors = $o['Errors'];
if (isset($o['DigiOfficeBouwnummerID'])) $this->DigiOfficeBouwnummerID = $o['DigiOfficeBouwnummerID'];
if (isset($o['DigiOfficeGlobalID'])) $this->DigiOfficeGlobalID = $o['DigiOfficeGlobalID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Errors)) $o['Errors'] = $this->Errors;
if (isset($this->DigiOfficeBouwnummerID)) $o['DigiOfficeBouwnummerID'] = $this->DigiOfficeBouwnummerID;
if (isset($this->DigiOfficeGlobalID)) $o['DigiOfficeGlobalID'] = $this->DigiOfficeGlobalID;
return empty($o) ? new class(){} : $o;
}
}
class IDB_4PSBC_Response_Bouwnummer implements JsonSerializable
{
public function __construct(
/** @description Header of the response */
// @ApiMember(Description="Header of the response", IsRequired=true)
/** @var Header|null */
public ?Header $Header=null,
/** @description Response body */
// @ApiMember(Description="Response body", IsRequired=true)
/** @var Response_Bouwnummer|null */
public ?Response_Bouwnummer $Response=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Header'])) $this->Header = JsonConverters::from('Header', $o['Header']);
if (isset($o['Response'])) $this->Response = JsonConverters::from('Response_Bouwnummer', $o['Response']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Header)) $o['Header'] = JsonConverters::to('Header', $this->Header);
if (isset($this->Response)) $o['Response'] = JsonConverters::to('Response_Bouwnummer', $this->Response);
return empty($o) ? new class(){} : $o;
}
}
class Data_Bouwnummer implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $systemId=null,
/** @var string|null */
public ?string $digiOfficeId=null,
/** @var string */
public string $projectId='',
/** @var string|null */
public ?string $plotNo=null,
/** @var string|null */
public ?string $address=null,
/** @var string|null */
public ?string $address2=null,
/** @var string|null */
public ?string $postCode=null,
/** @var string|null */
public ?string $city=null,
/** @var string|null */
public ?string $countryRegionId=null,
/** @var string|null */
public ?string $systemModifiedBy=null,
/** @var string|null */
public ?string $companyName4ps=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['systemId'])) $this->systemId = $o['systemId'];
if (isset($o['digiOfficeId'])) $this->digiOfficeId = $o['digiOfficeId'];
if (isset($o['projectId'])) $this->projectId = $o['projectId'];
if (isset($o['plotNo'])) $this->plotNo = $o['plotNo'];
if (isset($o['address'])) $this->address = $o['address'];
if (isset($o['address2'])) $this->address2 = $o['address2'];
if (isset($o['postCode'])) $this->postCode = $o['postCode'];
if (isset($o['city'])) $this->city = $o['city'];
if (isset($o['countryRegionId'])) $this->countryRegionId = $o['countryRegionId'];
if (isset($o['systemModifiedBy'])) $this->systemModifiedBy = $o['systemModifiedBy'];
if (isset($o['companyName4ps'])) $this->companyName4ps = $o['companyName4ps'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->systemId)) $o['systemId'] = $this->systemId;
if (isset($this->digiOfficeId)) $o['digiOfficeId'] = $this->digiOfficeId;
if (isset($this->projectId)) $o['projectId'] = $this->projectId;
if (isset($this->plotNo)) $o['plotNo'] = $this->plotNo;
if (isset($this->address)) $o['address'] = $this->address;
if (isset($this->address2)) $o['address2'] = $this->address2;
if (isset($this->postCode)) $o['postCode'] = $this->postCode;
if (isset($this->city)) $o['city'] = $this->city;
if (isset($this->countryRegionId)) $o['countryRegionId'] = $this->countryRegionId;
if (isset($this->systemModifiedBy)) $o['systemModifiedBy'] = $this->systemModifiedBy;
if (isset($this->companyName4ps)) $o['companyName4ps'] = $this->companyName4ps;
return empty($o) ? new class(){} : $o;
}
}
/** @description Import bouwnummer record vanuit 4PS */
// @Api(Description="Import bouwnummer record vanuit 4PS")
class IDB_4PSBC_Import_Bouwnummer implements JsonSerializable
{
public function __construct(
/** @description Message header */
// @ApiMember(Description="Message header", IsRequired=true)
/** @var Header|null */
public ?Header $Header=null,
/** @description Message data */
// @ApiMember(Description="Message data", IsRequired=true)
/** @var Data_Bouwnummer|null */
public ?Data_Bouwnummer $Data=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Header'])) $this->Header = JsonConverters::from('Header', $o['Header']);
if (isset($o['Data'])) $this->Data = JsonConverters::from('Data_Bouwnummer', $o['Data']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Header)) $o['Header'] = JsonConverters::to('Header', $this->Header);
if (isset($this->Data)) $o['Data'] = JsonConverters::to('Data_Bouwnummer', $this->Data);
return empty($o) ? new class(){} : $o;
}
}
PHP IDB_4PSBC_Import_Bouwnummer 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/4PSBC/ImportBouwnummer HTTP/1.1
Host: test-do-services.klokgroep.nl
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Header":{"Contains":"String","Date":"String","MessageID":"String","Sender":"String"},"Data":{"systemId":"00000000-0000-0000-0000-000000000000","digiOfficeId":"00000000-0000-0000-0000-000000000000","projectId":"00000000-0000-0000-0000-000000000000","plotNo":"String","address":"String","address2":"String","postCode":"String","city":"String","countryRegionId":"String","systemModifiedBy":"String","companyName4ps":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Header":{"Contains":"String","Date":"String","MessageID":"String","Sender":"String"},"Response":{"Status":"String","Errors":"String","DigiOfficeBouwnummerID":"String","DigiOfficeGlobalID":"00000000-0000-0000-0000-000000000000"}}