| DELETE,OPTIONS | /v1/worker/dispatch/od/{Code}/items/{TagCode} |
|---|
<?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 CourierVanView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $State=null,
/** @var DateTime|null */
public ?DateTime $LeaveByUtc=null,
/** @var string|null */
public ?string $LeaveByText=null,
/** @var int|null */
public ?int $SlackMin=null,
/** @var int */
public int $InVan=0,
/** @var int */
public int $Committed=0,
/** @var float|null */
public ?float $Cap=null,
/** @var string|null */
public ?string $CapUnit=null,
/** @var string|null */
public ?string $VehicleUnit=null,
/** @var string|null */
public ?string $CriticalCode=null,
/** @var int */
public int $DriveMin=0,
/** @var string|null */
public ?string $FacilityName=null,
/** @var string|null */
public ?string $SendNote=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['LeaveByUtc'])) $this->LeaveByUtc = JsonConverters::from('DateTime', $o['LeaveByUtc']);
if (isset($o['LeaveByText'])) $this->LeaveByText = $o['LeaveByText'];
if (isset($o['SlackMin'])) $this->SlackMin = $o['SlackMin'];
if (isset($o['InVan'])) $this->InVan = $o['InVan'];
if (isset($o['Committed'])) $this->Committed = $o['Committed'];
if (isset($o['Cap'])) $this->Cap = $o['Cap'];
if (isset($o['CapUnit'])) $this->CapUnit = $o['CapUnit'];
if (isset($o['VehicleUnit'])) $this->VehicleUnit = $o['VehicleUnit'];
if (isset($o['CriticalCode'])) $this->CriticalCode = $o['CriticalCode'];
if (isset($o['DriveMin'])) $this->DriveMin = $o['DriveMin'];
if (isset($o['FacilityName'])) $this->FacilityName = $o['FacilityName'];
if (isset($o['SendNote'])) $this->SendNote = $o['SendNote'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->LeaveByUtc)) $o['LeaveByUtc'] = JsonConverters::to('DateTime', $this->LeaveByUtc);
if (isset($this->LeaveByText)) $o['LeaveByText'] = $this->LeaveByText;
if (isset($this->SlackMin)) $o['SlackMin'] = $this->SlackMin;
if (isset($this->InVan)) $o['InVan'] = $this->InVan;
if (isset($this->Committed)) $o['Committed'] = $this->Committed;
if (isset($this->Cap)) $o['Cap'] = $this->Cap;
if (isset($this->CapUnit)) $o['CapUnit'] = $this->CapUnit;
if (isset($this->VehicleUnit)) $o['VehicleUnit'] = $this->VehicleUnit;
if (isset($this->CriticalCode)) $o['CriticalCode'] = $this->CriticalCode;
if (isset($this->DriveMin)) $o['DriveMin'] = $this->DriveMin;
if (isset($this->FacilityName)) $o['FacilityName'] = $this->FacilityName;
if (isset($this->SendNote)) $o['SendNote'] = $this->SendNote;
return empty($o) ? new class(){} : $o;
}
}
class CourierItemView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $CourierItemID=0,
/** @var int */
public int $DispatchOdRequestID=0,
/** @var int */
public int $Seq=0,
/** @var string|null */
public ?string $TagCode=null,
/** @var string|null */
public ?string $Custody=null,
/** @var bool|null */
public ?bool $IsOpen=null,
/** @var bool|null */
public ?bool $IsMissing=null,
/** @var string|null */
public ?string $MissingReason=null,
/** @var bool|null */
public ?bool $IsManual=null,
/** @var bool|null */
public ?bool $ReTagFlag=null,
/** @var bool|null */
public ?bool $Scanned=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CourierItemID'])) $this->CourierItemID = $o['CourierItemID'];
if (isset($o['DispatchOdRequestID'])) $this->DispatchOdRequestID = $o['DispatchOdRequestID'];
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['TagCode'])) $this->TagCode = $o['TagCode'];
if (isset($o['Custody'])) $this->Custody = $o['Custody'];
if (isset($o['IsOpen'])) $this->IsOpen = $o['IsOpen'];
if (isset($o['IsMissing'])) $this->IsMissing = $o['IsMissing'];
if (isset($o['MissingReason'])) $this->MissingReason = $o['MissingReason'];
if (isset($o['IsManual'])) $this->IsManual = $o['IsManual'];
if (isset($o['ReTagFlag'])) $this->ReTagFlag = $o['ReTagFlag'];
if (isset($o['Scanned'])) $this->Scanned = $o['Scanned'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CourierItemID)) $o['CourierItemID'] = $this->CourierItemID;
if (isset($this->DispatchOdRequestID)) $o['DispatchOdRequestID'] = $this->DispatchOdRequestID;
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->TagCode)) $o['TagCode'] = $this->TagCode;
if (isset($this->Custody)) $o['Custody'] = $this->Custody;
if (isset($this->IsOpen)) $o['IsOpen'] = $this->IsOpen;
if (isset($this->IsMissing)) $o['IsMissing'] = $this->IsMissing;
if (isset($this->MissingReason)) $o['MissingReason'] = $this->MissingReason;
if (isset($this->IsManual)) $o['IsManual'] = $this->IsManual;
if (isset($this->ReTagFlag)) $o['ReTagFlag'] = $this->ReTagFlag;
if (isset($this->Scanned)) $o['Scanned'] = $this->Scanned;
return empty($o) ? new class(){} : $o;
}
}
class CourierDriverOrder implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $CourierStep=null,
/** @var string|null */
public ?string $RouteShape=null,
/** @var string|null */
public ?string $ProfileName=null,
/** @var string|null */
public ?string $UnitOne=null,
/** @var string|null */
public ?string $UnitMany=null,
/** @var string|null */
public ?string $FacilityNoun=null,
/** @var string|null */
public ?string $FacilityName=null,
/** @var string|null */
public ?string $LevelName=null,
/** @var DateTime|null */
public ?DateTime $DueUtc=null,
/** @var string|null */
public ?string $DueText=null,
/** @var int */
public int $Units=0,
/** @var int|null */
public ?int $UnitsFound=null,
/** @var string|null */
public ?string $Area=null,
/** @var int|null */
public ?int $Minutes=null,
/** @var string|null */
public ?string $Address=null,
/** @var string|null */
public ?string $Unit=null,
/** @var string|null */
public ?string $City=null,
/** @var float|null */
public ?float $Lat=null,
/** @var float|null */
public ?float $Lng=null,
/** @var string|null */
public ?string $CustomerName=null,
/** @var string|null */
public ?string $CustomerPhone=null,
/** @var string|null */
public ?string $Handoff=null,
/** @var string|null */
public ?string $GateCode=null,
/** @var string|null */
public ?string $Instructions=null,
/** @var string|null */
public ?string $DropoffAddress=null,
/** @var string|null */
public ?string $DropoffContactName=null,
/** @var float|null */
public ?float $DropLat=null,
/** @var float|null */
public ?float $DropLng=null,
/** @var DateTime|null */
public ?DateTime $ArrivedUtc=null,
/** @var array<CourierItemView>|null */
public ?array $Tags=null,
/** @var array<string,string>|null */
public ?array $Proof=null,
/** @var array<string,int>|null */
public ?array $Photos=null,
/** @var array<string>|null */
public ?array $Needs=null,
/** @var int */
public int $MissedWaitMin=0,
/** @var bool|null */
public ?bool $MissedRequireContact=null,
/** @var bool|null */
public ?bool $MissedRequirePhoto=null,
/** @var float */
public float $MissedFee=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['CourierStep'])) $this->CourierStep = $o['CourierStep'];
if (isset($o['RouteShape'])) $this->RouteShape = $o['RouteShape'];
if (isset($o['ProfileName'])) $this->ProfileName = $o['ProfileName'];
if (isset($o['UnitOne'])) $this->UnitOne = $o['UnitOne'];
if (isset($o['UnitMany'])) $this->UnitMany = $o['UnitMany'];
if (isset($o['FacilityNoun'])) $this->FacilityNoun = $o['FacilityNoun'];
if (isset($o['FacilityName'])) $this->FacilityName = $o['FacilityName'];
if (isset($o['LevelName'])) $this->LevelName = $o['LevelName'];
if (isset($o['DueUtc'])) $this->DueUtc = JsonConverters::from('DateTime', $o['DueUtc']);
if (isset($o['DueText'])) $this->DueText = $o['DueText'];
if (isset($o['Units'])) $this->Units = $o['Units'];
if (isset($o['UnitsFound'])) $this->UnitsFound = $o['UnitsFound'];
if (isset($o['Area'])) $this->Area = $o['Area'];
if (isset($o['Minutes'])) $this->Minutes = $o['Minutes'];
if (isset($o['Address'])) $this->Address = $o['Address'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['Lat'])) $this->Lat = $o['Lat'];
if (isset($o['Lng'])) $this->Lng = $o['Lng'];
if (isset($o['CustomerName'])) $this->CustomerName = $o['CustomerName'];
if (isset($o['CustomerPhone'])) $this->CustomerPhone = $o['CustomerPhone'];
if (isset($o['Handoff'])) $this->Handoff = $o['Handoff'];
if (isset($o['GateCode'])) $this->GateCode = $o['GateCode'];
if (isset($o['Instructions'])) $this->Instructions = $o['Instructions'];
if (isset($o['DropoffAddress'])) $this->DropoffAddress = $o['DropoffAddress'];
if (isset($o['DropoffContactName'])) $this->DropoffContactName = $o['DropoffContactName'];
if (isset($o['DropLat'])) $this->DropLat = $o['DropLat'];
if (isset($o['DropLng'])) $this->DropLng = $o['DropLng'];
if (isset($o['ArrivedUtc'])) $this->ArrivedUtc = JsonConverters::from('DateTime', $o['ArrivedUtc']);
if (isset($o['Tags'])) $this->Tags = JsonConverters::fromArray('CourierItemView', $o['Tags']);
if (isset($o['Proof'])) $this->Proof = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Proof']);
if (isset($o['Photos'])) $this->Photos = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','int']), $o['Photos']);
if (isset($o['Needs'])) $this->Needs = JsonConverters::fromArray('string', $o['Needs']);
if (isset($o['MissedWaitMin'])) $this->MissedWaitMin = $o['MissedWaitMin'];
if (isset($o['MissedRequireContact'])) $this->MissedRequireContact = $o['MissedRequireContact'];
if (isset($o['MissedRequirePhoto'])) $this->MissedRequirePhoto = $o['MissedRequirePhoto'];
if (isset($o['MissedFee'])) $this->MissedFee = $o['MissedFee'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->CourierStep)) $o['CourierStep'] = $this->CourierStep;
if (isset($this->RouteShape)) $o['RouteShape'] = $this->RouteShape;
if (isset($this->ProfileName)) $o['ProfileName'] = $this->ProfileName;
if (isset($this->UnitOne)) $o['UnitOne'] = $this->UnitOne;
if (isset($this->UnitMany)) $o['UnitMany'] = $this->UnitMany;
if (isset($this->FacilityNoun)) $o['FacilityNoun'] = $this->FacilityNoun;
if (isset($this->FacilityName)) $o['FacilityName'] = $this->FacilityName;
if (isset($this->LevelName)) $o['LevelName'] = $this->LevelName;
if (isset($this->DueUtc)) $o['DueUtc'] = JsonConverters::to('DateTime', $this->DueUtc);
if (isset($this->DueText)) $o['DueText'] = $this->DueText;
if (isset($this->Units)) $o['Units'] = $this->Units;
if (isset($this->UnitsFound)) $o['UnitsFound'] = $this->UnitsFound;
if (isset($this->Area)) $o['Area'] = $this->Area;
if (isset($this->Minutes)) $o['Minutes'] = $this->Minutes;
if (isset($this->Address)) $o['Address'] = $this->Address;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->Lat)) $o['Lat'] = $this->Lat;
if (isset($this->Lng)) $o['Lng'] = $this->Lng;
if (isset($this->CustomerName)) $o['CustomerName'] = $this->CustomerName;
if (isset($this->CustomerPhone)) $o['CustomerPhone'] = $this->CustomerPhone;
if (isset($this->Handoff)) $o['Handoff'] = $this->Handoff;
if (isset($this->GateCode)) $o['GateCode'] = $this->GateCode;
if (isset($this->Instructions)) $o['Instructions'] = $this->Instructions;
if (isset($this->DropoffAddress)) $o['DropoffAddress'] = $this->DropoffAddress;
if (isset($this->DropoffContactName)) $o['DropoffContactName'] = $this->DropoffContactName;
if (isset($this->DropLat)) $o['DropLat'] = $this->DropLat;
if (isset($this->DropLng)) $o['DropLng'] = $this->DropLng;
if (isset($this->ArrivedUtc)) $o['ArrivedUtc'] = JsonConverters::to('DateTime', $this->ArrivedUtc);
if (isset($this->Tags)) $o['Tags'] = JsonConverters::toArray('CourierItemView', $this->Tags);
if (isset($this->Proof)) $o['Proof'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Proof);
if (isset($this->Photos)) $o['Photos'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','int']), $this->Photos);
if (isset($this->Needs)) $o['Needs'] = JsonConverters::toArray('string', $this->Needs);
if (isset($this->MissedWaitMin)) $o['MissedWaitMin'] = $this->MissedWaitMin;
if (isset($this->MissedRequireContact)) $o['MissedRequireContact'] = $this->MissedRequireContact;
if (isset($this->MissedRequirePhoto)) $o['MissedRequirePhoto'] = $this->MissedRequirePhoto;
if (isset($this->MissedFee)) $o['MissedFee'] = $this->MissedFee;
return empty($o) ? new class(){} : $o;
}
}
class CourierStopView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Sequence=0,
/** @var string|null */
public ?string $Status=null,
/** @var int */
public int $DispatchOdRequestID=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $CourierStep=null,
/** @var string|null */
public ?string $Address=null,
/** @var string|null */
public ?string $Unit=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $Zip=null,
/** @var float|null */
public ?float $Lat=null,
/** @var float|null */
public ?float $Lng=null,
/** @var string|null */
public ?string $CustomerName=null,
/** @var string|null */
public ?string $CustomerPhone=null,
/** @var string|null */
public ?string $Handoff=null,
/** @var string|null */
public ?string $GateCode=null,
/** @var string|null */
public ?string $Instructions=null,
/** @var int */
public int $Units=0,
/** @var string|null */
public ?string $DueText=null,
/** @var string|null */
public ?string $Note=null,
/** @var array<string>|null */
public ?array $Needs=null,
/** @var array<CourierItemView>|null */
public ?array $Items=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Sequence'])) $this->Sequence = $o['Sequence'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['DispatchOdRequestID'])) $this->DispatchOdRequestID = $o['DispatchOdRequestID'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['CourierStep'])) $this->CourierStep = $o['CourierStep'];
if (isset($o['Address'])) $this->Address = $o['Address'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['Zip'])) $this->Zip = $o['Zip'];
if (isset($o['Lat'])) $this->Lat = $o['Lat'];
if (isset($o['Lng'])) $this->Lng = $o['Lng'];
if (isset($o['CustomerName'])) $this->CustomerName = $o['CustomerName'];
if (isset($o['CustomerPhone'])) $this->CustomerPhone = $o['CustomerPhone'];
if (isset($o['Handoff'])) $this->Handoff = $o['Handoff'];
if (isset($o['GateCode'])) $this->GateCode = $o['GateCode'];
if (isset($o['Instructions'])) $this->Instructions = $o['Instructions'];
if (isset($o['Units'])) $this->Units = $o['Units'];
if (isset($o['DueText'])) $this->DueText = $o['DueText'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Needs'])) $this->Needs = JsonConverters::fromArray('string', $o['Needs']);
if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('CourierItemView', $o['Items']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Sequence)) $o['Sequence'] = $this->Sequence;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->DispatchOdRequestID)) $o['DispatchOdRequestID'] = $this->DispatchOdRequestID;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->CourierStep)) $o['CourierStep'] = $this->CourierStep;
if (isset($this->Address)) $o['Address'] = $this->Address;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->Zip)) $o['Zip'] = $this->Zip;
if (isset($this->Lat)) $o['Lat'] = $this->Lat;
if (isset($this->Lng)) $o['Lng'] = $this->Lng;
if (isset($this->CustomerName)) $o['CustomerName'] = $this->CustomerName;
if (isset($this->CustomerPhone)) $o['CustomerPhone'] = $this->CustomerPhone;
if (isset($this->Handoff)) $o['Handoff'] = $this->Handoff;
if (isset($this->GateCode)) $o['GateCode'] = $this->GateCode;
if (isset($this->Instructions)) $o['Instructions'] = $this->Instructions;
if (isset($this->Units)) $o['Units'] = $this->Units;
if (isset($this->DueText)) $o['DueText'] = $this->DueText;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Needs)) $o['Needs'] = JsonConverters::toArray('string', $this->Needs);
if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('CourierItemView', $this->Items);
return empty($o) ? new class(){} : $o;
}
}
class CourierRunView implements JsonSerializable
{
public function __construct(
/** @var int */
public int $CourierRunID=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Status=null,
/** @var int */
public int $CourierProfileId=0,
/** @var string|null */
public ?string $ProfileName=null,
/** @var int */
public int $CourierFacilityId=0,
/** @var string|null */
public ?string $FacilityName=null,
/** @var string|null */
public ?string $FacilityAddress=null,
/** @var int|null */
public ?int $DriverContactId=null,
/** @var string|null */
public ?string $DriverName=null,
/** @var int|null */
public ?int $EquipmentID=null,
/** @var string|null */
public ?string $VehicleUnit=null,
/** @var string|null */
public ?string $UnitOne=null,
/** @var string|null */
public ?string $UnitMany=null,
/** @var int */
public int $Units=0,
/** @var int */
public int $StopCount=0,
/** @var int */
public int $StopsDone=0,
/** @var float|null */
public ?float $Pay=null,
/** @var DateTime|null */
public ?DateTime $BuiltUtc=null,
/** @var DateTime|null */
public ?DateTime $StartedUtc=null,
/** @var DateTime|null */
public ?DateTime $CompletedUtc=null,
/** @var int */
public int $ToLoad=0,
/** @var int */
public int $ToReturn=0,
/** @var array<CourierStopView>|null */
public ?array $Stops=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CourierRunID'])) $this->CourierRunID = $o['CourierRunID'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['CourierProfileId'])) $this->CourierProfileId = $o['CourierProfileId'];
if (isset($o['ProfileName'])) $this->ProfileName = $o['ProfileName'];
if (isset($o['CourierFacilityId'])) $this->CourierFacilityId = $o['CourierFacilityId'];
if (isset($o['FacilityName'])) $this->FacilityName = $o['FacilityName'];
if (isset($o['FacilityAddress'])) $this->FacilityAddress = $o['FacilityAddress'];
if (isset($o['DriverContactId'])) $this->DriverContactId = $o['DriverContactId'];
if (isset($o['DriverName'])) $this->DriverName = $o['DriverName'];
if (isset($o['EquipmentID'])) $this->EquipmentID = $o['EquipmentID'];
if (isset($o['VehicleUnit'])) $this->VehicleUnit = $o['VehicleUnit'];
if (isset($o['UnitOne'])) $this->UnitOne = $o['UnitOne'];
if (isset($o['UnitMany'])) $this->UnitMany = $o['UnitMany'];
if (isset($o['Units'])) $this->Units = $o['Units'];
if (isset($o['StopCount'])) $this->StopCount = $o['StopCount'];
if (isset($o['StopsDone'])) $this->StopsDone = $o['StopsDone'];
if (isset($o['Pay'])) $this->Pay = $o['Pay'];
if (isset($o['BuiltUtc'])) $this->BuiltUtc = JsonConverters::from('DateTime', $o['BuiltUtc']);
if (isset($o['StartedUtc'])) $this->StartedUtc = JsonConverters::from('DateTime', $o['StartedUtc']);
if (isset($o['CompletedUtc'])) $this->CompletedUtc = JsonConverters::from('DateTime', $o['CompletedUtc']);
if (isset($o['ToLoad'])) $this->ToLoad = $o['ToLoad'];
if (isset($o['ToReturn'])) $this->ToReturn = $o['ToReturn'];
if (isset($o['Stops'])) $this->Stops = JsonConverters::fromArray('CourierStopView', $o['Stops']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CourierRunID)) $o['CourierRunID'] = $this->CourierRunID;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->CourierProfileId)) $o['CourierProfileId'] = $this->CourierProfileId;
if (isset($this->ProfileName)) $o['ProfileName'] = $this->ProfileName;
if (isset($this->CourierFacilityId)) $o['CourierFacilityId'] = $this->CourierFacilityId;
if (isset($this->FacilityName)) $o['FacilityName'] = $this->FacilityName;
if (isset($this->FacilityAddress)) $o['FacilityAddress'] = $this->FacilityAddress;
if (isset($this->DriverContactId)) $o['DriverContactId'] = $this->DriverContactId;
if (isset($this->DriverName)) $o['DriverName'] = $this->DriverName;
if (isset($this->EquipmentID)) $o['EquipmentID'] = $this->EquipmentID;
if (isset($this->VehicleUnit)) $o['VehicleUnit'] = $this->VehicleUnit;
if (isset($this->UnitOne)) $o['UnitOne'] = $this->UnitOne;
if (isset($this->UnitMany)) $o['UnitMany'] = $this->UnitMany;
if (isset($this->Units)) $o['Units'] = $this->Units;
if (isset($this->StopCount)) $o['StopCount'] = $this->StopCount;
if (isset($this->StopsDone)) $o['StopsDone'] = $this->StopsDone;
if (isset($this->Pay)) $o['Pay'] = $this->Pay;
if (isset($this->BuiltUtc)) $o['BuiltUtc'] = JsonConverters::to('DateTime', $this->BuiltUtc);
if (isset($this->StartedUtc)) $o['StartedUtc'] = JsonConverters::to('DateTime', $this->StartedUtc);
if (isset($this->CompletedUtc)) $o['CompletedUtc'] = JsonConverters::to('DateTime', $this->CompletedUtc);
if (isset($this->ToLoad)) $o['ToLoad'] = $this->ToLoad;
if (isset($this->ToReturn)) $o['ToReturn'] = $this->ToReturn;
if (isset($this->Stops)) $o['Stops'] = JsonConverters::toArray('CourierStopView', $this->Stops);
return empty($o) ? new class(){} : $o;
}
}
class CourierDriverView implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $DriverCode=null,
/** @var string|null */
public ?string $Name=null,
/** @var bool|null */
public ?bool $Online=null,
/** @var bool|null */
public ?bool $OnRoster=null,
/** @var CourierVanView|null */
public ?CourierVanView $Van=null,
/** @var CourierDriverOrder|null */
public ?CourierDriverOrder $Current=null,
/** @var array<CourierDriverOrder>|null */
public ?array $Queue=null,
/** @var array<CourierDriverOrder>|null */
public ?array $Aboard=null,
/** @var array<CourierRunView>|null */
public ?array $Runs=null,
/** @var CourierDriverOrder|null */
public ?CourierDriverOrder $UpNext=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DriverCode'])) $this->DriverCode = $o['DriverCode'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Online'])) $this->Online = $o['Online'];
if (isset($o['OnRoster'])) $this->OnRoster = $o['OnRoster'];
if (isset($o['Van'])) $this->Van = JsonConverters::from('CourierVanView', $o['Van']);
if (isset($o['Current'])) $this->Current = JsonConverters::from('CourierDriverOrder', $o['Current']);
if (isset($o['Queue'])) $this->Queue = JsonConverters::fromArray('CourierDriverOrder', $o['Queue']);
if (isset($o['Aboard'])) $this->Aboard = JsonConverters::fromArray('CourierDriverOrder', $o['Aboard']);
if (isset($o['Runs'])) $this->Runs = JsonConverters::fromArray('CourierRunView', $o['Runs']);
if (isset($o['UpNext'])) $this->UpNext = JsonConverters::from('CourierDriverOrder', $o['UpNext']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DriverCode)) $o['DriverCode'] = $this->DriverCode;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Online)) $o['Online'] = $this->Online;
if (isset($this->OnRoster)) $o['OnRoster'] = $this->OnRoster;
if (isset($this->Van)) $o['Van'] = JsonConverters::to('CourierVanView', $this->Van);
if (isset($this->Current)) $o['Current'] = JsonConverters::to('CourierDriverOrder', $this->Current);
if (isset($this->Queue)) $o['Queue'] = JsonConverters::toArray('CourierDriverOrder', $this->Queue);
if (isset($this->Aboard)) $o['Aboard'] = JsonConverters::toArray('CourierDriverOrder', $this->Aboard);
if (isset($this->Runs)) $o['Runs'] = JsonConverters::toArray('CourierRunView', $this->Runs);
if (isset($this->UpNext)) $o['UpNext'] = JsonConverters::to('CourierDriverOrder', $this->UpNext);
return empty($o) ? new class(){} : $o;
}
}
class CourierDriverResponse implements JsonSerializable
{
public function __construct(
/** @var CourierDriverView|null */
public ?CourierDriverView $Courier=null,
/** @var string|null */
public ?string $Result=null,
/** @var string|null */
public ?string $Detail=null,
/** @var string|null */
public ?string $Message=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Courier'])) $this->Courier = JsonConverters::from('CourierDriverView', $o['Courier']);
if (isset($o['Result'])) $this->Result = $o['Result'];
if (isset($o['Detail'])) $this->Detail = $o['Detail'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Courier)) $o['Courier'] = JsonConverters::to('CourierDriverView', $this->Courier);
if (isset($this->Result)) $o['Result'] = $this->Result;
if (isset($this->Detail)) $o['Detail'] = $this->Detail;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class CourierItemUnbindRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $TagCode=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['TagCode'])) $this->TagCode = $o['TagCode'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->TagCode)) $o['TagCode'] = $this->TagCode;
return empty($o) ? new class(){} : $o;
}
}
PHP CourierItemUnbindRequest 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.
DELETE /v1/worker/dispatch/od/{Code}/items/{TagCode} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CourierDriverResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Courier>
<Aboard>
<CourierDriverOrder>
<Address>String</Address>
<Area>String</Area>
<ArrivedUtc>0001-01-01T00:00:00</ArrivedUtc>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DropLat>0</DropLat>
<DropLng>0</DropLng>
<DropoffAddress>String</DropoffAddress>
<DropoffContactName>String</DropoffContactName>
<DueText>String</DueText>
<DueUtc>0001-01-01T00:00:00</DueUtc>
<FacilityName>String</FacilityName>
<FacilityNoun>String</FacilityNoun>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Lat>0</Lat>
<LevelName>String</LevelName>
<Lng>0</Lng>
<Minutes>0</Minutes>
<MissedFee>0</MissedFee>
<MissedRequireContact>false</MissedRequireContact>
<MissedRequirePhoto>false</MissedRequirePhoto>
<MissedWaitMin>0</MissedWaitMin>
<Needs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</Needs>
<Photos xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringint>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>0</d5p1:Value>
</d5p1:KeyValueOfstringint>
</Photos>
<ProfileName>String</ProfileName>
<Proof xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</Proof>
<RouteShape>String</RouteShape>
<Tags>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Tags>
<Unit>String</Unit>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
</CourierDriverOrder>
</Aboard>
<Current>
<Address>String</Address>
<Area>String</Area>
<ArrivedUtc>0001-01-01T00:00:00</ArrivedUtc>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DropLat>0</DropLat>
<DropLng>0</DropLng>
<DropoffAddress>String</DropoffAddress>
<DropoffContactName>String</DropoffContactName>
<DueText>String</DueText>
<DueUtc>0001-01-01T00:00:00</DueUtc>
<FacilityName>String</FacilityName>
<FacilityNoun>String</FacilityNoun>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Lat>0</Lat>
<LevelName>String</LevelName>
<Lng>0</Lng>
<Minutes>0</Minutes>
<MissedFee>0</MissedFee>
<MissedRequireContact>false</MissedRequireContact>
<MissedRequirePhoto>false</MissedRequirePhoto>
<MissedWaitMin>0</MissedWaitMin>
<Needs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Needs>
<Photos xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringint>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>0</d4p1:Value>
</d4p1:KeyValueOfstringint>
</Photos>
<ProfileName>String</ProfileName>
<Proof xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Proof>
<RouteShape>String</RouteShape>
<Tags>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Tags>
<Unit>String</Unit>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
</Current>
<DriverCode>String</DriverCode>
<Name>String</Name>
<OnRoster>false</OnRoster>
<Online>false</Online>
<Queue>
<CourierDriverOrder>
<Address>String</Address>
<Area>String</Area>
<ArrivedUtc>0001-01-01T00:00:00</ArrivedUtc>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DropLat>0</DropLat>
<DropLng>0</DropLng>
<DropoffAddress>String</DropoffAddress>
<DropoffContactName>String</DropoffContactName>
<DueText>String</DueText>
<DueUtc>0001-01-01T00:00:00</DueUtc>
<FacilityName>String</FacilityName>
<FacilityNoun>String</FacilityNoun>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Lat>0</Lat>
<LevelName>String</LevelName>
<Lng>0</Lng>
<Minutes>0</Minutes>
<MissedFee>0</MissedFee>
<MissedRequireContact>false</MissedRequireContact>
<MissedRequirePhoto>false</MissedRequirePhoto>
<MissedWaitMin>0</MissedWaitMin>
<Needs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</Needs>
<Photos xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringint>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>0</d5p1:Value>
</d5p1:KeyValueOfstringint>
</Photos>
<ProfileName>String</ProfileName>
<Proof xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</Proof>
<RouteShape>String</RouteShape>
<Tags>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Tags>
<Unit>String</Unit>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
</CourierDriverOrder>
</Queue>
<Runs>
<CourierRunView>
<BuiltUtc>0001-01-01T00:00:00</BuiltUtc>
<Code>String</Code>
<CompletedUtc>0001-01-01T00:00:00</CompletedUtc>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRunID>0</CourierRunID>
<DriverContactId>0</DriverContactId>
<DriverName>String</DriverName>
<EquipmentID>0</EquipmentID>
<FacilityAddress>String</FacilityAddress>
<FacilityName>String</FacilityName>
<Pay>0</Pay>
<ProfileName>String</ProfileName>
<StartedUtc>0001-01-01T00:00:00</StartedUtc>
<Status>String</Status>
<StopCount>0</StopCount>
<Stops>
<CourierStopView>
<Address>String</Address>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DispatchOdRequestID>0</DispatchOdRequestID>
<DueText>String</DueText>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Items>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Items>
<Lat>0</Lat>
<Lng>0</Lng>
<Needs xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d7p1:string>String</d7p1:string>
</Needs>
<Note>String</Note>
<Sequence>0</Sequence>
<Status>String</Status>
<Unit>String</Unit>
<Units>0</Units>
<Zip>String</Zip>
</CourierStopView>
</Stops>
<StopsDone>0</StopsDone>
<ToLoad>0</ToLoad>
<ToReturn>0</ToReturn>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<VehicleUnit>String</VehicleUnit>
</CourierRunView>
</Runs>
<UpNext>
<Address>String</Address>
<Area>String</Area>
<ArrivedUtc>0001-01-01T00:00:00</ArrivedUtc>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DropLat>0</DropLat>
<DropLng>0</DropLng>
<DropoffAddress>String</DropoffAddress>
<DropoffContactName>String</DropoffContactName>
<DueText>String</DueText>
<DueUtc>0001-01-01T00:00:00</DueUtc>
<FacilityName>String</FacilityName>
<FacilityNoun>String</FacilityNoun>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Lat>0</Lat>
<LevelName>String</LevelName>
<Lng>0</Lng>
<Minutes>0</Minutes>
<MissedFee>0</MissedFee>
<MissedRequireContact>false</MissedRequireContact>
<MissedRequirePhoto>false</MissedRequirePhoto>
<MissedWaitMin>0</MissedWaitMin>
<Needs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Needs>
<Photos xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringint>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>0</d4p1:Value>
</d4p1:KeyValueOfstringint>
</Photos>
<ProfileName>String</ProfileName>
<Proof xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Proof>
<RouteShape>String</RouteShape>
<Tags>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Tags>
<Unit>String</Unit>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<UnitsFound>0</UnitsFound>
</UpNext>
<Van>
<Cap>0</Cap>
<CapUnit>String</CapUnit>
<Committed>0</Committed>
<CriticalCode>String</CriticalCode>
<DriveMin>0</DriveMin>
<FacilityName>String</FacilityName>
<InVan>0</InVan>
<LeaveByText>String</LeaveByText>
<LeaveByUtc>0001-01-01T00:00:00</LeaveByUtc>
<SendNote>String</SendNote>
<SlackMin>0</SlackMin>
<State>String</State>
<VehicleUnit>String</VehicleUnit>
</Van>
</Courier>
<Detail>String</Detail>
<Message>String</Message>
<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>
<Result>String</Result>
</CourierDriverResponse>