Trendsic Platform Service

<back to all web services

PickupsRequest

Requires Authentication
The following routes are available for this service:
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;
    }
}

PHP PickupsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PickupsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Pickups>
    <RecordsPickupDto>
      <LogJson>String</LogJson>
      <ManifestJson>String</ManifestJson>
      <PickupId>0</PickupId>
      <PickupKey>String</PickupKey>
      <QuoteJson>String</QuoteJson>
      <RunLabel>String</RunLabel>
      <Status>String</Status>
      <VendorCert>String</VendorCert>
      <VendorCertRef>String</VendorCertRef>
      <VendorName>String</VendorName>
      <WfLabel>String</WfLabel>
      <WindowLabel>String</WindowLabel>
    </RecordsPickupDto>
  </Pickups>
  <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>
</PickupsResponse>