diff --git a/docs/tracking.md b/docs/tracking.md index b6fd2ae..1888e8b 100644 --- a/docs/tracking.md +++ b/docs/tracking.md @@ -12,6 +12,10 @@ $tracking->PiecesEnabled = 'S'; $client = new Web($this->getEnvironment()); $xml_response = $client->call($tracking); + +$result = new TrackingResponse(); +$result->initFromXML($xml_response); +echo $result->AWBInfo->Status->ActionStatus; ``` If you need XML request for the DHL certification you can obtain by calling the following code diff --git a/src/Datatype/AM/ShipmentInfo.php b/src/Datatype/AM/ShipmentInfo.php index 55db2c4..65d5d67 100644 --- a/src/Datatype/AM/ShipmentInfo.php +++ b/src/Datatype/AM/ShipmentInfo.php @@ -55,12 +55,13 @@ class ShipmentInfo extends Base 'ShipmentDate' => [ 'type' => 'dateTime', 'required' => false, - 'subobject' => true, + 'subobject' => false, ], 'Pieces' => [ - 'type' => '', + 'type' => 'Piece', 'required' => false, 'subobject' => true, + 'multivalues' => true, ], 'Weight' => [ 'type' => 'string', diff --git a/src/Datatype/EU/ShipmentInfo.php b/src/Datatype/EU/ShipmentInfo.php index 412a3f8..65196f9 100644 --- a/src/Datatype/EU/ShipmentInfo.php +++ b/src/Datatype/EU/ShipmentInfo.php @@ -49,7 +49,7 @@ class ShipmentInfo extends \Mtc\Dhl\Datatype\AM\ShipmentInfo 'ShipmentDate' => [ 'type' => 'dateTime', 'required' => false, - 'subobject' => true, + 'subobject' => false, ], 'Pieces' => [ 'type' => 'Piece',