Class: Gonebusy::GetCategoryByIdResponse
- Defined in:
- lib/gonebusy/models/get_category_by_id_response.rb
Instance Attribute Summary collapse
-
#category ⇒ EntitiesCategoryResponse
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(category = nil) ⇒ GetCategoryByIdResponse
constructor
A new instance of GetCategoryByIdResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(category = nil) ⇒ GetCategoryByIdResponse
Returns a new instance of GetCategoryByIdResponse.
18 19 20 |
# File 'lib/gonebusy/models/get_category_by_id_response.rb', line 18 def initialize(category = nil) @category = category end |
Instance Attribute Details
#category ⇒ EntitiesCategoryResponse
TODO: Write general description for this method
7 8 9 |
# File 'lib/gonebusy/models/get_category_by_id_response.rb', line 7 def category @category end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
23 24 25 26 27 28 29 30 31 |
# File 'lib/gonebusy/models/get_category_by_id_response.rb', line 23 def self.from_hash(hash) return nil unless hash # Extract variables from the hash category = EntitiesCategoryResponse.from_hash(hash['category']) if hash['category'] # Create object from extracted values GetCategoryByIdResponse.new(category) end |
.names ⇒ Object
A mapping from model property names to API property names
10 11 12 13 14 15 16 |
# File 'lib/gonebusy/models/get_category_by_id_response.rb', line 10 def self.names if @_hash.nil? @_hash = {} @_hash["category"] = "category" end @_hash end |