Class: Gonebusy::GetResourceByIdResponse
- Defined in:
- lib/gonebusy/models/get_resource_by_id_response.rb
Instance Attribute Summary collapse
-
#resource ⇒ EntitiesResourceResponse
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(resource = nil) ⇒ GetResourceByIdResponse
constructor
A new instance of GetResourceByIdResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(resource = nil) ⇒ GetResourceByIdResponse
Returns a new instance of GetResourceByIdResponse.
18 19 20 |
# File 'lib/gonebusy/models/get_resource_by_id_response.rb', line 18 def initialize(resource = nil) @resource = resource end |
Instance Attribute Details
#resource ⇒ EntitiesResourceResponse
TODO: Write general description for this method
7 8 9 |
# File 'lib/gonebusy/models/get_resource_by_id_response.rb', line 7 def resource @resource 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 32 33 |
# File 'lib/gonebusy/models/get_resource_by_id_response.rb', line 23 def self.from_hash(hash) if hash == nil nil else # Extract variables from the hash resource = EntitiesResourceResponse.from_hash(hash["resource"]) if hash["resource"] # Create object from extracted values GetResourceByIdResponse.new(resource) end 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_resource_by_id_response.rb', line 10 def self.names if @hash.nil? @hash = {} @hash["resource"] = "resource" end @hash end |