Class: AgridClient::Filter
- Inherits:
-
Object
- Object
- AgridClient::Filter
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/filter.rb
Instance Attribute Summary collapse
-
#filter_categories ⇒ Object
Returns the value of attribute filter_categories.
-
#id ⇒ Object
Unique Id.
-
#title ⇒ Object
Filter title.
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.
-
#initialize(attributes = {}) ⇒ Filter
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ Filter
Initializes the object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/agrid_client/models/filter.rb', line 48 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[:'id'] self.id = attributes[:'id'] end if attributes[:'title'] self.title = attributes[:'title'] end if attributes[:'filter_categories'] if (value = attributes[:'filter_categories']).is_a?(Array) self.filter_categories = value end end end |
Instance Attribute Details
#filter_categories ⇒ Object
Returns the value of attribute filter_categories.
26 27 28 |
# File 'lib/agrid_client/models/filter.rb', line 26 def filter_categories @filter_categories end |
#id ⇒ Object
Unique Id
21 22 23 |
# File 'lib/agrid_client/models/filter.rb', line 21 def id @id end |
#title ⇒ Object
Filter title
24 25 26 |
# File 'lib/agrid_client/models/filter.rb', line 24 def title @title end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
29 30 31 32 33 34 35 |
# File 'lib/agrid_client/models/filter.rb', line 29 def self.attribute_map { :'id' => :'id', :'title' => :'title', :'filter_categories' => :'filter_categories' } end |
.swagger_types ⇒ Object
Attribute type mapping.
38 39 40 41 42 43 44 |
# File 'lib/agrid_client/models/filter.rb', line 38 def self.swagger_types { :'id' => :'String', :'title' => :'String', :'filter_categories' => :'Array<FilterCategory>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
69 70 71 72 73 |
# File 'lib/agrid_client/models/filter.rb', line 69 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id end |