Class: Basecamp::Types::MyAssignmentAssignee

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

MyAssignmentAssignee

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ MyAssignmentAssignee

Returns a new instance of MyAssignmentAssignee.



2041
2042
2043
2044
2045
# File 'lib/basecamp/generated/types.rb', line 2041

def initialize(data = {})
  @id = parse_integer(data["id"])
  @avatar_url = data["avatar_url"]
  @name = data["name"]
end

Instance Attribute Details

#avatar_urlObject

Returns the value of attribute avatar_url.



2034
2035
2036
# File 'lib/basecamp/generated/types.rb', line 2034

def avatar_url
  @avatar_url
end

#idObject

Returns the value of attribute id.



2034
2035
2036
# File 'lib/basecamp/generated/types.rb', line 2034

def id
  @id
end

#nameObject

Returns the value of attribute name.



2034
2035
2036
# File 'lib/basecamp/generated/types.rb', line 2034

def name
  @name
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2037
2038
2039
# File 'lib/basecamp/generated/types.rb', line 2037

def self.required_fields
  %i[id].freeze
end

Instance Method Details

#to_hObject



2047
2048
2049
2050
2051
2052
2053
# File 'lib/basecamp/generated/types.rb', line 2047

def to_h
  {
    "id" => @id,
    "avatar_url" => @avatar_url,
    "name" => @name,
  }.compact
end

#to_json(*args) ⇒ Object



2055
2056
2057
# File 'lib/basecamp/generated/types.rb', line 2055

def to_json(*args)
  to_h.to_json(*args)
end