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.
2674 2675 2676 2677 2678 2679 2680 2681 |
# File 'lib/basecamp/generated/types.rb', line 2674 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.
2672 2673 2674 |
# File 'lib/basecamp/generated/types.rb', line 2672 def back_on_date @back_on_date end |
#enabled ⇒ Object
Returns the value of attribute enabled.
2672 2673 2674 |
# File 'lib/basecamp/generated/types.rb', line 2672 def enabled @enabled end |
#end_date ⇒ Object
Returns the value of attribute end_date.
2672 2673 2674 |
# File 'lib/basecamp/generated/types.rb', line 2672 def end_date @end_date end |
#ongoing ⇒ Object
Returns the value of attribute ongoing.
2672 2673 2674 |
# File 'lib/basecamp/generated/types.rb', line 2672 def ongoing @ongoing end |
#person ⇒ Object
Returns the value of attribute person.
2672 2673 2674 |
# File 'lib/basecamp/generated/types.rb', line 2672 def person @person end |
#start_date ⇒ Object
Returns the value of attribute start_date.
2672 2673 2674 |
# File 'lib/basecamp/generated/types.rb', line 2672 def start_date @start_date end |
Instance Method Details
#to_h ⇒ Object
2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 |
# File 'lib/basecamp/generated/types.rb', line 2683 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
2694 2695 2696 |
# File 'lib/basecamp/generated/types.rb', line 2694 def to_json(*args) to_h.to_json(*args) end |