Class: Basecamp::Types::Tool
- Inherits:
-
Object
- Object
- Basecamp::Types::Tool
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Tool
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#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 = {}) ⇒ Tool
constructor
A new instance of Tool.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Tool
Returns a new instance of Tool.
4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 |
# File 'lib/basecamp/generated/types.rb', line 4564 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @enabled = parse_boolean(data["enabled"]) @id = parse_integer(data["id"]) @name = data["name"] @title = data["title"] @updated_at = parse_datetime(data["updated_at"]) @app_url = data["app_url"] @bucket = parse_type(data["bucket"], "RecordingBucket") @position = parse_integer(data["position"]) @status = data["status"] @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def app_url @app_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def bucket @bucket end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def created_at @created_at end |
#enabled ⇒ Object
Returns the value of attribute enabled.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def position @position end |
#status ⇒ Object
Returns the value of attribute status.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4557 4558 4559 |
# File 'lib/basecamp/generated/types.rb', line 4557 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4560 4561 4562 |
# File 'lib/basecamp/generated/types.rb', line 4560 def self.required_fields %i[created_at enabled id name title updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 |
# File 'lib/basecamp/generated/types.rb', line 4578 def to_h { "created_at" => @created_at, "enabled" => @enabled, "id" => @id, "name" => @name, "title" => @title, "updated_at" => @updated_at, "app_url" => @app_url, "bucket" => @bucket, "position" => @position, "status" => @status, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
4594 4595 4596 |
# File 'lib/basecamp/generated/types.rb', line 4594 def to_json(*args) to_h.to_json(*args) end |