You are here

public function FedExEventSubscriber::onBeforeRateRequest in Commerce FedEx 8

Same name in this branch
  1. 8 modules/dry_ice/src/EventSubscriber/FedExEventSubscriber.php \Drupal\commerce_fedex_dry_ice\EventSubscriber\FedExEventSubscriber::onBeforeRateRequest()
  2. 8 modules/dangerous/src/EventSubscriber/FedExEventSubscriber.php \Drupal\commerce_fedex_dangerous\EventSubscriber\FedExEventSubscriber::onBeforeRateRequest()

Alter the rate request event.

Parameters

\Drupal\commerce_fedex\Event\RateRequestEvent $event: The rate request event.

File

modules/dry_ice/src/EventSubscriber/FedExEventSubscriber.php, line 42

Class

FedExEventSubscriber
Provides a FedEx event subscriber.

Namespace

Drupal\commerce_fedex_dry_ice\EventSubscriber

Code

public function onBeforeRateRequest(RateRequestEvent $event) {
  $rateRequest = $event
    ->getRateRequest();
  $shipment = $event
    ->getShipment();

  // @todo Alter the rate request.
}