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.
3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 |
# File 'lib/basecamp/generated/types.rb', line 3896 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.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def app_url @app_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def bucket @bucket end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def created_at @created_at end |
#enabled ⇒ Object
Returns the value of attribute enabled.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def position @position end |
#status ⇒ Object
Returns the value of attribute status.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
3889 3890 3891 |
# File 'lib/basecamp/generated/types.rb', line 3889 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
3892 3893 3894 |
# File 'lib/basecamp/generated/types.rb', line 3892 def self.required_fields %i[created_at enabled id name title updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 |
# File 'lib/basecamp/generated/types.rb', line 3910 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
3926 3927 3928 |
# File 'lib/basecamp/generated/types.rb', line 3926 def to_json(*args) to_h.to_json(*args) end |