Class: Basecamp::Types::Gauge
- Inherits:
-
Object
- Object
- Basecamp::Types::Gauge
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Gauge
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.
-
#description ⇒ Object
Returns the value of attribute description.
-
#description_attachments ⇒ Object
Returns the value of attribute description_attachments.
-
#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.
-
#last_needle_color ⇒ Object
Returns the value of attribute last_needle_color.
-
#last_needle_position ⇒ Object
Returns the value of attribute last_needle_position.
-
#previous_needle_position ⇒ Object
Returns the value of attribute previous_needle_position.
-
#status ⇒ Object
Returns the value of attribute status.
-
#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 = {}) ⇒ Gauge
constructor
A new instance of Gauge.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Gauge
Returns a new instance of Gauge.
1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 |
# File 'lib/basecamp/generated/types.rb', line 1469 def initialize(data = {}) @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @updated_at = parse_datetime(data["updated_at"]) @app_url = data["app_url"] @bookmark_url = data["bookmark_url"] @bucket = parse_type(data["bucket"], "RecordingBucket") @creator = parse_type(data["creator"], "Person") @description = data["description"] @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment") @enabled = parse_boolean(data["enabled"]) @inherits_status = parse_boolean(data["inherits_status"]) @last_needle_color = data["last_needle_color"] @last_needle_position = parse_integer(data["last_needle_position"]) @previous_needle_position = parse_integer(data["previous_needle_position"]) @status = data["status"] @title = data["title"] @type = data["type"] @url = data["url"] @visible_to_clients = parse_boolean(data["visible_to_clients"]) end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def bookmark_url @bookmark_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def bucket @bucket end |
#created_at ⇒ Object
Returns the value of attribute created_at.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def creator @creator end |
#description ⇒ Object
Returns the value of attribute description.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def description @description end |
#description_attachments ⇒ Object
Returns the value of attribute description_attachments.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def @description_attachments end |
#enabled ⇒ Object
Returns the value of attribute enabled.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def id @id end |
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def inherits_status @inherits_status end |
#last_needle_color ⇒ Object
Returns the value of attribute last_needle_color.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def last_needle_color @last_needle_color end |
#last_needle_position ⇒ Object
Returns the value of attribute last_needle_position.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def last_needle_position @last_needle_position end |
#previous_needle_position ⇒ Object
Returns the value of attribute previous_needle_position.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def previous_needle_position @previous_needle_position end |
#status ⇒ Object
Returns the value of attribute status.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def url @url end |
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
1462 1463 1464 |
# File 'lib/basecamp/generated/types.rb', line 1462 def visible_to_clients @visible_to_clients end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1465 1466 1467 |
# File 'lib/basecamp/generated/types.rb', line 1465 def self.required_fields %i[created_at id updated_at].freeze end |
Instance Method Details
#to_h ⇒ Object
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 |
# File 'lib/basecamp/generated/types.rb', line 1491 def to_h { "created_at" => @created_at, "id" => @id, "updated_at" => @updated_at, "app_url" => @app_url, "bookmark_url" => @bookmark_url, "bucket" => @bucket, "creator" => @creator, "description" => @description, "description_attachments" => @description_attachments, "enabled" => @enabled, "inherits_status" => @inherits_status, "last_needle_color" => @last_needle_color, "last_needle_position" => @last_needle_position, "previous_needle_position" => @previous_needle_position, "status" => @status, "title" => @title, "type" => @type, "url" => @url, "visible_to_clients" => @visible_to_clients, }.compact end |
#to_json(*args) ⇒ Object
1515 1516 1517 |
# File 'lib/basecamp/generated/types.rb', line 1515 def to_json(*args) to_h.to_json(*args) end |