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