protected function USPSShipmentInternational::setDestinationPostalCode in Commerce USPS 8
Sets the destination postal code property.
File
- src/
USPSShipmentInternational.php, line 77
Class
- USPSShipmentInternational
- Class that sets the shipment details needed for the USPS request.
Namespace
Drupal\commerce_uspsCode
protected function setDestinationPostalCode() {
/** @var \CommerceGuys\Addressing\Address $address */
$address = $this->commerceShipment
->getShippingProfile()
->get('address')
->first();
$this->uspsPackage
->setField('DestinationPostalCode', $address
->getPostalCode());
}