Class: Basecamp::Types::Person
- Inherits:
-
Object
- Object
- Basecamp::Types::Person
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Person
Instance Attribute Summary collapse
-
#admin ⇒ Object
Returns the value of attribute admin.
-
#attachable_sgid ⇒ Object
Returns the value of attribute attachable_sgid.
-
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
-
#bio ⇒ Object
Returns the value of attribute bio.
-
#can_access_hill_charts ⇒ Object
Returns the value of attribute can_access_hill_charts.
-
#can_access_timesheet ⇒ Object
Returns the value of attribute can_access_timesheet.
-
#can_manage_people ⇒ Object
Returns the value of attribute can_manage_people.
-
#can_manage_projects ⇒ Object
Returns the value of attribute can_manage_projects.
-
#can_ping ⇒ Object
Returns the value of attribute can_ping.
-
#client ⇒ Object
Returns the value of attribute client.
-
#company ⇒ Object
Returns the value of attribute company.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#employee ⇒ Object
Returns the value of attribute employee.
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#personable_type ⇒ Object
Returns the value of attribute personable_type.
-
#system_label ⇒ Object
Returns the value of attribute system_label.
-
#tagline ⇒ Object
Returns the value of attribute tagline.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Person
constructor
A new instance of Person.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Person
Returns a new instance of Person.
2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 |
# File 'lib/basecamp/generated/types.rb', line 2289 def initialize(data = {}) @id = parse_integer(data["id"]) @system_label = data["system_label"] @name = data["name"] @admin = parse_boolean(data["admin"]) @attachable_sgid = data["attachable_sgid"] @avatar_url = data["avatar_url"] @bio = data["bio"] @can_access_hill_charts = parse_boolean(data["can_access_hill_charts"]) @can_access_timesheet = parse_boolean(data["can_access_timesheet"]) @can_manage_people = parse_boolean(data["can_manage_people"]) @can_manage_projects = parse_boolean(data["can_manage_projects"]) @can_ping = parse_boolean(data["can_ping"]) @client = parse_boolean(data["client"]) @company = parse_type(data["company"], "PersonCompany") @created_at = parse_datetime(data["created_at"]) @email_address = data["email_address"] @employee = parse_boolean(data["employee"]) @location = data["location"] @owner = parse_boolean(data["owner"]) @personable_type = data["personable_type"] @tagline = data["tagline"] @time_zone = data["time_zone"] @title = data["title"] @updated_at = parse_datetime(data["updated_at"]) end |
Instance Attribute Details
#admin ⇒ Object
Returns the value of attribute admin.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def admin @admin end |
#attachable_sgid ⇒ Object
Returns the value of attribute attachable_sgid.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def attachable_sgid @attachable_sgid end |
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def avatar_url @avatar_url end |
#bio ⇒ Object
Returns the value of attribute bio.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def bio @bio end |
#can_access_hill_charts ⇒ Object
Returns the value of attribute can_access_hill_charts.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def can_access_hill_charts @can_access_hill_charts end |
#can_access_timesheet ⇒ Object
Returns the value of attribute can_access_timesheet.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def can_access_timesheet @can_access_timesheet end |
#can_manage_people ⇒ Object
Returns the value of attribute can_manage_people.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def can_manage_people @can_manage_people end |
#can_manage_projects ⇒ Object
Returns the value of attribute can_manage_projects.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def can_manage_projects @can_manage_projects end |
#can_ping ⇒ Object
Returns the value of attribute can_ping.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def can_ping @can_ping end |
#client ⇒ Object
Returns the value of attribute client.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def client @client end |
#company ⇒ Object
Returns the value of attribute company.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def company @company end |
#created_at ⇒ Object
Returns the value of attribute created_at.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def created_at @created_at end |
#email_address ⇒ Object
Returns the value of attribute email_address.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def email_address @email_address end |
#employee ⇒ Object
Returns the value of attribute employee.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def employee @employee end |
#id ⇒ Object
Returns the value of attribute id.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def id @id end |
#location ⇒ Object
Returns the value of attribute location.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def owner @owner end |
#personable_type ⇒ Object
Returns the value of attribute personable_type.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def personable_type @personable_type end |
#system_label ⇒ Object
Returns the value of attribute system_label.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def system_label @system_label end |
#tagline ⇒ Object
Returns the value of attribute tagline.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def tagline @tagline end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def time_zone @time_zone end |
#title ⇒ Object
Returns the value of attribute title.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
2282 2283 2284 |
# File 'lib/basecamp/generated/types.rb', line 2282 def updated_at @updated_at end |
Class Method Details
.required_fields ⇒ Array<Symbol>
2285 2286 2287 |
# File 'lib/basecamp/generated/types.rb', line 2285 def self.required_fields %i[id name].freeze end |
Instance Method Details
#to_h ⇒ Object
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 |
# File 'lib/basecamp/generated/types.rb', line 2316 def to_h { "id" => @id, "name" => @name, "admin" => @admin, "attachable_sgid" => @attachable_sgid, "avatar_url" => @avatar_url, "bio" => @bio, "can_access_hill_charts" => @can_access_hill_charts, "can_access_timesheet" => @can_access_timesheet, "can_manage_people" => @can_manage_people, "can_manage_projects" => @can_manage_projects, "can_ping" => @can_ping, "client" => @client, "company" => @company, "created_at" => @created_at, "email_address" => @email_address, "employee" => @employee, "location" => @location, "owner" => @owner, "personable_type" => @personable_type, "tagline" => @tagline, "time_zone" => @time_zone, "title" => @title, "updated_at" => @updated_at, }.compact end |
#to_json(*args) ⇒ Object
2344 2345 2346 |
# File 'lib/basecamp/generated/types.rb', line 2344 def to_json(*args) to_h.to_json(*args) end |