You are here

interface UPSRateRequestInterface in Commerce UPS 8.3

The interface for fetching and returning rates using the UPS API.

@package Drupal\commerce_ups

Hierarchy

Expanded class hierarchy of UPSRateRequestInterface

All classes that implement UPSRateRequestInterface

2 files declare their use of UPSRateRequestInterface
UPS.php in src/Plugin/Commerce/ShippingMethod/UPS.php
UPSRateRequestTest.php in tests/src/Unit/UPSRateRequestTest.php

File

src/UPSRateRequestInterface.php, line 13

Namespace

Drupal\commerce_ups
View source
interface UPSRateRequestInterface extends UPSRequestInterface {

  /**
   * The name of the logger channel to use throughout this module.
   */
  const LOGGER_CHANNEL = 'commerce_ups';

  /**
   * Fetch rates for the shipping method.
   *
   * @param \Drupal\commerce_shipping\Entity\ShipmentInterface $commerce_shipment
   *   The commerce shipment.
   * @param \Drupal\commerce_shipping\Entity\ShippingMethodInterface $shipping_method
   *   The shipping method.
   *
   * @return array
   *   An array of ShippingRate objects.
   */
  public function getRates(ShipmentInterface $commerce_shipment, ShippingMethodInterface $shipping_method);

}

Members

Namesort descending Modifiers Type Description Overrides
UPSRateRequestInterface::getRates public function Fetch rates for the shipping method. 1
UPSRateRequestInterface::LOGGER_CHANNEL constant The name of the logger channel to use throughout this module.
UPSRequestInterface::setConfig public function Set the request configuration. 1