| GET,OPTIONS | /v1/records/logistics/pools |
|---|
<?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 RecordsPoolDto implements JsonSerializable
{
public function __construct(
/** @var int */
public int $PoolId=0,
/** @var string|null */
public ?string $PoolKey=null,
/** @var string|null */
public ?string $Site=null,
/** @var string|null */
public ?string $Method=null,
/** @var string|null */
public ?string $Icon=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $ItemsJson=null,
/** @var int */
public int $Boxes=0,
/** @var int */
public int $Pages=0,
/** @var int */
public int $WeightLbs=0,
/** @var int */
public int $ThBoxes=0,
/** @var int */
public int $ThWeight=0,
/** @var string|null */
public ?string $Status=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PoolId'])) $this->PoolId = $o['PoolId'];
if (isset($o['PoolKey'])) $this->PoolKey = $o['PoolKey'];
if (isset($o['Site'])) $this->Site = $o['Site'];
if (isset($o['Method'])) $this->Method = $o['Method'];
if (isset($o['Icon'])) $this->Icon = $o['Icon'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['ItemsJson'])) $this->ItemsJson = $o['ItemsJson'];
if (isset($o['Boxes'])) $this->Boxes = $o['Boxes'];
if (isset($o['Pages'])) $this->Pages = $o['Pages'];
if (isset($o['WeightLbs'])) $this->WeightLbs = $o['WeightLbs'];
if (isset($o['ThBoxes'])) $this->ThBoxes = $o['ThBoxes'];
if (isset($o['ThWeight'])) $this->ThWeight = $o['ThWeight'];
if (isset($o['Status'])) $this->Status = $o['Status'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PoolId)) $o['PoolId'] = $this->PoolId;
if (isset($this->PoolKey)) $o['PoolKey'] = $this->PoolKey;
if (isset($this->Site)) $o['Site'] = $this->Site;
if (isset($this->Method)) $o['Method'] = $this->Method;
if (isset($this->Icon)) $o['Icon'] = $this->Icon;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->ItemsJson)) $o['ItemsJson'] = $this->ItemsJson;
if (isset($this->Boxes)) $o['Boxes'] = $this->Boxes;
if (isset($this->Pages)) $o['Pages'] = $this->Pages;
if (isset($this->WeightLbs)) $o['WeightLbs'] = $this->WeightLbs;
if (isset($this->ThBoxes)) $o['ThBoxes'] = $this->ThBoxes;
if (isset($this->ThWeight)) $o['ThWeight'] = $this->ThWeight;
if (isset($this->Status)) $o['Status'] = $this->Status;
return empty($o) ? new class(){} : $o;
}
}
class PoolsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<RecordsPoolDto>|null */
public ?array $Pools=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Pools'])) $this->Pools = JsonConverters::fromArray('RecordsPoolDto', $o['Pools']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Pools)) $o['Pools'] = JsonConverters::toArray('RecordsPoolDto', $this->Pools);
return empty($o) ? new class(){} : $o;
}
}
class PoolsRequest implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
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.
GET /v1/records/logistics/pools HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PoolsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Pools>
<RecordsPoolDto>
<Boxes>0</Boxes>
<Icon>String</Icon>
<ItemsJson>String</ItemsJson>
<Method>String</Method>
<Note>String</Note>
<Pages>0</Pages>
<PoolId>0</PoolId>
<PoolKey>String</PoolKey>
<Site>String</Site>
<Status>String</Status>
<ThBoxes>0</ThBoxes>
<ThWeight>0</ThWeight>
<WeightLbs>0</WeightLbs>
</RecordsPoolDto>
</Pools>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</PoolsResponse>