| POST | /api/4PSBC/ImportBedrijf |
|---|
<?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_Company 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 company in DigiOffice */
// @ApiMember(Description="ID of the company in DigiOffice", IsRequired=true)
/** @var string */
public string $DigiOfficeCompanyID='',
/** @description GlobalID (digiOfficeId) of the company in DigiOffice */
// @ApiMember(Description="GlobalID (digiOfficeId) of the company 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['DigiOfficeCompanyID'])) $this->DigiOfficeCompanyID = $o['DigiOfficeCompanyID'];
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->DigiOfficeCompanyID)) $o['DigiOfficeCompanyID'] = $this->DigiOfficeCompanyID;
if (isset($this->DigiOfficeGlobalID)) $o['DigiOfficeGlobalID'] = $this->DigiOfficeGlobalID;
return empty($o) ? new class(){} : $o;
}
}
class IDB_4PSBC_Response_Bedrijf 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_Company|null */
public ?Response_Company $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_Company', $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_Company', $this->Response);
return empty($o) ? new class(){} : $o;
}
}
class Data_Company implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $visitAddress=null,
/** @var string|null */
public ?string $visitAddress2=null,
/** @var string|null */
public ?string $vatRegistrationNo=null,
/** @var string|null */
public ?string $vendorNo=null,
/** @var string|null */
public ?string $customerNo=null,
/** @var string|null */
public ?string $eMail=null,
/** @var string|null */
public ?string $companyName4ps=null,
/** @var string|null */
public ?string $systemId=null,
/** @var string|null */
public ?string $digiOfficeId=null,
/** @var string|null */
public ?string $cocRegistrationNo=null,
/** @var string|null */
public ?string $cocLocationNo=null,
/** @var string|null */
public ?string $cocCity=null,
/** @var string|null */
public ?string $visitAddressCountryRegionId=null,
/** @var string|null */
public ?string $countryRegionId=null,
/** @var string|null */
public ?string $countryRegionCodeId=null,
/** @var string|null */
public ?string $mobilePhoneNo=null,
/** @var string|null */
public ?string $name=null,
/** @var string|null */
public ?string $name2=null,
/** @var string|null */
public ?string $visitAddressCity=null,
/** @var string|null */
public ?string $city=null,
/** @var string|null */
public ?string $address=null,
/** @var string|null */
public ?string $visitAddressPostCode=null,
/** @var string|null */
public ?string $postCode=null,
/** @var string|null */
public ?string $phoneNo=null,
/** @var string|null */
public ?string $phoneNo2=null,
/** @var string|null */
public ?string $homePage=null,
/** @var string|null */
public ?string $no=null,
/** @var string|null */
public ?string $companyId=null,
/** @var bool|null */
public ?bool $blocked=null,
/** @var string|null */
public ?string $nameAbbreviation=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['visitAddress'])) $this->visitAddress = $o['visitAddress'];
if (isset($o['visitAddress2'])) $this->visitAddress2 = $o['visitAddress2'];
if (isset($o['vatRegistrationNo'])) $this->vatRegistrationNo = $o['vatRegistrationNo'];
if (isset($o['vendorNo'])) $this->vendorNo = $o['vendorNo'];
if (isset($o['customerNo'])) $this->customerNo = $o['customerNo'];
if (isset($o['eMail'])) $this->eMail = $o['eMail'];
if (isset($o['companyName4ps'])) $this->companyName4ps = $o['companyName4ps'];
if (isset($o['systemId'])) $this->systemId = $o['systemId'];
if (isset($o['digiOfficeId'])) $this->digiOfficeId = $o['digiOfficeId'];
if (isset($o['cocRegistrationNo'])) $this->cocRegistrationNo = $o['cocRegistrationNo'];
if (isset($o['cocLocationNo'])) $this->cocLocationNo = $o['cocLocationNo'];
if (isset($o['cocCity'])) $this->cocCity = $o['cocCity'];
if (isset($o['visitAddressCountryRegionId'])) $this->visitAddressCountryRegionId = $o['visitAddressCountryRegionId'];
if (isset($o['countryRegionId'])) $this->countryRegionId = $o['countryRegionId'];
if (isset($o['countryRegionCodeId'])) $this->countryRegionCodeId = $o['countryRegionCodeId'];
if (isset($o['mobilePhoneNo'])) $this->mobilePhoneNo = $o['mobilePhoneNo'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['name2'])) $this->name2 = $o['name2'];
if (isset($o['visitAddressCity'])) $this->visitAddressCity = $o['visitAddressCity'];
if (isset($o['city'])) $this->city = $o['city'];
if (isset($o['address'])) $this->address = $o['address'];
if (isset($o['visitAddressPostCode'])) $this->visitAddressPostCode = $o['visitAddressPostCode'];
if (isset($o['postCode'])) $this->postCode = $o['postCode'];
if (isset($o['phoneNo'])) $this->phoneNo = $o['phoneNo'];
if (isset($o['phoneNo2'])) $this->phoneNo2 = $o['phoneNo2'];
if (isset($o['homePage'])) $this->homePage = $o['homePage'];
if (isset($o['no'])) $this->no = $o['no'];
if (isset($o['companyId'])) $this->companyId = $o['companyId'];
if (isset($o['blocked'])) $this->blocked = $o['blocked'];
if (isset($o['nameAbbreviation'])) $this->nameAbbreviation = $o['nameAbbreviation'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->visitAddress)) $o['visitAddress'] = $this->visitAddress;
if (isset($this->visitAddress2)) $o['visitAddress2'] = $this->visitAddress2;
if (isset($this->vatRegistrationNo)) $o['vatRegistrationNo'] = $this->vatRegistrationNo;
if (isset($this->vendorNo)) $o['vendorNo'] = $this->vendorNo;
if (isset($this->customerNo)) $o['customerNo'] = $this->customerNo;
if (isset($this->eMail)) $o['eMail'] = $this->eMail;
if (isset($this->companyName4ps)) $o['companyName4ps'] = $this->companyName4ps;
if (isset($this->systemId)) $o['systemId'] = $this->systemId;
if (isset($this->digiOfficeId)) $o['digiOfficeId'] = $this->digiOfficeId;
if (isset($this->cocRegistrationNo)) $o['cocRegistrationNo'] = $this->cocRegistrationNo;
if (isset($this->cocLocationNo)) $o['cocLocationNo'] = $this->cocLocationNo;
if (isset($this->cocCity)) $o['cocCity'] = $this->cocCity;
if (isset($this->visitAddressCountryRegionId)) $o['visitAddressCountryRegionId'] = $this->visitAddressCountryRegionId;
if (isset($this->countryRegionId)) $o['countryRegionId'] = $this->countryRegionId;
if (isset($this->countryRegionCodeId)) $o['countryRegionCodeId'] = $this->countryRegionCodeId;
if (isset($this->mobilePhoneNo)) $o['mobilePhoneNo'] = $this->mobilePhoneNo;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->name2)) $o['name2'] = $this->name2;
if (isset($this->visitAddressCity)) $o['visitAddressCity'] = $this->visitAddressCity;
if (isset($this->city)) $o['city'] = $this->city;
if (isset($this->address)) $o['address'] = $this->address;
if (isset($this->visitAddressPostCode)) $o['visitAddressPostCode'] = $this->visitAddressPostCode;
if (isset($this->postCode)) $o['postCode'] = $this->postCode;
if (isset($this->phoneNo)) $o['phoneNo'] = $this->phoneNo;
if (isset($this->phoneNo2)) $o['phoneNo2'] = $this->phoneNo2;
if (isset($this->homePage)) $o['homePage'] = $this->homePage;
if (isset($this->no)) $o['no'] = $this->no;
if (isset($this->companyId)) $o['companyId'] = $this->companyId;
if (isset($this->blocked)) $o['blocked'] = $this->blocked;
if (isset($this->nameAbbreviation)) $o['nameAbbreviation'] = $this->nameAbbreviation;
return empty($o) ? new class(){} : $o;
}
}
/** @description Import bedrijf record vanuit 4PS */
// @Api(Description="Import bedrijf record vanuit 4PS")
class IDB_4PSBC_Import_Bedrijf 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_Company|null */
public ?Data_Company $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_Company', $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_Company', $this->Data);
return empty($o) ? new class(){} : $o;
}
}
PHP IDB_4PSBC_Import_Bedrijf DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/4PSBC/ImportBedrijf HTTP/1.1
Host: test-dogw.klokgroep.nl
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<IDB_4PSBC_Import_Bedrijf xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DO.Synchronization.IDB_4PSBC.DTO">
<Data>
<address>String</address>
<blocked>false</blocked>
<city>String</city>
<cocCity>String</cocCity>
<cocLocationNo>String</cocLocationNo>
<cocRegistrationNo>String</cocRegistrationNo>
<companyId>00000000-0000-0000-0000-000000000000</companyId>
<companyName4ps>String</companyName4ps>
<countryRegionCodeId>String</countryRegionCodeId>
<countryRegionId>String</countryRegionId>
<customerNo>String</customerNo>
<digiOfficeId>00000000-0000-0000-0000-000000000000</digiOfficeId>
<eMail>String</eMail>
<homePage>String</homePage>
<mobilePhoneNo>String</mobilePhoneNo>
<name>String</name>
<name2>String</name2>
<nameAbbreviation>String</nameAbbreviation>
<no>String</no>
<phoneNo>String</phoneNo>
<phoneNo2>String</phoneNo2>
<postCode>String</postCode>
<systemId>00000000-0000-0000-0000-000000000000</systemId>
<vatRegistrationNo>String</vatRegistrationNo>
<vendorNo>String</vendorNo>
<visitAddress>String</visitAddress>
<visitAddress2>String</visitAddress2>
<visitAddressCity>String</visitAddressCity>
<visitAddressCountryRegionId>String</visitAddressCountryRegionId>
<visitAddressPostCode>String</visitAddressPostCode>
</Data>
<Header>
<Contains>String</Contains>
<Date>String</Date>
<MessageID>String</MessageID>
<Sender>String</Sender>
</Header>
</IDB_4PSBC_Import_Bedrijf>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<IDB_4PSBC_Response_Bedrijf xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DO.Synchronization.IDB_4PSBC.DTO">
<Header>
<Contains>String</Contains>
<Date>String</Date>
<MessageID>String</MessageID>
<Sender>String</Sender>
</Header>
<Response>
<DigiOfficeCompanyID>String</DigiOfficeCompanyID>
<DigiOfficeGlobalID>00000000-0000-0000-0000-000000000000</DigiOfficeGlobalID>
<Errors>String</Errors>
<Status>String</Status>
</Response>
</IDB_4PSBC_Response_Bedrijf>