Class: Basecamp::Types::Bookmark
- Inherits:
-
Object
- Object
- Basecamp::Types::Bookmark
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Bookmark
Instance Attribute Summary collapse
-
#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.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Bookmark
constructor
A new instance of Bookmark.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Bookmark
Returns a new instance of Bookmark.
268 269 270 271 272 273 |
# File 'lib/basecamp/generated/types.rb', line 268 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @recording = parse_type(data["recording"], "Recording") @updated_at = parse_datetime(data["updated_at"]) end |
Instance Attribute Details
#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 |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
261 262 263 |
# File 'lib/basecamp/generated/types.rb', line 261 def updated_at @updated_at 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 recording updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
275 276 277 278 279 280 281 282 |
# File 'lib/basecamp/generated/types.rb', line 275 def to_h { "created_at" => @created_at, "id" => @id, "recording" => @recording, "updated_at" => @updated_at, }.compact end |
#to_json(*args) ⇒ Object
284 285 286 |
# File 'lib/basecamp/generated/types.rb', line 284 def to_json(*args) to_h.to_json(*args) end |