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.
-
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#position ⇒ Object
Returns the value of attribute position.
-
#status ⇒ Object
Returns the value of attribute status.
-
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
-
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
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.
4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 |
# File 'lib/basecamp/generated/types.rb', line 4833 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @creator = parse_type(data["creator"], "Person") @id = parse_integer(data["id"]) @inherits_status = parse_boolean(data["inherits_status"]) @title = data["title"] @type = data["type"] @updated_at = parse_datetime(data["updated_at"]) @visible_to_clients = parse_boolean(data["visible_to_clients"]) @app_url = data["app_url"] @bookmark_url = data["bookmark_url"] @bucket = parse_type(data["bucket"], "RecordingBucket") @enabled = parse_boolean(data["enabled"]) @name = data["name"] @parent = parse_type(data["parent"], "RecordingParent") @position = parse_integer(data["position"]) @status = data["status"] @subscription_url = data["subscription_url"] @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def bookmark_url @bookmark_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def bucket @bucket end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def creator @creator end |
#enabled ⇒ Object
Returns the value of attribute enabled.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def id @id end |
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def inherits_status @inherits_status end |
#name ⇒ Object
Returns the value of attribute name.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def parent @parent end |
#position ⇒ Object
Returns the value of attribute position.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def position @position end |
#status ⇒ Object
Returns the value of attribute status.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def status @status end |
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def subscription_url @subscription_url end |
#title ⇒ Object
Returns the value of attribute title.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def url @url end |
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
4826 4827 4828 |
# File 'lib/basecamp/generated/types.rb', line 4826 def visible_to_clients @visible_to_clients end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4829 4830 4831 |
# File 'lib/basecamp/generated/types.rb', line 4829 def self.required_fields %i[created_at creator id inherits_status title type updated_at visible_to_clients].freeze end |
Instance Method Details
#to_h ⇒ Object
4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 |
# File 'lib/basecamp/generated/types.rb', line 4854 def to_h { "created_at" => @created_at, "creator" => @creator, "id" => @id, "inherits_status" => @inherits_status, "title" => @title, "type" => @type, "updated_at" => @updated_at, "visible_to_clients" => @visible_to_clients, "app_url" => @app_url, "bookmark_url" => @bookmark_url, "bucket" => @bucket, "enabled" => @enabled, "name" => @name, "parent" => @parent, "position" => @position, "status" => @status, "subscription_url" => @subscription_url, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
4877 4878 4879 |
# File 'lib/basecamp/generated/types.rb', line 4877 def to_json(*args) to_h.to_json(*args) end |