Class: AmzSpApi::ProductPricingApiModel::QuantityDiscountType
- Inherits:
-
Object
- Object
- AmzSpApi::ProductPricingApiModel::QuantityDiscountType
- Defined in:
- lib/product-pricing-api-model/models/quantity_discount_type.rb
Constant Summary collapse
- DISCOUNT =
'QUANTITY_DISCOUNT'.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 |
# File 'lib/product-pricing-api-model/models/quantity_discount_type.rb', line 21 def build_from_hash(value) constantValues = QuantityDiscountType.constants.select { |c| QuantityDiscountType::const_get(c) == value } raise "Invalid ENUM value #{value} for class #QuantityDiscountType" if constantValues.empty? value end |