Class: Basecamp::Types::Boost
- Inherits:
-
Object
- Object
- Basecamp::Types::Boost
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Boost
Instance Attribute Summary collapse
-
#booster ⇒ Object
Returns the value of attribute booster.
-
#content ⇒ Object
Returns the value of attribute content.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#recording ⇒ Object
Returns the value of attribute recording.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Boost
constructor
A new instance of Boost.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Boost
Returns a new instance of Boost.
324 325 326 327 328 329 330 |
# File 'lib/basecamp/generated/types.rb', line 324 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @booster = parse_type(data["booster"], "Person") @content = data["content"] @recording = parse_type(data["recording"], "RecordingParent") end |
Instance Attribute Details
#booster ⇒ Object
Returns the value of attribute booster.
317 318 319 |
# File 'lib/basecamp/generated/types.rb', line 317 def booster @booster end |
#content ⇒ Object
Returns the value of attribute content.
317 318 319 |
# File 'lib/basecamp/generated/types.rb', line 317 def content @content end |
#created_at ⇒ Object
Returns the value of attribute created_at.
317 318 319 |
# File 'lib/basecamp/generated/types.rb', line 317 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
317 318 319 |
# File 'lib/basecamp/generated/types.rb', line 317 def id @id end |
#recording ⇒ Object
Returns the value of attribute recording.
317 318 319 |
# File 'lib/basecamp/generated/types.rb', line 317 def recording @recording end |
Class Method Details
.required_fields ⇒ Array<Symbol>
320 321 322 |
# File 'lib/basecamp/generated/types.rb', line 320 def self.required_fields %i[created_at id].freeze end |
Instance Method Details
#to_h ⇒ Object
332 333 334 335 336 337 338 339 340 |
# File 'lib/basecamp/generated/types.rb', line 332 def to_h { "created_at" => @created_at, "id" => @id, "booster" => @booster, "content" => @content, "recording" => @recording, }.compact end |
#to_json(*args) ⇒ Object
342 343 344 |
# File 'lib/basecamp/generated/types.rb', line 342 def to_json(*args) to_h.to_json(*args) end |