protected function FedEx::getRequestedPackageLineItems in Commerce FedEx 8
Gets the requested package line items.
Parameters
\Drupal\commerce_shipping\Entity\ShipmentInterface $shipment: The shipment.
Return value
\NicholasCreativeMedia\FedExPHP\Structs\RequestedPackageLineItem[] The requested package line items.
1 call to FedEx::getRequestedPackageLineItems()
- FedEx::getFedExShipment in src/
Plugin/ Commerce/ ShippingMethod/ FedEx.php - Gets a RequestedShipment object for FedEx.
File
- src/
Plugin/ Commerce/ ShippingMethod/ FedEx.php, line 621
Class
- FedEx
- Provides the FedEx shipping method.
Namespace
Drupal\commerce_fedex\Plugin\Commerce\ShippingMethodCode
protected function getRequestedPackageLineItems(ShipmentInterface $shipment) {
$requested_package_line_items = [];
switch ($this->configuration['options']['packaging']) {
case static::PACKAGE_ALL_IN_ONE:
$requested_package_line_items = $this
->getRequestedPackageLineItemsAllInOne($shipment);
break;
case static::PACKAGE_INDIVIDUAL:
$requested_package_line_items = $this
->getRequestedPackageLineItemsIndividual($shipment);
break;
case static::PACKAGE_CALCULATE:
$requested_package_line_items = $this
->getRequestedPackageLineItemsCalculate($shipment);
break;
}
return $requested_package_line_items;
}