Skip to content

Commit d5e2fcc

Browse files
author
Eric Bohanon
committed
MAGETWO-72747: [Magento Cloud] - /rest/default/V1/order/<order id>/ship and configurable products - for 2.2
1 parent e97ce5b commit d5e2fcc

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

app/code/Magento/Shipping/Controller/Adminhtml/Order/ShipmentLoader.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@
2727
* @method ShipmentLoader setTracking($tracking)
2828
* @method int getOrderId()
2929
* @method int getShipmentId()
30-
* @method array getShipment()
3130
* @method array getTracking()
3231
*/
3332
class ShipmentLoader extends DataObject
3433
{
34+
const SHIPMENT = 'shipment';
35+
3536
/**
3637
* @var ManagerInterface
3738
*/
@@ -135,7 +136,7 @@ public function load()
135136
return false;
136137
}
137138

138-
$shipmentItems = $this->getShipmentItems($this->getShipment() ?: []);
139+
$shipmentItems = $this->getShipmentItems($this->getShipment());
139140

140141
$shipment = $this->documentFactory->create(
141142
$order,
@@ -194,4 +195,14 @@ private function getShipmentItems(array $shipmentData)
194195
}
195196
return $shipmentItems;
196197
}
198+
199+
/**
200+
* Retrieve shipment
201+
*
202+
* @return array
203+
*/
204+
public function getShipment()
205+
{
206+
return $this->getData(self::SHIPMENT) ?: [];
207+
}
197208
}

0 commit comments

Comments
 (0)