Class: Basecamp::Types::MyAssignmentAssignee
- Inherits:
-
Object
- Object
- Basecamp::Types::MyAssignmentAssignee
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
MyAssignmentAssignee
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 = {}) ⇒ MyAssignmentAssignee
constructor
A new instance of MyAssignmentAssignee.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ MyAssignmentAssignee
Returns a new instance of MyAssignmentAssignee.
2682 2683 2684 2685 2686 |
# File 'lib/basecamp/generated/types.rb', line 2682 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.
2675 2676 2677 |
# File 'lib/basecamp/generated/types.rb', line 2675 def avatar_url @avatar_url end |
#id ⇒ Object
Returns the value of attribute id.
2675 2676 2677 |
# File 'lib/basecamp/generated/types.rb', line 2675 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2675 2676 2677 |
# File 'lib/basecamp/generated/types.rb', line 2675 def name @name end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2678 2679 2680 |
# File 'lib/basecamp/generated/types.rb', line 2678 def self.required_fields %i[id].freeze end |
Instance Method Details
#to_h ⇒ Object
2688 2689 2690 2691 2692 2693 2694 |
# File 'lib/basecamp/generated/types.rb', line 2688 def to_h { "id" => @id, "avatar_url" => @avatar_url, "name" => @name, }.compact end |
#to_json(*args) ⇒ Object
2696 2697 2698 |
# File 'lib/basecamp/generated/types.rb', line 2696 def to_json(*args) to_h.to_json(*args) end |