Class: AmznSpApi::ShippingApiModel::ServiceType
- Inherits:
-
Object
- Object
- AmznSpApi::ShippingApiModel::ServiceType
- Defined in:
- lib/shipping_api_model/models/service_type.rb
Constant Summary collapse
- GROUND =
'Amazon Shipping Ground'.freeze
- STANDARD =
'Amazon Shipping Standard'.freeze
- PREMIUM =
'Amazon Shipping Premium'.freeze
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
21 22 23 24 25 26 |
# File 'lib/shipping_api_model/models/service_type.rb', line 21 def build_from_hash(value) constantValues = ServiceType.constants.select { |c| ServiceType.const_get(c) == value } raise "Invalid ENUM value #{value} for class #ServiceType" if constantValues.empty? value end |