| GET,OPTIONS | /v1/records/logistics/pickups |
|---|
<?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 RecordsPickupDto implements JsonSerializable
{
public function __construct(
/** @var int */
public int $PickupId=0,
/** @var string|null */
public ?string $PickupKey=null,
/** @var string|null */
public ?string $VendorName=null,
/** @var string|null */
public ?string $VendorCert=null,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $WfLabel=null,
/** @var string|null */
public ?string $RunLabel=null,
/** @var string|null */
public ?string $ManifestJson=null,
/** @var string|null */
public ?string $QuoteJson=null,
/** @var string|null */
public ?string $WindowLabel=null,
/** @var string|null */
public ?string $VendorCertRef=null,
/** @var string|null */
public ?string $LogJson=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PickupId'])) $this->PickupId = $o['PickupId'];
if (isset($o['PickupKey'])) $this->PickupKey = $o['PickupKey'];
if (isset($o['VendorName'])) $this->VendorName = $o['VendorName'];
if (isset($o['VendorCert'])) $this->VendorCert = $o['VendorCert'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['WfLabel'])) $this->WfLabel = $o['WfLabel'];
if (isset($o['RunLabel'])) $this->RunLabel = $o['RunLabel'];
if (isset($o['ManifestJson'])) $this->ManifestJson = $o['ManifestJson'];
if (isset($o['QuoteJson'])) $this->QuoteJson = $o['QuoteJson'];
if (isset($o['WindowLabel'])) $this->WindowLabel = $o['WindowLabel'];
if (isset($o['VendorCertRef'])) $this->VendorCertRef = $o['VendorCertRef'];
if (isset($o['LogJson'])) $this->LogJson = $o['LogJson'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PickupId)) $o['PickupId'] = $this->PickupId;
if (isset($this->PickupKey)) $o['PickupKey'] = $this->PickupKey;
if (isset($this->VendorName)) $o['VendorName'] = $this->VendorName;
if (isset($this->VendorCert)) $o['VendorCert'] = $this->VendorCert;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->WfLabel)) $o['WfLabel'] = $this->WfLabel;
if (isset($this->RunLabel)) $o['RunLabel'] = $this->RunLabel;
if (isset($this->ManifestJson)) $o['ManifestJson'] = $this->ManifestJson;
if (isset($this->QuoteJson)) $o['QuoteJson'] = $this->QuoteJson;
if (isset($this->WindowLabel)) $o['WindowLabel'] = $this->WindowLabel;
if (isset($this->VendorCertRef)) $o['VendorCertRef'] = $this->VendorCertRef;
if (isset($this->LogJson)) $o['LogJson'] = $this->LogJson;
return empty($o) ? new class(){} : $o;
}
}
class PickupsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<RecordsPickupDto>|null */
public ?array $Pickups=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Pickups'])) $this->Pickups = JsonConverters::fromArray('RecordsPickupDto', $o['Pickups']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Pickups)) $o['Pickups'] = JsonConverters::toArray('RecordsPickupDto', $this->Pickups);
return empty($o) ? new class(){} : $o;
}
}
class PickupsRequest 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 .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.
GET /v1/records/logistics/pickups HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Pickups":[{"PickupId":0,"PickupKey":"String","VendorName":"String","VendorCert":"String","Status":"String","WfLabel":"String","RunLabel":"String","ManifestJson":"String","QuoteJson":"String","WindowLabel":"String","VendorCertRef":"String","LogJson":"String"}]}