Class: TecDoc::Brand
- Inherits:
-
Object
- Object
- TecDoc::Brand
- Defined in:
- lib/tec_doc/brand.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
Class Method Summary collapse
-
.all ⇒ Array<TecDoc::Brand>
Get all brands available for provider.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/tec_doc/brand.rb', line 3 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'lib/tec_doc/brand.rb', line 3 def number @number end |
Class Method Details
.all ⇒ Array<TecDoc::Brand>
Get all brands available for provider.
8 9 10 11 12 13 14 15 16 |
# File 'lib/tec_doc/brand.rb', line 8 def self.all response = TecDoc.client.request(:get_brands_for_assortment) response.map do |attributes| manufacturer = new manufacturer.number = attributes[:brand_no].to_i manufacturer.name = attributes[:brand_name].to_s manufacturer end end |