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.
3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 |
# File 'lib/basecamp/generated/types.rb', line 3615 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.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def description @description end |
#dock ⇒ Object
Returns the value of attribute dock.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def dock @dock end |
#id ⇒ Object
Returns the value of attribute id.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3608 3609 3610 |
# File 'lib/basecamp/generated/types.rb', line 3608 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3611 3612 3613 |
# File 'lib/basecamp/generated/types.rb', line 3611 def self.required_fields %i[created_at id name updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 |
# File 'lib/basecamp/generated/types.rb', line 3627 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
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def to_json(*args) to_h.to_json(*args) end |