Skip to content

Commit

Permalink
Update track service to 19
Browse files Browse the repository at this point in the history
  • Loading branch information
runningrandall committed Aug 6, 2020
1 parent 1ca871c commit 84e056f
Show file tree
Hide file tree
Showing 16 changed files with 226 additions and 230 deletions.
2 changes: 1 addition & 1 deletion examples/track-by-id.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

// Version
$trackRequest->Version->ServiceId = 'trck';
$trackRequest->Version->Major = 16;
$trackRequest->Version->Major = 19;
$trackRequest->Version->Intermediate = 0;
$trackRequest->Version->Minor = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/FedEx/TrackService/ComplexType/Commodity.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function setUnitPrice(Money $unitPrice)
}

/**
* Set CustomsValue
* The value of the commodity for customs purposes. The field should be the unit price multiplied by the quantity.
*
* @param Money $customsValue
* @return $this
Expand Down
2 changes: 1 addition & 1 deletion src/FedEx/TrackService/ComplexType/ContentRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use FedEx\AbstractComplexType;

/**
* ContentRecord
* Details the contents of the package.
*
* @author Jeremy Dunn <[email protected]>
* @package PHP FedEx API wrapper
Expand Down
60 changes: 43 additions & 17 deletions src/FedEx/TrackService/ComplexType/TrackDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
* @property Dimensions $PackageDimensions
* @property Weight $PackageDimensionalWeight
* @property Weight $ShipmentWeight
* @property string $Packaging
* @property \FedEx\TrackService\SimpleType\PackagingType|string $PackagingType
* @property TrackPackagingDescriptionDetail $Packaging
* @property \FedEx\TrackService\SimpleType\PhysicalPackagingType|string $PhysicalPackagingType
* @property int $PackageSequenceNumber
* @property int $PackageCount
* @property int $ShipmentContentPieceCount
* @property int $PackageContentPieceCount
* @property string $CreatorSoftwareId
* @property TrackChargeDetail[] $Charges
* @property string $NickName
Expand All @@ -46,6 +47,7 @@
* @property ContentRecord[] $ShipmentContents
* @property string[] $PackageContents
* @property string $ClearanceLocationCode
* @property \FedEx\TrackService\SimpleType\ClearanceBrokerageType|string $ClearanceBrokerage
* @property Commodity[] $Commodities
* @property TrackReturnDetail $ReturnDetail
* @property CustomsOptionDetail[] $CustomsOptionDetails
Expand Down Expand Up @@ -372,29 +374,17 @@ public function setShipmentWeight(Weight $shipmentWeight)
}

/**
* Retained for legacy compatibility only.
* Specifies details about packaging such as packaging description and type.
*
* @param string $packaging
* @param TrackPackagingDescriptionDetail $packaging
* @return $this
*/
public function setPackaging($packaging)
public function setPackaging(TrackPackagingDescriptionDetail $packaging)
{
$this->values['Packaging'] = $packaging;
return $this;
}

/**
* Strict representation of the Packaging type (e.g. FEDEX_BOX, YOUR_PACKAGING).
*
* @param \FedEx\TrackService\SimpleType\PackagingType|string $packagingType
* @return $this
*/
public function setPackagingType($packagingType)
{
$this->values['PackagingType'] = $packagingType;
return $this;
}

/**
* Set PhysicalPackagingType
*
Expand Down Expand Up @@ -431,6 +421,30 @@ public function setPackageCount($packageCount)
return $this;
}

/**
* Set ShipmentContentPieceCount
*
* @param int $shipmentContentPieceCount
* @return $this
*/
public function setShipmentContentPieceCount($shipmentContentPieceCount)
{
$this->values['ShipmentContentPieceCount'] = $shipmentContentPieceCount;
return $this;
}

/**
* Set PackageContentPieceCount
*
* @param int $packageContentPieceCount
* @return $this
*/
public function setPackageContentPieceCount($packageContentPieceCount)
{
$this->values['PackageContentPieceCount'] = $packageContentPieceCount;
return $this;
}

