Class: Basecamp::Types::Calendar
- Inherits:
-
Object
- Object
- Basecamp::Types::Calendar
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Calendar
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#color ⇒ Object
Returns the value of attribute color.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#schedule_url ⇒ Object
Returns the value of attribute schedule_url.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Calendar
constructor
A new instance of Calendar.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Calendar
Returns a new instance of Calendar.
373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/basecamp/generated/types.rb', line 373 def initialize(data = {}) @app_url = data["app_url"] @color = data["color"] @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @name = data["name"] @schedule_url = data["schedule_url"] @type = data["type"] @updated_at = parse_datetime(data["updated_at"]) @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def app_url @app_url end |
#color ⇒ Object
Returns the value of attribute color.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def color @color end |
#created_at ⇒ Object
Returns the value of attribute created_at.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def name @name end |
#schedule_url ⇒ Object
Returns the value of attribute schedule_url.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def schedule_url @schedule_url end |
#type ⇒ Object
Returns the value of attribute type.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
366 367 368 |
# File 'lib/basecamp/generated/types.rb', line 366 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
369 370 371 |
# File 'lib/basecamp/generated/types.rb', line 369 def self.required_fields %i[app_url color created_at id name schedule_url type updated_at url].freeze end |
Instance Method Details
#to_h ⇒ Object
385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/basecamp/generated/types.rb', line 385 def to_h { "app_url" => @app_url, "color" => @color, "created_at" => @created_at, "id" => @id, "name" => @name, "schedule_url" => @schedule_url, "type" => @type, "updated_at" => @updated_at, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
399 400 401 |
# File 'lib/basecamp/generated/types.rb', line 399 def to_json(*args) to_h.to_json(*args) end |