class FriendlyShipping::Services::UpsFreight::RatesPackageOptions

Options for packages/pallets within a UPS Freight shipment

@attribute [Symbol] handling _unit How this shipment is divided. Any of the keys in `HANDLING_UNIT_TYPES` @attribute [RatesItemOptions] item_options Options for each of the items on the pallet/in the carboy/etc.

Constants

HANDLING_UNIT_TYPES

Attributes

handling_unit_code[R]
handling_unit_description[R]
handling_unit_tag[R]

Public Class Methods

new( handling_unit: :pallet, **kwargs ) click to toggle source
Calls superclass method FriendlyShipping::PackageOptions::new
# File lib/friendly_shipping/services/ups_freight/rates_package_options.rb, line 26
def initialize(
  handling_unit: :pallet,
  **kwargs
)
  @handling_unit_code = HANDLING_UNIT_TYPES.fetch(handling_unit).fetch(:code)
  @handling_unit_description = HANDLING_UNIT_TYPES.fetch(handling_unit).fetch(:description)
  @handling_unit_tag = "HandlingUnit#{HANDLING_UNIT_TYPES.fetch(handling_unit).fetch(:handling_unit_tag)}"
  super(**kwargs.merge(item_options_class: RatesItemOptions))
end