Class: AboutYou::SDK::Model::Brand
- Inherits:
-
Object
- Object
- AboutYou::SDK::Model::Brand
- Defined in:
- lib/AboutYou/Model/brand.rb
Overview
This Class represents a brand model
Instance Attribute Summary collapse
-
#id ⇒ Object
the id of the brand.
-
#name ⇒ Object
the name of the brand.
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
#id ⇒ Object
the id of the brand
9 10 11 |
# File 'lib/AboutYou/Model/brand.rb', line 9 def id @id end |
#name ⇒ Object
the name of the brand
11 12 13 |
# File 'lib/AboutYou/Model/brand.rb', line 11 def name @name 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 json_object received from the api
-
-
Returns :
-
Instance of AboutYou::SDK::Model::Brand
-
22 23 24 25 26 27 28 29 |
# File 'lib/AboutYou/Model/brand.rb', line 22 def self.create_from_json(json_object) brand = new brand.id = json_object['id'] brand.name = json_object['name'] brand end |