Class: AmzSpApi::ShippingApiModel::ServiceType
- Inherits:
-
Object
- Object
- AmzSpApi::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
23 24 25 26 27 |
# File 'lib/shipping-api-model/models/service_type.rb', line 23 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 |