Class: Gonebusy::CreateServiceResponse
- Defined in:
- lib/gonebusy/models/create_service_response.rb
Instance Attribute Summary collapse
-
#service ⇒ EntitiesServiceResponse
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(service = nil) ⇒ CreateServiceResponse
constructor
A new instance of CreateServiceResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(service = nil) ⇒ CreateServiceResponse
Returns a new instance of CreateServiceResponse.
18 19 20 |
# File 'lib/gonebusy/models/create_service_response.rb', line 18 def initialize(service = nil) @service = service end |
Instance Attribute Details
#service ⇒ EntitiesServiceResponse
TODO: Write general description for this method
7 8 9 |
# File 'lib/gonebusy/models/create_service_response.rb', line 7 def service @service 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/create_service_response.rb', line 23 def self.from_hash(hash) return nil unless hash # Extract variables from the hash service = EntitiesServiceResponse.from_hash(hash['service']) if hash['service'] # Create object from extracted values CreateServiceResponse.new(service) end |
.names ⇒ Object
A mapping from model property names to API property names
10 11 12 13 14 15 16 |
# File 'lib/gonebusy/models/create_service_response.rb', line 10 def self.names if @_hash.nil? @_hash = {} @_hash["service"] = "service" end @_hash end |