| 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 .other suffix or ?format=other
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: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Pools":[{"PoolId":0,"PoolKey":"String","Site":"String","Method":"String","Icon":"String","Note":"String","ItemsJson":"String","Boxes":0,"Pages":0,"WeightLbs":0,"ThBoxes":0,"ThWeight":0,"Status":"String"}]}