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.
230 231 232 233 234 235 |
# File 'lib/basecamp/generated/types.rb', line 230 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.
223 224 225 |
# File 'lib/basecamp/generated/types.rb', line 223 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
223 224 225 |
# File 'lib/basecamp/generated/types.rb', line 223 def id @id end |
#recording ⇒ Object
Returns the value of attribute recording.
223 224 225 |
# File 'lib/basecamp/generated/types.rb', line 223 def recording @recording end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
223 224 225 |
# File 'lib/basecamp/generated/types.rb', line 223 def updated_at @updated_at end |
Class Method Details
.required_fields ⇒ Array<Symbol>
226 227 228 |
# File 'lib/basecamp/generated/types.rb', line 226 def self.required_fields %i[created_at id recording updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
237 238 239 240 241 242 243 244 |
# File 'lib/basecamp/generated/types.rb', line 237 def to_h { "created_at" => @created_at, "id" => @id, "recording" => @recording, "updated_at" => @updated_at, }.compact end |
#to_json(*args) ⇒ Object
246 247 248 |
# File 'lib/basecamp/generated/types.rb', line 246 def to_json(*args) to_h.to_json(*args) end |