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.
2395 2396 2397 2398 2399 2400 2401 2402 |
# File 'lib/basecamp/generated/types.rb', line 2395 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.
2393 2394 2395 |
# File 'lib/basecamp/generated/types.rb', line 2393 def back_on_date @back_on_date end |
#enabled ⇒ Object
Returns the value of attribute enabled.
2393 2394 2395 |
# File 'lib/basecamp/generated/types.rb', line 2393 def enabled @enabled end |
#end_date ⇒ Object
Returns the value of attribute end_date.
2393 2394 2395 |
# File 'lib/basecamp/generated/types.rb', line 2393 def end_date @end_date end |
#ongoing ⇒ Object
Returns the value of attribute ongoing.
2393 2394 2395 |
# File 'lib/basecamp/generated/types.rb', line 2393 def ongoing @ongoing end |
#person ⇒ Object
Returns the value of attribute person.
2393 2394 2395 |
# File 'lib/basecamp/generated/types.rb', line 2393 def person @person end |
#start_date ⇒ Object
Returns the value of attribute start_date.
2393 2394 2395 |
# File 'lib/basecamp/generated/types.rb', line 2393 def start_date @start_date end |
Instance Method Details
#to_h ⇒ Object
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 |
# File 'lib/basecamp/generated/types.rb', line 2404 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
2415 2416 2417 |
# File 'lib/basecamp/generated/types.rb', line 2415 def to_json(*args) to_h.to_json(*args) end |