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.
3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 |
# File 'lib/basecamp/generated/types.rb', line 3648 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.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def description @description end |
#dock ⇒ Object
Returns the value of attribute dock.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def dock @dock end |
#id ⇒ Object
Returns the value of attribute id.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3641 3642 3643 |
# File 'lib/basecamp/generated/types.rb', line 3641 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3644 3645 3646 |
# File 'lib/basecamp/generated/types.rb', line 3644 def self.required_fields %i[created_at id name updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 |
# File 'lib/basecamp/generated/types.rb', line 3660 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
3674 3675 3676 |
# File 'lib/basecamp/generated/types.rb', line 3674 def to_json(*args) to_h.to_json(*args) end |