Class: Basecamp::Types::OutOfOfficePayload
- Inherits:
-
Object
- Object
- Basecamp::Types::OutOfOfficePayload
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
OutOfOfficePayload
Instance Attribute Summary collapse
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ OutOfOfficePayload
constructor
A new instance of OutOfOfficePayload.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ OutOfOfficePayload
Returns a new instance of OutOfOfficePayload.
2233 2234 2235 2236 |
# File 'lib/basecamp/generated/types.rb', line 2233 def initialize(data = {}) @end_date = data["end_date"] @start_date = data["start_date"] end |
Instance Attribute Details
#end_date ⇒ Object
Returns the value of attribute end_date.
2226 2227 2228 |
# File 'lib/basecamp/generated/types.rb', line 2226 def end_date @end_date end |
#start_date ⇒ Object
Returns the value of attribute start_date.
2226 2227 2228 |
# File 'lib/basecamp/generated/types.rb', line 2226 def start_date @start_date end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2229 2230 2231 |
# File 'lib/basecamp/generated/types.rb', line 2229 def self.required_fields %i[end_date start_date].freeze end |
Instance Method Details
#to_h ⇒ Object
2238 2239 2240 2241 2242 2243 |
# File 'lib/basecamp/generated/types.rb', line 2238 def to_h { "end_date" => @end_date, "start_date" => @start_date, }.compact end |
#to_json(*args) ⇒ Object
2245 2246 2247 |
# File 'lib/basecamp/generated/types.rb', line 2245 def to_json(*args) to_h.to_json(*args) end |