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.
1812 1813 1814 |
# File 'lib/basecamp/generated/types.rb', line 1812 def initialize(data = {}) @enabled = parse_boolean(data["enabled"]) end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
1805 1806 1807 |
# File 'lib/basecamp/generated/types.rb', line 1805 def enabled @enabled end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1808 1809 1810 |
# File 'lib/basecamp/generated/types.rb', line 1808 def self.required_fields %i[enabled].freeze end |
Instance Method Details
#to_h ⇒ Object
1816 1817 1818 1819 1820 |
# File 'lib/basecamp/generated/types.rb', line 1816 def to_h { "enabled" => @enabled, }.compact end |
#to_json(*args) ⇒ Object
1822 1823 1824 |
# File 'lib/basecamp/generated/types.rb', line 1822 def to_json(*args) to_h.to_json(*args) end |