Class: LWS::Presence::Person
- Inherits:
-
Generic::Model
- Object
- Spyke::Base
- Generic::Model
- LWS::Presence::Person
- Defined in:
- lib/lws/apps/presence.rb
Overview
The person class
Instance Attribute Summary collapse
-
#address ⇒ String?
The address of the person.
-
#appointment_ids ⇒ Array<Appointment>
The IDs of the appointments involving the person.
-
#appointments ⇒ Array<Appointment>
The appointments involving the person.
-
#avatar_storage_id ⇒ String?
The storage ID of the avatar of the person.
-
#avatar_url ⇒ String?
The URL of the avatar of the person.
-
#birthdate ⇒ String?
The birthdate of the person.
-
#city ⇒ String?
The city of the person.
-
#company ⇒ LWS::Auth::Company
The company the person belongs to.
-
#company_id ⇒ Integer
The ID of the company the person belongs to.
-
#company_name ⇒ String
The name of the company the person works for.
-
#country ⇒ String?
The country of the person.
-
#customer_reference ⇒ String?
The customer specific reference for the person.
-
#email ⇒ String?
The email address of the person.
-
#ero ⇒ Boolean
Whether the person is emergency response ceritified.
-
#extra_info ⇒ String?
Some extra info for the person.
-
#import_ref ⇒ String?
Reference of the person in the remote database.
-
#kind ⇒ "employee", "guest"
The person kind.
-
#last_sync ⇒ String?
The last date/time the status was updated via a device or RFID tag.
-
#lat ⇒ Float?
The exact latitude of the person’s location.
-
#location ⇒ Location
The location the person is located at.
-
#location_ancestors_ids ⇒ Array<Integer>
The IDs of the (nesting) locations the person is located at.
-
#location_id ⇒ Integer
The ID of the location the person is located at.
-
#location_status_change_permissions ⇒ Array<"available", "unavailable", "maintenance_cleaning", "maintenance_technical", "permanent_available", "permanent_unavailable", "permanent_maintenance_cleaning", "permanent_maintenance_technical">
The location statuses the person will clear to available on check-in.
-
#long ⇒ Float?
The exact longitude of the person’s location.
-
#name ⇒ String
The name of the person.
-
#people_responsible_for ⇒ Array<Person>
The people the person is responsible for.
-
#people_responsible_for_ids ⇒ Array<Integer>
The IDs of the people the person is responsible for.
-
#person_responsible ⇒ Person?
The person responsible for this person.
-
#person_responsible_id ⇒ Integer?
The ID of the person responsible for this person.
-
#phone_extension ⇒ String
The fixed phonenumber extension of the person.
-
#phone_fixed ⇒ String
The fixed phonenumber of the person.
-
#phone_mobile ⇒ String
The mobile phonenumber of the person.
-
#picture_url ⇒ String?
deprecated
Deprecated.
Unauthenticated retrieval of the picture will not longer be supported in upcoming releases of LWS. Use #avatar_url instead!
-
#present ⇒ Boolean
If a person is present at a location.
-
#rfid ⇒ String?
The RFID tag ID linked to the person.
-
#status ⇒ "available", ...
The presence status of the person.
-
#udid ⇒ String?
The unique device ID (e.g. of a mobile phone) linked to the person.
-
#vehicle_registration_plate ⇒ String?
The vehicle registration plate of the persons transport.
-
#visibility ⇒ "public", "private"
If a person should be protected by not showing critical information.
-
#zip_code ⇒ String?
The zip code of the person.
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
#address ⇒ String?
Returns the address of the person.
502 |
# File 'lib/lws/apps/presence.rb', line 502 attribute :address |
#appointment_ids ⇒ Array<Appointment>
Returns the IDs of the appointments involving the person.
507 |
# File 'lib/lws/apps/presence.rb', line 507 attribute :appointment_ids |
#appointments ⇒ Array<Appointment>
Returns the appointments involving the person.
511 |
# File 'lib/lws/apps/presence.rb', line 511 has_many :appointments |
#avatar_storage_id ⇒ String?
Returns the storage ID of the avatar of the person.
515 |
# File 'lib/lws/apps/presence.rb', line 515 attribute :avatar_storage_id |
#avatar_url ⇒ String?
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.
522 |
# File 'lib/lws/apps/presence.rb', line 522 attribute :avatar_url |
#birthdate ⇒ String?
Returns the birthdate of the person.
526 |
# File 'lib/lws/apps/presence.rb', line 526 attribute :birthdate |
#city ⇒ String?
Returns the city of the person.
530 |
# File 'lib/lws/apps/presence.rb', line 530 attribute :city |
#company ⇒ LWS::Auth::Company
Returns the company the person belongs to.
538 |
# File 'lib/lws/apps/presence.rb', line 538 belongs_to :company, class_name: "LWS::Auth::Company" |
#company_id ⇒ Integer
Returns the ID of the company the person belongs to.
542 |
# File 'lib/lws/apps/presence.rb', line 542 attribute :company_id |
#company_name ⇒ String
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.
549 |
# File 'lib/lws/apps/presence.rb', line 549 attribute :company_name |
#country ⇒ String?
Returns the country of the person.
534 |
# File 'lib/lws/apps/presence.rb', line 534 attribute :country |
#customer_reference ⇒ String?
Returns the customer specific reference for the person.
553 |
# File 'lib/lws/apps/presence.rb', line 553 attribute :customer_reference |
#email ⇒ String?
Returns the email address of the person.
557 |
# File 'lib/lws/apps/presence.rb', line 557 attribute :email |
#ero ⇒ Boolean
Returns whether the person is emergency response ceritified.
562 |
# File 'lib/lws/apps/presence.rb', line 562 attribute :ero |
#extra_info ⇒ String?
Returns some extra info for the person.
566 |
# File 'lib/lws/apps/presence.rb', line 566 attribute :extra_info |
#import_ref ⇒ String?
Returns reference of the person in the remote database.
570 |
# File 'lib/lws/apps/presence.rb', line 570 attribute :import_ref |
#kind ⇒ "employee", "guest"
Returns the person kind.
574 |
# File 'lib/lws/apps/presence.rb', line 574 attribute :kind |
#last_sync ⇒ String?
Returns the last date/time the status was updated via a device or RFID tag.
579 |
# File 'lib/lws/apps/presence.rb', line 579 attribute :last_sync |
#lat ⇒ Float?
Returns the exact latitude of the person’s location.
583 |
# File 'lib/lws/apps/presence.rb', line 583 attribute :lat |
#location ⇒ Location
Returns the location the person is located at.
587 |
# File 'lib/lws/apps/presence.rb', line 587 belongs_to :location |
#location_ancestors_ids ⇒ Array<Integer>
Returns the IDs of the (nesting) locations the person is located at.
592 |
# File 'lib/lws/apps/presence.rb', line 592 attribute :location_ancestor_ids |
#location_id ⇒ Integer
Returns the ID of the location the person is located at.
596 |
# File 'lib/lws/apps/presence.rb', line 596 attribute :location_id |
#location_status_change_permissions ⇒ Array<"available", "unavailable", "maintenance_cleaning", "maintenance_technical", "permanent_available", "permanent_unavailable", "permanent_maintenance_cleaning", "permanent_maintenance_technical">
Returns the location statuses the person will clear to available on check-in.
604 |
# File 'lib/lws/apps/presence.rb', line 604 attribute :location_status_change_permissions |
#long ⇒ Float?
Returns the exact longitude of the person’s location.
608 |
# File 'lib/lws/apps/presence.rb', line 608 attribute :long |
#name ⇒ String
Returns the name of the person.
612 |
# File 'lib/lws/apps/presence.rb', line 612 attribute :name |
#people_responsible_for ⇒ Array<Person>
Returns the people the person is responsible for.
621 |
# File 'lib/lws/apps/presence.rb', line 621 has_many :people_responsible_for, class_name: "LWS::Presence::Person" |
#people_responsible_for_ids ⇒ Array<Integer>
Returns the IDs of the people the person is responsible for.
617 |
# File 'lib/lws/apps/presence.rb', line 617 attribute :people_responsible_for_ids |
#person_responsible ⇒ Person?
Returns the person responsible for this person.
625 626 627 |
# File 'lib/lws/apps/presence.rb', line 625 belongs_to :person_responsible, class_name: "LWS::Presence::Person", foreign_key: "person_responsible_id", uri: "people/:id" |
#person_responsible_id ⇒ Integer?
Returns the ID of the person responsible for this person.
631 |
# File 'lib/lws/apps/presence.rb', line 631 attribute :person_responsible_id |
#phone_extension ⇒ String
Returns the fixed phonenumber extension of the person.
635 |
# File 'lib/lws/apps/presence.rb', line 635 attribute :phone_extension |
#phone_fixed ⇒ String
Returns the fixed phonenumber of the person.
639 |
# File 'lib/lws/apps/presence.rb', line 639 attribute :phone_fixed |
#phone_mobile ⇒ String
Returns the mobile phonenumber of the person.
643 |
# File 'lib/lws/apps/presence.rb', line 643 attribute :phone_mobile |
#picture_url ⇒ String?
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.
650 |
# File 'lib/lws/apps/presence.rb', line 650 attribute :picture_url |
#present ⇒ Boolean
Returns if a person is present at a location. It looks at the state of a person so that local state checking is not needed.
656 |
# File 'lib/lws/apps/presence.rb', line 656 attribute :present |
#rfid ⇒ String?
Returns the RFID tag ID linked to the person.
660 |
# File 'lib/lws/apps/presence.rb', line 660 attribute :rfid |
#status ⇒ "available", ...
Returns the presence status of the person.
665 |
# File 'lib/lws/apps/presence.rb', line 665 attribute :status |
#udid ⇒ String?
Returns the unique device ID (e.g. of a mobile phone) linked to the person.
670 |
# File 'lib/lws/apps/presence.rb', line 670 attribute :udid |
#vehicle_registration_plate ⇒ String?
Returns The vehicle registration plate of the persons transport.
675 |
# File 'lib/lws/apps/presence.rb', line 675 attribute :vehicle_registration_plate |
#visibility ⇒ "public", "private"
Returns if a person should be protected by not showing critical information.
680 |
# File 'lib/lws/apps/presence.rb', line 680 attribute :visibility |
#zip_code ⇒ String?
Returns the zip code of the person.
684 |
# File 'lib/lws/apps/presence.rb', line 684 attribute :zip_code |