From 84e056f8bcba5fbda260d9fea663bd6a7e1b79f3 Mon Sep 17 00:00:00 2001 From: Randall Adams Date: Wed, 5 Aug 2020 21:46:20 -0600 Subject: [PATCH] Update track service to 19 --- examples/track-by-id.php | 2 +- .../TrackService/ComplexType/Commodity.php | 2 +- .../ComplexType/ContentRecord.php | 2 +- .../TrackService/ComplexType/TrackDetail.php | 60 ++-- .../TrackService/ComplexType/TrackEvent.php | 13 + .../TrackPackagingDescriptionDetail.php | 49 ++++ .../TrackServiceDescriptionDetail.php | 6 +- .../ComplexType/TrackSpecialHandling.php | 6 +- src/FedEx/TrackService/Request.php | 2 +- .../SimpleType/BarcodeEntryType.php | 17 ++ .../SimpleType/CarrierCodeType.php | 1 + .../SimpleType/ClearanceBrokerageType.php | 20 ++ .../SimpleType/NotificationEventType.php | 4 + .../ShipmentNotificationRoleType.php | 1 - ...Service_v16.wsdl => TrackService_v19.wsdl} | 269 +++++------------- .../Cli/GenerateCode/Command/GenerateCode.php | 2 +- 16 files changed, 226 insertions(+), 230 deletions(-) create mode 100644 src/FedEx/TrackService/ComplexType/TrackPackagingDescriptionDetail.php create mode 100644 src/FedEx/TrackService/SimpleType/BarcodeEntryType.php create mode 100644 src/FedEx/TrackService/SimpleType/ClearanceBrokerageType.php rename src/FedEx/_wsdl/{TrackService_v16.wsdl => TrackService_v19.wsdl} (91%) diff --git a/examples/track-by-id.php b/examples/track-by-id.php index fcd0e029..fecf7152 100644 --- a/examples/track-by-id.php +++ b/examples/track-by-id.php @@ -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; diff --git a/src/FedEx/TrackService/ComplexType/Commodity.php b/src/FedEx/TrackService/ComplexType/Commodity.php index 435dcad0..ddce0693 100644 --- a/src/FedEx/TrackService/ComplexType/Commodity.php +++ b/src/FedEx/TrackService/ComplexType/Commodity.php @@ -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 diff --git a/src/FedEx/TrackService/ComplexType/ContentRecord.php b/src/FedEx/TrackService/ComplexType/ContentRecord.php index d701403f..9b84af65 100644 --- a/src/FedEx/TrackService/ComplexType/ContentRecord.php +++ b/src/FedEx/TrackService/ComplexType/ContentRecord.php @@ -4,7 +4,7 @@ use FedEx\AbstractComplexType; /** - * ContentRecord + * Details the contents of the package. * * @author Jeremy Dunn * @package PHP FedEx API wrapper diff --git a/src/FedEx/TrackService/ComplexType/TrackDetail.php b/src/FedEx/TrackService/ComplexType/TrackDetail.php index 87fec26a..c0b27137 100644 --- a/src/FedEx/TrackService/ComplexType/TrackDetail.php +++ b/src/FedEx/TrackService/ComplexType/TrackDetail.php @@ -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 @@ -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 @@ -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 * @@ -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. * @@ -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 * diff --git a/src/FedEx/TrackService/ComplexType/TrackEvent.php b/src/FedEx/TrackService/ComplexType/TrackEvent.php index 1564bd12..4a26564e 100644 --- a/src/FedEx/TrackService/ComplexType/TrackEvent.php +++ b/src/FedEx/TrackService/ComplexType/TrackEvent.php @@ -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 @@ -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. * diff --git a/src/FedEx/TrackService/ComplexType/TrackPackagingDescriptionDetail.php b/src/FedEx/TrackService/ComplexType/TrackPackagingDescriptionDetail.php new file mode 100644 index 00000000..26e78d56 --- /dev/null +++ b/src/FedEx/TrackService/ComplexType/TrackPackagingDescriptionDetail.php @@ -0,0 +1,49 @@ + + * @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; + } +} diff --git a/src/FedEx/TrackService/ComplexType/TrackServiceDescriptionDetail.php b/src/FedEx/TrackService/ComplexType/TrackServiceDescriptionDetail.php index e03abc2b..fe11b664 100644 --- a/src/FedEx/TrackService/ComplexType/TrackServiceDescriptionDetail.php +++ b/src/FedEx/TrackService/ComplexType/TrackServiceDescriptionDetail.php @@ -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 @@ -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) diff --git a/src/FedEx/TrackService/ComplexType/TrackSpecialHandling.php b/src/FedEx/TrackService/ComplexType/TrackSpecialHandling.php index 0fddad21..fa8089f5 100644 --- a/src/FedEx/TrackService/ComplexType/TrackSpecialHandling.php +++ b/src/FedEx/TrackService/ComplexType/TrackSpecialHandling.php @@ -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 @@ -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) diff --git a/src/FedEx/TrackService/Request.php b/src/FedEx/TrackService/Request.php index 6ff1e882..14b8670b 100644 --- a/src/FedEx/TrackService/Request.php +++ b/src/FedEx/TrackService/Request.php @@ -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 diff --git a/src/FedEx/TrackService/SimpleType/BarcodeEntryType.php b/src/FedEx/TrackService/SimpleType/BarcodeEntryType.php new file mode 100644 index 00000000..75f34dd3 --- /dev/null +++ b/src/FedEx/TrackService/SimpleType/BarcodeEntryType.php @@ -0,0 +1,17 @@ + + * @package PHP FedEx API wrapper + * @subpackage Package Movement Information Service + */ +class BarcodeEntryType extends AbstractSimpleType +{ + const _MANUAL_ENTRY = 'MANUAL_ENTRY'; + const _SCAN = 'SCAN'; +} diff --git a/src/FedEx/TrackService/SimpleType/CarrierCodeType.php b/src/FedEx/TrackService/SimpleType/CarrierCodeType.php index 21f77d6e..26cc0de7 100644 --- a/src/FedEx/TrackService/SimpleType/CarrierCodeType.php +++ b/src/FedEx/TrackService/SimpleType/CarrierCodeType.php @@ -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'; diff --git a/src/FedEx/TrackService/SimpleType/ClearanceBrokerageType.php b/src/FedEx/TrackService/SimpleType/ClearanceBrokerageType.php new file mode 100644 index 00000000..49765b3b --- /dev/null +++ b/src/FedEx/TrackService/SimpleType/ClearanceBrokerageType.php @@ -0,0 +1,20 @@ + + * @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'; +} diff --git a/src/FedEx/TrackService/SimpleType/NotificationEventType.php b/src/FedEx/TrackService/SimpleType/NotificationEventType.php index 4da1d113..6ba2f4ec 100644 --- a/src/FedEx/TrackService/SimpleType/NotificationEventType.php +++ b/src/FedEx/TrackService/SimpleType/NotificationEventType.php @@ -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'; } diff --git a/src/FedEx/TrackService/SimpleType/ShipmentNotificationRoleType.php b/src/FedEx/TrackService/SimpleType/ShipmentNotificationRoleType.php index fb14c52f..2ffff796 100644 --- a/src/FedEx/TrackService/SimpleType/ShipmentNotificationRoleType.php +++ b/src/FedEx/TrackService/SimpleType/ShipmentNotificationRoleType.php @@ -16,5 +16,4 @@ class ShipmentNotificationRoleType extends AbstractSimpleType const _OTHER = 'OTHER'; const _RECIPIENT = 'RECIPIENT'; const _SHIPPER = 'SHIPPER'; - const _THIRD_PARTY = 'THIRD_PARTY'; } diff --git a/src/FedEx/_wsdl/TrackService_v16.wsdl b/src/FedEx/_wsdl/TrackService_v19.wsdl similarity index 91% rename from src/FedEx/_wsdl/TrackService_v16.wsdl rename to src/FedEx/_wsdl/TrackService_v19.wsdl index 3ad93662..994cf9a7 100755 --- a/src/FedEx/_wsdl/TrackService_v16.wsdl +++ b/src/FedEx/_wsdl/TrackService_v19.wsdl @@ -1,6 +1,6 @@ - + - + @@ -141,6 +141,12 @@ + + + + + + Identification of a FedEx operating company (transportation). @@ -149,11 +155,24 @@ + + + + Specifies the type of brokerage to be applied to a shipment. + + + + + + + + + Descriptive data for the client submitting a transaction. @@ -211,7 +230,11 @@ - + + + The value of the commodity for customs purposes. The field should be the unit price multiplied by the quantity. + + Defines additional characteristic of commodity used to calculate duties and taxes @@ -324,6 +347,9 @@ + + Details the contents of the package. + @@ -692,6 +718,10 @@ + + + + @@ -757,21 +787,6 @@ - - - - - - - - - - - - - - - @@ -946,61 +961,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1033,7 +993,6 @@ - @@ -1253,14 +1212,9 @@ The weight of the entire shipment. - - - Retained for legacy compatibility only. - - - + - Strict representation of the Packaging type (e.g. FEDEX_BOX, YOUR_PACKAGING). + Specifies details about packaging such as packaging description and type. @@ -1274,6 +1228,8 @@ The number of packages in this shipment. + + FOR FEDEX INTERNAL USE ONLY: Specifies the software id of the device that was used to create this tracked shipment. @@ -1289,7 +1245,8 @@ - + + @@ -1473,6 +1430,7 @@ Literal description that pairs with the StatusExceptionCode. + Address information of the station that is responsible for the scan. @@ -1599,6 +1557,20 @@ + + + + + Strict representation of the Packaging Type (e.g. FEDEX_SMALL_BOX, YOUR_PACKAGING) + + + + + A description of the packaging. + + + + @@ -1800,7 +1772,11 @@ - + + + This field contains the service type values, like PRIORITY_OVERNIGHT and FEDEX_GROUND. + + @@ -1811,124 +1787,15 @@ - + + + Identifies the type of track special handling on the package. + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2207,7 +2074,7 @@ Identifies a system or sub-system which performs an operation. - + Identifies the service business level. @@ -2261,7 +2128,7 @@ - + @@ -2270,7 +2137,7 @@ - + @@ -2279,7 +2146,7 @@ - + diff --git a/util/Cli/GenerateCode/Command/GenerateCode.php b/util/Cli/GenerateCode/Command/GenerateCode.php index 8c0f0d7d..6042d6d9 100644 --- a/util/Cli/GenerateCode/Command/GenerateCode.php +++ b/util/Cli/GenerateCode/Command/GenerateCode.php @@ -92,7 +92,7 @@ protected function execute(InputInterface $input, OutputInterface $output) //TrackService - $wsdlPath = $fedexSrcDir . '/_wsdl/TrackService_v16.wsdl'; + $wsdlPath = $fedexSrcDir . '/_wsdl/TrackService_v19.wsdl'; $baseNamespace = 'FedEx\TrackService'; $subPackageName = 'Track Service';