You are here

public function USPSRateRequestBase::setShippingMethod in Commerce USPS 8

Set the shipping method being rated.

Parameters

\Drupal\commerce_shipping\Entity\ShippingMethodInterface $shipping_method: The shipping method.

1 call to USPSRateRequestBase::setShippingMethod()
USPSRateRequestBase::getRates in src/USPSRateRequestBase.php
Fetch rates from the USPS API.

File

src/USPSRateRequestBase.php, line 157

Class

USPSRateRequestBase
Class USPSRateRequest.

Namespace

Drupal\commerce_usps

Code

public function setShippingMethod(ShippingMethodInterface $shipping_method) {
  $this->shippingMethod = $shipping_method;
}