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.
3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 |
# File 'lib/basecamp/generated/types.rb', line 3927 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.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def description @description end |
#dock ⇒ Object
Returns the value of attribute dock.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def dock @dock end |
#id ⇒ Object
Returns the value of attribute id.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3920 3921 3922 |
# File 'lib/basecamp/generated/types.rb', line 3920 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3923 3924 3925 |
# File 'lib/basecamp/generated/types.rb', line 3923 def self.required_fields %i[created_at id name updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 |
# File 'lib/basecamp/generated/types.rb', line 3939 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
3953 3954 3955 |
# File 'lib/basecamp/generated/types.rb', line 3953 def to_json(*args) to_h.to_json(*args) end |