You are here

class UPSUtilities in Ubercart 8.4

Utility routines for UPS Shipping.

Hierarchy

Expanded class hierarchy of UPSUtilities

3 files declare their use of UPSUtilities
uc_ups.module in shipping/uc_ups/uc_ups.module
UPS shipping quote module.
uc_ups.ship.inc in shipping/uc_ups/src/Plugin/Ubercart/FulfillmentMethod/uc_ups.ship.inc
UPS functions for label generation.
UPSSettingsForm.php in shipping/uc_ups/src/Form/UPSSettingsForm.php

File

shipping/uc_ups/src/UPSUtilities.php, line 8

Namespace

Drupal\uc_ups
View source
class UPSUtilities {

  /**
   * Convenience function to get UPS codes for their services.
   */
  public static function services() {
    return [
      // Domestic services.
      '03' => t('UPS Ground'),
      '01' => t('UPS Next Day Air'),
      '13' => t('UPS Next Day Air Saver'),
      '14' => t('UPS Next Day Early A.M.'),
      '02' => t('UPS 2nd Day Air'),
      '59' => t('UPS 2nd Day Air A.M.'),
      '12' => t('UPS 3 Day Select'),
      // International services.
      '11' => t('UPS Standard'),
      '07' => t('UPS Worldwide Express'),
      '08' => t('UPS Worldwide Expedited'),
      '54' => t('UPS Worldwide Express Plus'),
      '65' => t('UPS Worldwide Saver'),
    ];
  }

  /**
   * Convenience function to get UPS codes for their package types.
   */
  public static function packageTypes() {
    return [
      // Customer Supplied Page is first so it will be the default.
      '02' => t('Customer Supplied Package'),
      '01' => t('UPS Letter'),
      '03' => t('Tube'),
      '04' => t('PAK'),
      '21' => t('UPS Express Box'),
      '24' => t('UPS 25KG Box'),
      '25' => t('UPS 10KG Box'),
      '30' => t('Pallet'),
      '2a' => t('Small Express Box'),
      '2b' => t('Medium Express Box'),
      '2c' => t('Large Express Box'),
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UPSUtilities::packageTypes public static function Convenience function to get UPS codes for their package types.
UPSUtilities::services public static function Convenience function to get UPS codes for their services.