Class: SuggestGrid::TypeRequestBody
- Defined in:
- lib/suggestgrid/models/type_request_body.rb
Instance Attribute Summary collapse
-
#rating ⇒ String
The rating type of the type.
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(rating = nil) ⇒ TypeRequestBody
constructor
A new instance of TypeRequestBody.
Methods inherited from BaseModel
Constructor Details
#initialize(rating = nil) ⇒ TypeRequestBody
Returns a new instance of TypeRequestBody.
18 19 20 |
# File 'lib/suggestgrid/models/type_request_body.rb', line 18 def initialize( = nil) @rating = end |
Instance Attribute Details
#rating ⇒ String
The rating type of the type. Could be “explicit” or “implicit”, where “implicit” is the default.
7 8 9 |
# File 'lib/suggestgrid/models/type_request_body.rb', line 7 def @rating 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/type_request_body.rb', line 23 def self.from_hash(hash) return nil unless hash # Extract variables from the hash = hash['rating'] # Create object from extracted values TypeRequestBody.new() end |
.names ⇒ Object
A mapping from model property names to API property names
10 11 12 13 14 15 16 |
# File 'lib/suggestgrid/models/type_request_body.rb', line 10 def self.names if @_hash.nil? @_hash = {} @_hash["rating"] = "rating" end @_hash end |