Class: AmznSpApi::FulfillmentInboundApiModel::PackageStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/fulfillment_inbound_api_model/models/package_status.rb

Constant Summary collapse

SHIPPED =
'SHIPPED'.freeze
IN_TRANSIT =
'IN_TRANSIT'.freeze
DELIVERED =
'DELIVERED'.freeze
CHECKED_IN =
'CHECKED_IN'.freeze
RECEIVING =
'RECEIVING'.freeze
CLOSED =
'CLOSED'.freeze
DELETED =
'DELETED'.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:

  • (String)

    The enum value



25
26
27
28
29
30
# File 'lib/fulfillment_inbound_api_model/models/package_status.rb', line 25

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