Class: Basecamp::Types::OutOfOfficePerson

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

Overview

OutOfOfficePerson

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ OutOfOfficePerson

Returns a new instance of OutOfOfficePerson.



2424
2425
2426
2427
2428
# File 'lib/basecamp/generated/types.rb', line 2424

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.



2417
2418
2419
# File 'lib/basecamp/generated/types.rb', line 2417

def avatar_url
  @avatar_url
end

#idObject

Returns the value of attribute id.



2417
2418
2419
# File 'lib/basecamp/generated/types.rb', line 2417

def id
  @id
end

#nameObject

Returns the value of attribute name.



2417
2418
2419
# File 'lib/basecamp/generated/types.rb', line 2417

def name
  @name
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2420
2421
2422
# File 'lib/basecamp/generated/types.rb', line 2420

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

Instance Method Details

#to_hObject



2430
2431
2432
2433
2434
2435
2436
# File 'lib/basecamp/generated/types.rb', line 2430

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

#to_json(*args) ⇒ Object



2438
2439
2440
# File 'lib/basecamp/generated/types.rb', line 2438

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