class RateRequestEvent in Commerce FedEx 8
Defines the rate request event for FedEx.
Hierarchy
- class \Drupal\commerce_fedex\Event\RateRequestEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of RateRequestEvent
See also
\Drupal\commerce_fedex\Event\CommerceFedExEvents
3 files declare their use of RateRequestEvent
- FedEx.php in src/
Plugin/ Commerce/ ShippingMethod/ FedEx.php - FedExEventSubscriber.php in modules/
dry_ice/ src/ EventSubscriber/ FedExEventSubscriber.php - FedExEventSubscriber.php in modules/
dangerous/ src/ EventSubscriber/ FedExEventSubscriber.php
File
- src/
Event/ RateRequestEvent.php, line 15
Namespace
Drupal\commerce_fedex\EventView source
class RateRequestEvent extends Event {
/**
* The rate request object.
*
* @var \NicholasCreativeMedia\FedExPHP\Structs\RateRequest
*/
protected $rateRequest;
/**
* The FedEx rate service being used.
*
* @var \NicholasCreativeMedia\FedExPHP\Services\RateService
*/
protected $rateService;
/**
* The shipment being requested.
*
* @var \Drupal\commerce_shipping\Entity\ShipmentInterface
*/
protected $shipment;
/**
* Constructs a new BeforePackEvent object.
*
* @param \NicholasCreativeMedia\FedExPHP\Structs\RateRequest $rate_request
* The rate request object.
* @param \NicholasCreativeMedia\FedExPHP\Services\RateService $rate_service
* The FedEx rate service being used.
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment being requested.
*/
public function __construct(RateRequest $rate_request, RateService $rate_service, ShipmentInterface $shipment) {
$this->rateRequest = $rate_request;
$this->rateService = $rate_service;
$this->shipment = $shipment;
}
/**
* Gets the rate request object.
*
* @return \NicholasCreativeMedia\FedExPHP\Structs\RateRequest
* The rate request object.
*/
public function getRateRequest() {
return $this->rateRequest;
}
/**
* Sets the rate request object.
*
* @param \NicholasCreativeMedia\FedExPHP\Structs\RateRequest $rate_request
* The rate request object.
*
* @return $this
*/
public function setRateRequest(RateRequest $rate_request) {
$this->rateRequest = $rate_request;
return $this;
}
/**
* Gets the rate service.
*
* @return \NicholasCreativeMedia\FedExPHP\Services\RateService
* The rate service.
*/
public function getRateService() {
return $this->rateService;
}
/**
* Sets the rate service.
*
* @param \NicholasCreativeMedia\FedExPHP\Services\RateService $rate_service
* The rate service.
*
* @return $this
*/
public function setRateService(RateService $rate_service) {
$this->rateService = $rate_service;
return $this;
}
/**
* Gets the shipment.
*
* @return \Drupal\commerce_shipping\Entity\ShipmentInterface
* The shipment.
*/
public function getShipment() {
return $this->shipment;
}
/**
* Sets the shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
*
* @return $this
*/
public function setShipment(ShipmentInterface $shipment) {
$this->shipment = $shipment;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RateRequestEvent:: |
protected | property | The rate request object. | |
RateRequestEvent:: |
protected | property | The FedEx rate service being used. | |
RateRequestEvent:: |
protected | property | The shipment being requested. | |
RateRequestEvent:: |
public | function | Gets the rate request object. | |
RateRequestEvent:: |
public | function | Gets the rate service. | |
RateRequestEvent:: |
public | function | Gets the shipment. | |
RateRequestEvent:: |
public | function | Sets the rate request object. | |
RateRequestEvent:: |
public | function | Sets the rate service. | |
RateRequestEvent:: |
public | function | Sets the shipment. | |
RateRequestEvent:: |
public | function | Constructs a new BeforePackEvent object. |