Class: Basecamp::Types::OutOfOfficePerson
- Inherits:
-
Object
- Object
- Basecamp::Types::OutOfOfficePerson
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
OutOfOfficePerson
Instance Attribute Summary collapse
-
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ OutOfOfficePerson
constructor
A new instance of OutOfOfficePerson.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ OutOfOfficePerson
Returns a new instance of OutOfOfficePerson.
2736 2737 2738 2739 2740 |
# File 'lib/basecamp/generated/types.rb', line 2736 def initialize(data = {}) @id = parse_integer(data["id"]) @avatar_url = data["avatar_url"] @name = data["name"] end |
Instance Attribute Details
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
2729 2730 2731 |
# File 'lib/basecamp/generated/types.rb', line 2729 def avatar_url @avatar_url end |
#id ⇒ Object
Returns the value of attribute id.
2729 2730 2731 |
# File 'lib/basecamp/generated/types.rb', line 2729 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2729 2730 2731 |
# File 'lib/basecamp/generated/types.rb', line 2729 def name @name end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2732 2733 2734 |
# File 'lib/basecamp/generated/types.rb', line 2732 def self.required_fields %i[id].freeze end |
Instance Method Details
#to_h ⇒ Object
2742 2743 2744 2745 2746 2747 2748 |
# File 'lib/basecamp/generated/types.rb', line 2742 def to_h { "id" => @id, "avatar_url" => @avatar_url, "name" => @name, }.compact end |
#to_json(*args) ⇒ Object
2750 2751 2752 |
# File 'lib/basecamp/generated/types.rb', line 2750 def to_json(*args) to_h.to_json(*args) end |