class USPSRateRequestEvent in Commerce USPS 8
Rate request event for USPS.
Hierarchy
- class \Drupal\commerce_usps\Event\USPSRateRequestEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of USPSRateRequestEvent
1 file declares its use of USPSRateRequestEvent
File
- src/
Event/ USPSRateRequestEvent.php, line 12
Namespace
Drupal\commerce_usps\EventView source
class USPSRateRequestEvent extends Event {
/**
* The rate request object.
*
* @var \USPS\Rate
*/
protected $rateRequest;
/**
* The shipment being requested.
*
* @var \Drupal\commerce_shipping\Entity\ShipmentInterface
* The commerce shipment entity.
*/
protected $shipment;
/**
* RateRequestEvent constructor.
*
* @param \USPS\Rate $rate_request
* The USPS rate request object.
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The Commerce Shipment entity.
*/
public function __construct(Rate $rate_request, ShipmentInterface $shipment) {
$this->rateRequest = $rate_request;
$this->shipment = $shipment;
}
/**
* Gets the rate request object.
*
* @return \USPS\Rate
* The rate request object.
*/
public function getRateRequest() {
return $this->rateRequest;
}
/**
* Set the rate request.
*
* @param \USPS\Rate $rate_request
* The USPS rate object.
*/
public function setRateRequest(Rate $rate_request) {
$this->rateRequest = $rate_request;
}
/**
* Gets the shipment.
*
* @return \Drupal\commerce_shipping\Entity\ShipmentInterface
* The shipment.
*/
public function getShipment() {
return $this->shipment;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
USPSRateRequestEvent:: |
protected | property | The rate request object. | |
USPSRateRequestEvent:: |
protected | property | The shipment being requested. | |
USPSRateRequestEvent:: |
public | function | Gets the rate request object. | |
USPSRateRequestEvent:: |
public | function | Gets the shipment. | |
USPSRateRequestEvent:: |
public | function | Set the rate request. | |
USPSRateRequestEvent:: |
public | function | RateRequestEvent constructor. |