Class: AgridClient::Quote
- Inherits:
-
Object
- Object
- AgridClient::Quote
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/quote.rb
Instance Attribute Summary collapse
-
#active_sale ⇒ Object
Returns the value of attribute active_sale.
-
#categories ⇒ Object
Items included on this quote.
-
#company ⇒ Object
Company that offers this quote.
-
#filters ⇒ Object
Goodsfor used to filter quotes.
-
#id ⇒ Object
Unique Id.
-
#images ⇒ Object
Array of images to ilustrate the quote.
-
#price ⇒ Object
Quote price.
-
#service ⇒ Object
Service that contain this quote.
-
#title ⇒ Object
Quote 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 = {}) ⇒ Quote
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ Quote
Initializes the object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/agrid_client/models/quote.rb', line 78 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[:'price'] self.price = attributes[:'price'] end if attributes[:'images'] if (value = attributes[:'images']).is_a?(Array) self.images = value end end if attributes[:'company'] self.company = attributes[:'company'] end if attributes[:'service'] self.service = attributes[:'service'] end if attributes[:'categories'] if (value = attributes[:'categories']).is_a?(Array) self.categories = value end end if attributes[:'filters'] if (value = attributes[:'filters']).is_a?(Array) self.filters = value end end end |
Instance Attribute Details
#active_sale ⇒ Object
Returns the value of attribute active_sale.
44 45 46 |
# File 'lib/agrid_client/models/quote.rb', line 44 def active_sale @active_sale end |
#categories ⇒ Object
Items included on this quote
39 40 41 |
# File 'lib/agrid_client/models/quote.rb', line 39 def categories @categories end |
#company ⇒ Object
Company that offers this quote
33 34 35 |
# File 'lib/agrid_client/models/quote.rb', line 33 def company @company end |
#filters ⇒ Object
Goodsfor used to filter quotes
42 43 44 |
# File 'lib/agrid_client/models/quote.rb', line 42 def filters @filters end |
#id ⇒ Object
Unique Id
21 22 23 |
# File 'lib/agrid_client/models/quote.rb', line 21 def id @id end |
#images ⇒ Object
Array of images to ilustrate the quote
30 31 32 |
# File 'lib/agrid_client/models/quote.rb', line 30 def images @images end |
#price ⇒ Object
Quote price
27 28 29 |
# File 'lib/agrid_client/models/quote.rb', line 27 def price @price end |
#service ⇒ Object
Service that contain this quote
36 37 38 |
# File 'lib/agrid_client/models/quote.rb', line 36 def service @service end |
#title ⇒ Object
Quote title
24 25 26 |
# File 'lib/agrid_client/models/quote.rb', line 24 def title @title end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/agrid_client/models/quote.rb', line 47 def self.attribute_map { :'id' => :'id', :'title' => :'title', :'price' => :'price', :'images' => :'images', :'company' => :'company', :'service' => :'service', :'categories' => :'categories', :'filters' => :'filters', :'active_sale' => :'active_sale' } end |
.swagger_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/agrid_client/models/quote.rb', line 62 def self.swagger_types { :'id' => :'String', :'title' => :'String', :'price' => :'Float', :'images' => :'Array<String>', :'company' => :'Company', :'service' => :'Service', :'categories' => :'Array<Category>', :'filters' => :'Array<Filter>', :'active_sale' => :'Sale' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
118 119 120 121 122 |
# File 'lib/agrid_client/models/quote.rb', line 118 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id end |