Class: AboutYou::SDK::Model::PriceRange
- Inherits:
-
Object
- Object
- AboutYou::SDK::Model::PriceRange
- Defined in:
- lib/AboutYou/Model/ProductSearchResult/price_range.rb
Overview
This class represents a Price Range model.
- author
-
Collins GmbH & Co KG
Instance Attribute Summary collapse
-
#from ⇒ Object
startpoint of the price range.
-
#max ⇒ Object
max value of the price range.
-
#mean ⇒ Object
mean.
-
#min ⇒ Object
min value of the price range.
-
#product_count ⇒ Object
the product count.
-
#sum ⇒ Object
sum.
-
#to ⇒ Object
end of the price range.
Class Method Summary collapse
-
.create_from_json(json_object) ⇒ Object
This method is used for creating an instance of this class by a json_object.
Instance Attribute Details
#from ⇒ Object
startpoint of the price range
13 14 15 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 13 def from @from end |
#max ⇒ Object
max value of the price range
19 20 21 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 19 def max @max end |
#mean ⇒ Object
mean
21 22 23 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 21 def mean @mean end |
#min ⇒ Object
min value of the price range
17 18 19 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 17 def min @min end |
#product_count ⇒ Object
the product count
11 12 13 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 11 def product_count @product_count end |
#sum ⇒ Object
sum
23 24 25 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 23 def sum @sum end |
#to ⇒ Object
end of the price range
15 16 17 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 15 def to @to end |
Class Method Details
.create_from_json(json_object) ⇒ Object
This method is used for creating an instance of this class by a json_object.
-
Args :
-
json_object
-> the jsonObject received from the api
-
-
Returns :
-
Instance of AboutYou::SDK::Model::PriceRange
-
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/AboutYou/Model/ProductSearchResult/price_range.rb', line 34 def self.create_from_json(json_object) price_range = new price_range.product_count = json_object['count'] price_range.from = json_object['from'] price_range.to = json_object['to'] price_range.min = json_object['min'] price_range.max = json_object['max'] price_range.mean = json_object['mean'] price_range.sum = json_object['total'] price_range end |