Class: SuggestGrid::MessageResponse
- Defined in:
- lib/suggestgrid/models/message_response.rb
Overview
Basic response with a message for success responses.
Instance Attribute Summary collapse
-
#message ⇒ String
Message of the response.
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(message = nil) ⇒ MessageResponse
constructor
A new instance of MessageResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(message = nil) ⇒ MessageResponse
Returns a new instance of MessageResponse.
18 19 20 |
# File 'lib/suggestgrid/models/message_response.rb', line 18 def initialize( = nil) = end |
Instance Attribute Details
#message ⇒ String
Message of the response.
9 10 11 |
# File 'lib/suggestgrid/models/message_response.rb', line 9 def 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/suggestgrid/models/message_response.rb', line 23 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash['message'] # Create object from extracted values. MessageResponse.new() end |
.names ⇒ Object
A mapping from model property names to API property names.
12 13 14 15 16 |
# File 'lib/suggestgrid/models/message_response.rb', line 12 def self.names @_hash = {} if @_hash.nil? @_hash['message'] = 'message' @_hash end |