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.
411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/basecamp/generated/types.rb', line 411 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.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def app_url @app_url end |
#color ⇒ Object
Returns the value of attribute color.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def color @color end |
#created_at ⇒ Object
Returns the value of attribute created_at.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def name @name end |
#schedule_url ⇒ Object
Returns the value of attribute schedule_url.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def schedule_url @schedule_url end |
#type ⇒ Object
Returns the value of attribute type.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
404 405 406 |
# File 'lib/basecamp/generated/types.rb', line 404 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
407 408 409 |
# File 'lib/basecamp/generated/types.rb', line 407 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
423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/basecamp/generated/types.rb', line 423 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
437 438 439 |
# File 'lib/basecamp/generated/types.rb', line 437 def to_json(*args) to_h.to_json(*args) end |