Class: LWS::Presence::Person

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/presence.rb

Overview

The person class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#appointmentsArray<Appointment>



444
# File 'lib/lws/apps/presence.rb', line 444

has_many :appointments

#avatar_storage_idString?



448
# File 'lib/lws/apps/presence.rb', line 448

attribute :avatar_storage_id

#avatar_urlString?

Note:

To be able retrieve this, the token needs to be passed via X-Token in the HTTP request headers!

Returns the URL of the avatar of the person.



455
# File 'lib/lws/apps/presence.rb', line 455

attribute :avatar_url

#companyLWS::Auth::Company



459
# File 'lib/lws/apps/presence.rb', line 459

belongs_to :company, class_name: "LWS::Auth::Company"

#company_idInteger



463
# File 'lib/lws/apps/presence.rb', line 463

attribute :company_id

#company_nameString

Note:

This is not the name of the company the person belongs to, but possibly a guest/visitor working for another company!

Returns the name of the company the person works for.



470
# File 'lib/lws/apps/presence.rb', line 470

attribute :company_name

#customer_referenceString?



474
# File 'lib/lws/apps/presence.rb', line 474

attribute :customer_reference

#emailString?



478
# File 'lib/lws/apps/presence.rb', line 478

attribute :email

#eroBoolean



483
# File 'lib/lws/apps/presence.rb', line 483

attribute :ero

#extra_infoString?



487
# File 'lib/lws/apps/presence.rb', line 487

attribute :extra_info

#import_refString?



492
# File 'lib/lws/apps/presence.rb', line 492

attribute :import_ref

#kind"employee", "guest"



496
# File 'lib/lws/apps/presence.rb', line 496

attribute :kind

#last_syncString?



501
# File 'lib/lws/apps/presence.rb', line 501

attribute :last_sync

#latFloat?



505
# File 'lib/lws/apps/presence.rb', line 505

attribute :lat

#locationLocation



509
# File 'lib/lws/apps/presence.rb', line 509

belongs_to :location

#location_ancestors_idsArray<Integer>



514
# File 'lib/lws/apps/presence.rb', line 514

attribute :location_ancestor_ids

#location_idInteger



518
# File 'lib/lws/apps/presence.rb', line 518

attribute :location_id

#location_status_change_permissionsArray<"available", "unavailable", "maintenance_cleaning", "maintenance_technical", "permanent_available", "permanent_unavailable", "permanent_maintenance_cleaning", "permanent_maintenance_technical">



526
# File 'lib/lws/apps/presence.rb', line 526

attribute :location_status_change_permissions

#longFloat?



530
# File 'lib/lws/apps/presence.rb', line 530

attribute :long

#nameString



534
# File 'lib/lws/apps/presence.rb', line 534

attribute :name

#people_responsible_forArray<Person>



538
# File 'lib/lws/apps/presence.rb', line 538

has_many :people_responsible_for, class_name: "LWS::Presence::Person"

#person_responsiblePerson?



542
543
544
# File 'lib/lws/apps/presence.rb', line 542

belongs_to :person_responsible, class_name: "LWS::Presence::Person",
foreign_key: "person_responsible_id",
uri: "people/:id"

#person_responsible_idInteger?



548
# File 'lib/lws/apps/presence.rb', line 548

attribute :person_responsible_id

#phone_extensionString



552
# File 'lib/lws/apps/presence.rb', line 552

attribute :phone_extension

#phone_fixedString



556
# File 'lib/lws/apps/presence.rb', line 556

attribute :phone_fixed

#phone_mobileString



560
# File 'lib/lws/apps/presence.rb', line 560

attribute :phone_mobile

#picture_urlString?

Deprecated.

Unauthenticated retrieval of the picture will not longer be supported in upcoming releases of LWS. Use #avatar_url instead!

Returns the URL of the picture of the person.



567
# File 'lib/lws/apps/presence.rb', line 567

attribute :picture_url

#presentBoolean



573
# File 'lib/lws/apps/presence.rb', line 573

attribute :present

#rfidString?



577
# File 'lib/lws/apps/presence.rb', line 577

attribute :rfid

#status"available", ...



582
# File 'lib/lws/apps/presence.rb', line 582

attribute :status

#udidString?



587
# File 'lib/lws/apps/presence.rb', line 587

attribute :udid

#vehicle_registration_plateString?



592
# File 'lib/lws/apps/presence.rb', line 592

attribute :vehicle_registration_plate

#visibility"public", "private"



597
# File 'lib/lws/apps/presence.rb', line 597

attribute :visibility