Class: Basecamp::Types::OutOfOffice
- Inherits:
-
Object
- Object
- Basecamp::Types::OutOfOffice
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
OutOfOffice
Instance Attribute Summary collapse
-
#back_on_date ⇒ Object
Returns the value of attribute back_on_date.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#ongoing ⇒ Object
Returns the value of attribute ongoing.
-
#person ⇒ Object
Returns the value of attribute person.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ OutOfOffice
constructor
A new instance of OutOfOffice.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ OutOfOffice
Returns a new instance of OutOfOffice.
2198 2199 2200 2201 2202 2203 2204 2205 |
# File 'lib/basecamp/generated/types.rb', line 2198 def initialize(data = {}) @back_on_date = data["back_on_date"] @enabled = parse_boolean(data["enabled"]) @end_date = data["end_date"] @ongoing = parse_boolean(data["ongoing"]) @person = parse_type(data["person"], "OutOfOfficePerson") @start_date = data["start_date"] end |
Instance Attribute Details
#back_on_date ⇒ Object
Returns the value of attribute back_on_date.
2196 2197 2198 |
# File 'lib/basecamp/generated/types.rb', line 2196 def back_on_date @back_on_date end |
#enabled ⇒ Object
Returns the value of attribute enabled.
2196 2197 2198 |
# File 'lib/basecamp/generated/types.rb', line 2196 def enabled @enabled end |
#end_date ⇒ Object
Returns the value of attribute end_date.
2196 2197 2198 |
# File 'lib/basecamp/generated/types.rb', line 2196 def end_date @end_date end |
#ongoing ⇒ Object
Returns the value of attribute ongoing.
2196 2197 2198 |
# File 'lib/basecamp/generated/types.rb', line 2196 def ongoing @ongoing end |
#person ⇒ Object
Returns the value of attribute person.
2196 2197 2198 |
# File 'lib/basecamp/generated/types.rb', line 2196 def person @person end |
#start_date ⇒ Object
Returns the value of attribute start_date.
2196 2197 2198 |
# File 'lib/basecamp/generated/types.rb', line 2196 def start_date @start_date end |
Instance Method Details
#to_h ⇒ Object
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 |
# File 'lib/basecamp/generated/types.rb', line 2207 def to_h { "back_on_date" => @back_on_date, "enabled" => @enabled, "end_date" => @end_date, "ongoing" => @ongoing, "person" => @person, "start_date" => @start_date, }.compact end |
#to_json(*args) ⇒ Object
2218 2219 2220 |
# File 'lib/basecamp/generated/types.rb', line 2218 def to_json(*args) to_h.to_json(*args) end |