Class: Basecamp::Types::GaugeTogglePayload
- Inherits:
-
Object
- Object
- Basecamp::Types::GaugeTogglePayload
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
GaugeTogglePayload
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ GaugeTogglePayload
constructor
A new instance of GaugeTogglePayload.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ GaugeTogglePayload
Returns a new instance of GaugeTogglePayload.
1648 1649 1650 |
# File 'lib/basecamp/generated/types.rb', line 1648 def initialize(data = {}) @enabled = parse_boolean(data["enabled"]) end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
1641 1642 1643 |
# File 'lib/basecamp/generated/types.rb', line 1641 def enabled @enabled end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1644 1645 1646 |
# File 'lib/basecamp/generated/types.rb', line 1644 def self.required_fields %i[enabled].freeze end |
Instance Method Details
#to_h ⇒ Object
1652 1653 1654 1655 1656 |
# File 'lib/basecamp/generated/types.rb', line 1652 def to_h { "enabled" => @enabled, }.compact end |
#to_json(*args) ⇒ Object
1658 1659 1660 |
# File 'lib/basecamp/generated/types.rb', line 1658 def to_json(*args) to_h.to_json(*args) end |