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.
4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 |
# File 'lib/basecamp/generated/types.rb', line 4160 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.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def description @description end |
#dock ⇒ Object
Returns the value of attribute dock.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def dock @dock end |
#id ⇒ Object
Returns the value of attribute id.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4153 4154 4155 |
# File 'lib/basecamp/generated/types.rb', line 4153 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4156 4157 4158 |
# File 'lib/basecamp/generated/types.rb', line 4156 def self.required_fields %i[created_at id name updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 |
# File 'lib/basecamp/generated/types.rb', line 4172 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
4186 4187 4188 |
# File 'lib/basecamp/generated/types.rb', line 4186 def to_json(*args) to_h.to_json(*args) end |