Class: Basecamp::Types::Template
- Inherits:
-
Object
- Object
- Basecamp::Types::Template
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Template
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#dock ⇒ Object
Returns the value of attribute dock.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#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 = {}) ⇒ Template
constructor
A new instance of Template.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Template
Returns a new instance of Template.
3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 |
# File 'lib/basecamp/generated/types.rb', line 3390 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @name = data["name"] @updated_at = parse_datetime(data["updated_at"]) @app_url = data["app_url"] @description = data["description"] @dock = parse_array(data["dock"], "DockItem") @status = data["status"] @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def description @description end |
#dock ⇒ Object
Returns the value of attribute dock.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def dock @dock end |
#id ⇒ Object
Returns the value of attribute id.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3383 3384 3385 |
# File 'lib/basecamp/generated/types.rb', line 3383 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3386 3387 3388 |
# File 'lib/basecamp/generated/types.rb', line 3386 def self.required_fields %i[created_at id name updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 |
# File 'lib/basecamp/generated/types.rb', line 3402 def to_h { "created_at" => @created_at, "id" => @id, "name" => @name, "updated_at" => @updated_at, "app_url" => @app_url, "description" => @description, "dock" => @dock, "status" => @status, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
3416 3417 3418 |
# File 'lib/basecamp/generated/types.rb', line 3416 def to_json(*args) to_h.to_json(*args) end |