/**
* FOR FEDEX INTERNAL USE ONLY: Specifies the software id of the device that was used to create this tracked shipment.
*
Expand Down Expand Up @@ -527,6 +541,18 @@ public function setClearanceLocationCode($clearanceLocationCode)
return $this;
}

/**
* Set ClearanceBrokerage
*
* @param \FedEx\TrackService\SimpleType\ClearanceBrokerageType|string $clearanceBrokerage
* @return $this
*/
public function setClearanceBrokerage($clearanceBrokerage)
{
$this->values['ClearanceBrokerage'] = $clearanceBrokerage;
return $this;
}

/**
* Set Commodities
*
Expand Down
13 changes: 13 additions & 0 deletions src/FedEx/TrackService/ComplexType/TrackEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @property string $EventDescription
* @property string $StatusExceptionCode
* @property string $StatusExceptionDescription
* @property \FedEx\TrackService\SimpleType\BarcodeEntryType|string $BarcodeEntryType
* @property Address $Address
* @property string $StationId
* @property \FedEx\TrackService\SimpleType\ArrivalLocationType|string $ArrivalLocation
Expand Down Expand Up @@ -89,6 +90,18 @@ public function setStatusExceptionDescription($statusExceptionDescription)
return $this;
}

/**
* Set BarcodeEntryType
*
* @param \FedEx\TrackService\SimpleType\BarcodeEntryType|string $barcodeEntryType
* @return $this
*/
public function setBarcodeEntryType($barcodeEntryType)
{
$this->values['BarcodeEntryType'] = $barcodeEntryType;
return $this;
}

