class ShipEngine::CarrierName

Constants

ACCESS_WORLDWIDE
AMAZON_BUY_SHIPPING
APC
ASENDIA
AUSTRALIA_POST
CANADA_POST
DHL_ECOMMERCE
DHL_EXPRESS
DHL_EXPRESS_AU
DHL_EXPRESS_CA
DHL_EXPRESS_UK
DPD
ENDICIA
FEDEX
FEDEX_UK
FIRSTMILE
GLOBEGISTICS
IMEX
NEWGISTICS
ONTRAC
PUROLATOR_CANADA
ROYAL_MAIL
RR_DONNELLEY
SEKO
SENDLE
STAMPS_COM
UPS

Public Class Methods

build_from_hash(value) click to toggle source

Builds the enum from string @param [String] The enum value in the form of the string @return [String] The enum value

# File lib/ship_engine/models/carrier_name.rb, line 48
def self.build_from_hash(value)
  new.build_from_hash(value)
end

Public Instance Methods

build_from_hash(value) click to toggle source

Builds the enum from string @param [String] The enum value in the form of the string @return [String] The enum value

# File lib/ship_engine/models/carrier_name.rb, line 55
def build_from_hash(value)
  constantValues = CarrierName.constants.select { |c| CarrierName::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #CarrierName" if constantValues.empty?
  value
end