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.



2453
2454
2455
2456
2457
# File 'lib/basecamp/generated/types.rb', line 2453

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.



2446
2447
2448
# File 'lib/basecamp/generated/types.rb', line 2446

def avatar_url
  @avatar_url
end

#idObject

Returns the value of attribute id.



2446
2447
2448
# File 'lib/basecamp/generated/types.rb', line 2446

def id
  @id
end

#nameObject

Returns the value of attribute name.



2446
2447
2448
# File 'lib/basecamp/generated/types.rb', line 2446

def name
  @name
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2449
2450
2451
# File 'lib/basecamp/generated/types.rb', line 2449

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

Instance Method Details

#to_hObject



2459
2460
2461
2462
2463
2464
2465
# File 'lib/basecamp/generated/types.rb', line 2459

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

#to_json(*args) ⇒ Object



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

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