/**
* Address information of the station that is responsible for the scan.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
namespace FedEx\TrackService\ComplexType;

use FedEx\AbstractComplexType;

/**
* TrackPackagingDescriptionDetail
*
* @author Jeremy Dunn <jeremy@jsdunn.info>
* @package PHP FedEx API wrapper
* @subpackage Package Movement Information Service
*
* @property string $Type
* @property string $Description
*/
class TrackPackagingDescriptionDetail extends AbstractComplexType
{
/**
* Name of this complex type
*
* @var string
*/
protected $name = 'TrackPackagingDescriptionDetail';

/**
* Strict representation of the Packaging Type (e.g. FEDEX_SMALL_BOX, YOUR_PACKAGING)
*
* @param string $type
* @return $this
*/
public function setType($type)
{
$this->values['Type'] = $type;
return $this;
}

/**
* A description of the packaging.
*
* @param string $description
* @return $this
*/
public function setDescription($description)
{
$this->values['Description'] = $description;
return $this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @package PHP FedEx API wrapper
* @subpackage Package Movement Information Service
*
* @property \FedEx\TrackService\SimpleType\ServiceType|string $Type
* @property string $Type
* @property string $Description
* @property string $ShortDescription
Expand All @@ -25,9 +25,9 @@ class TrackServiceDescriptionDetail extends AbstractComplexType
protected $name = 'TrackServiceDescriptionDetail';

/**
* Set Type
* This field contains the service type values, like PRIORITY_OVERNIGHT and FEDEX_GROUND.
*
* @param \FedEx\TrackService\SimpleType\ServiceType|string $type
* @param string $type
* @return $this
*/
public function setType($type)
Expand Down
6 changes: 3 additions & 3 deletions src/FedEx/TrackService/ComplexType/TrackSpecialHandling.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @package PHP FedEx API wrapper
* @subpackage Package Movement Information Service
*
* @property \FedEx\TrackService\SimpleType\TrackSpecialHandlingType|string $Type
* @property string $Type
* @property string $Description
* @property \FedEx\TrackService\SimpleType\TrackPaymentType|string $PaymentType
Expand All @@ -25,9 +25,9 @@ class TrackSpecialHandling extends AbstractComplexType
protected $name = 'TrackSpecialHandling';

/**
* Set Type
* Identifies the type of track special handling on the package.
*
* @param \FedEx\TrackService\SimpleType\TrackSpecialHandlingType|string $type
* @param string $type
* @return $this
*/
public function setType($type)
Expand Down
2 changes: 1 addition & 1 deletion src/FedEx/TrackService/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Request extends AbstractRequest
const PRODUCTION_URL = 'https://ws.fedex.com:443/web-services/track';
const TESTING_URL = 'https://wsbeta.fedex.com:443/web-services/track';

protected static $wsdlFileName = 'TrackService_v16.wsdl';
protected static $wsdlFileName = 'TrackService_v19.wsdl';

/**
* Sends the TrackRequest and returns the response
Expand Down
17 changes: 17 additions & 0 deletions src/FedEx/TrackService/SimpleType/BarcodeEntryType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
namespace FedEx\TrackService\SimpleType;

use FedEx\AbstractSimpleType;

/**
* BarcodeEntryType
*
* @author Jeremy Dunn <[email protected]>
* @package PHP FedEx API wrapper
* @subpackage Package Movement Information Service
*/
class BarcodeEntryType extends AbstractSimpleType
{
const _MANUAL_ENTRY = 'MANUAL_ENTRY';
const _SCAN = 'SCAN';
}
1 change: 1 addition & 0 deletions src/FedEx/TrackService/SimpleType/CarrierCodeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class CarrierCodeType extends AbstractSimpleType
const _FDXC = 'FDXC';
const _FDXE = 'FDXE';
const _FDXG = 'FDXG';
const _FDXO = 'FDXO';
const _FXCC = 'FXCC';
const _FXFR = 'FXFR';
const _FXSP = 'FXSP';
Expand Down
20 changes: 20 additions & 0 deletions src/FedEx/TrackService/SimpleType/ClearanceBrokerageType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
namespace FedEx\TrackService\SimpleType;

use FedEx\AbstractSimpleType;

/**
* Specifies the type of brokerage to be applied to a shipment.
*
* @author Jeremy Dunn <[email protected]>
* @package PHP FedEx API wrapper
* @subpackage Package Movement Information Service
*/
class ClearanceBrokerageType extends AbstractSimpleType
{
const _BROKER_INCLUSIVE = 'BROKER_INCLUSIVE';
const _BROKER_INCLUSIVE_NON_RESIDENT_IMPORTER = 'BROKER_INCLUSIVE_NON_RESIDENT_IMPORTER';
const _BROKER_SELECT = 'BROKER_SELECT';
const _BROKER_SELECT_NON_RESIDENT_IMPORTER = 'BROKER_SELECT_NON_RESIDENT_IMPORTER';
const _BROKER_UNASSIGNED = 'BROKER_UNASSIGNED';
}
4 changes: 4 additions & 0 deletions src/FedEx/TrackService/SimpleType/NotificationEventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class NotificationEventType extends AbstractSimpleType
const _ON_DELIVERY = 'ON_DELIVERY';
const _ON_ESTIMATED_DELIVERY = 'ON_ESTIMATED_DELIVERY';
const _ON_EXCEPTION = 'ON_EXCEPTION';
const _ON_PICKUP_DRIVER_ARRIVED = 'ON_PICKUP_DRIVER_ARRIVED';
const _ON_PICKUP_DRIVER_ASSIGNED = 'ON_PICKUP_DRIVER_ASSIGNED';
const _ON_PICKUP_DRIVER_DEPARTED = 'ON_PICKUP_DRIVER_DEPARTED';
const _ON_PICKUP_DRIVER_EN_ROUTE = 'ON_PICKUP_DRIVER_EN_ROUTE';
const _ON_SHIPMENT = 'ON_SHIPMENT';
const _ON_TENDER = 'ON_TENDER';
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ class ShipmentNotificationRoleType extends AbstractSimpleType
const _OTHER = 'OTHER';
const _RECIPIENT = 'RECIPIENT';
const _SHIPPER = 'SHIPPER';
const _THIRD_PARTY = 'THIRD_PARTY';
}
Loading

0 comments on commit 84e056f

Please sign in to comment.