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.
2060 2061 2062 |
# File 'lib/basecamp/generated/types.rb', line 2060 def initialize(data = {}) @enabled = parse_boolean(data["enabled"]) end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
2053 2054 2055 |
# File 'lib/basecamp/generated/types.rb', line 2053 def enabled @enabled end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2056 2057 2058 |
# File 'lib/basecamp/generated/types.rb', line 2056 def self.required_fields %i[enabled].freeze end |
Instance Method Details
#to_h ⇒ Object
2064 2065 2066 2067 2068 |
# File 'lib/basecamp/generated/types.rb', line 2064 def to_h { "enabled" => @enabled, }.compact end |
#to_json(*args) ⇒ Object
2070 2071 2072 |
# File 'lib/basecamp/generated/types.rb', line 2070 def to_json(*args) to_h.to_json(*args) end |