Shipment
in package
implements
JsonSerializable
Class Shipment
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- $accountId : string|null
- $actualDeliveryDate : IsoString
- $carrier : Carrier
- $carrierAccount : CarrierAccount|null
- $estimatedDeliveryDate : IsoString
- $shipmentId : string|null
- $config : ShipEngineConfig
- __construct() : mixed
- Shipment constructor.
- __debugInfo() : array<string|int, mixed>
- This is a helper method to unset and remove **$this->config** from the **print_r()** or **var_dump()** output since it's a large object, and is only on **$this** object for internal use.
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- getCarrierAccount() : mixed
- Returns the carrier account that matches the carrier account referenced by the Tracking response, in the form of a **CarrierAccount** object.
Properties
$accountId
public
string|null
$accountId
$actualDeliveryDate
public
IsoString
$actualDeliveryDate
$carrier
public
Carrier
$carrier
$carrierAccount
public
CarrierAccount|null
$carrierAccount
$estimatedDeliveryDate
public
IsoString
$estimatedDeliveryDate
$shipmentId
public
string|null
$shipmentId
$config
protected
ShipEngineConfig
$config
Methods
__construct()
Shipment constructor.
public
__construct(array<string|int, mixed> $shipment, IsoString $actualDeliveryDate, ShipEngineConfig $config) : mixed
Parameters
- $shipment : array<string|int, mixed>
- $actualDeliveryDate : IsoString
- $config : ShipEngineConfig
Tags
Return values
mixed —__debugInfo()
This is a helper method to unset and remove **$this->config** from the **print_r()** or **var_dump()** output since it's a large object, and is only on **$this** object for internal use.
public
__debugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed> —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Return values
mixed —getCarrierAccount()
Returns the carrier account that matches the carrier account referenced by the Tracking response, in the form of a **CarrierAccount** object.
private
getCarrierAccount([string|null $carrier = null ][, string|null $accountId = null ]) : mixed
Parameters
- $carrier : string|null = null
- $accountId : string|null = null