Class: AmzSpApi::EasyShipModel::PackageStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/easy-ship-model/models/package_status.rb

Constant Summary collapse

READY_FOR_PICKUP =
'ReadyForPickup'.freeze
PICKED_UP =
'PickedUp'.freeze
AT_ORIGIN_FC =
'AtOriginFC'.freeze
AT_DESTINATION_FC =
'AtDestinationFC'.freeze
DELIVERED =
'Delivered'.freeze
REJECTED =
'Rejected'.freeze
UNDELIVERABLE =
'Undeliverable'.freeze
RETURNED_TO_SELLER =
'ReturnedToSeller'.freeze
LOST_IN_TRANSIT =
'LostInTransit'.freeze
LABEL_CANCELED =
'LabelCanceled'.freeze
DAMAGED_IN_TRANSIT =
'DamagedInTransit'.freeze
OUT_FOR_DELIVERY =
'OutForDelivery'.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:



32
33
34
35
36
# File 'lib/easy-ship-model/models/package_status.rb', line 32

def build_from_hash(value)
  constantValues = PackageStatus.constants.select { |c| PackageStatus::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #PackageStatus" if constantValues.empty?
  value
end