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.
268 269 270 271 272 273 274 |
# File 'lib/basecamp/generated/types.rb', line 268 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.
261 262 263 |
# File 'lib/basecamp/generated/types.rb', line 261 def booster @booster end |
#content ⇒ Object
Returns the value of attribute content.
261 262 263 |
# File 'lib/basecamp/generated/types.rb', line 261 def content @content end |
#created_at ⇒ Object
Returns the value of attribute created_at.
261 262 263 |
# File 'lib/basecamp/generated/types.rb', line 261 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
261 262 263 |
# File 'lib/basecamp/generated/types.rb', line 261 def id @id end |
#recording ⇒ Object
Returns the value of attribute recording.
261 262 263 |
# File 'lib/basecamp/generated/types.rb', line 261 def recording @recording end |
Class Method Details
.required_fields ⇒ Array<Symbol>
264 265 266 |
# File 'lib/basecamp/generated/types.rb', line 264 def self.required_fields %i[created_at id].freeze end |
Instance Method Details
#to_h ⇒ Object
276 277 278 279 280 281 282 283 284 |
# File 'lib/basecamp/generated/types.rb', line 276 def to_h { "created_at" => @created_at, "id" => @id, "booster" => @booster, "content" => @content, "recording" => @recording, }.compact end |
#to_json(*args) ⇒ Object
286 287 288 |
# File 'lib/basecamp/generated/types.rb', line 286 def to_json(*args) to_h.to_json(*args) end |