Class: AgridClient::PriceRange
- Inherits:
-
Object
- Object
- AgridClient::PriceRange
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/price_range.rb
Instance Attribute Summary collapse
-
#max ⇒ Object
Maximum price.
-
#min ⇒ Object
Minimium price.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#initialize(attributes = {}) ⇒ PriceRange
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ PriceRange
Initializes the object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/agrid_client/models/price_range.rb', line 44 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes[:'min'] self.min = attributes[:'min'] end if attributes[:'max'] self.max = attributes[:'max'] end end |
Instance Attribute Details
#max ⇒ Object
Maximum price
24 25 26 |
# File 'lib/agrid_client/models/price_range.rb', line 24 def max @max end |
#min ⇒ Object
Minimium price
21 22 23 |
# File 'lib/agrid_client/models/price_range.rb', line 21 def min @min end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
27 28 29 30 31 32 |
# File 'lib/agrid_client/models/price_range.rb', line 27 def self.attribute_map { :'min' => :'min', :'max' => :'max' } end |
.swagger_types ⇒ Object
Attribute type mapping.
35 36 37 38 39 40 |
# File 'lib/agrid_client/models/price_range.rb', line 35 def self.swagger_types { :'min' => :'Float', :'max' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
60 61 62 63 64 65 |
# File 'lib/agrid_client/models/price_range.rb', line 60 def ==(o) return true if self.equal?(o) self.class == o.class && min == o.min && max == o.max end |
#eql?(o) ⇒ Boolean
69 70 71 |
# File 'lib/agrid_client/models/price_range.rb', line 69 def eql?(o) self == o end |