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

#addressString?

Returns the address of the person.

Returns:

  • (String, nil)

    the address of the person



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

attribute :address

#appointment_idsArray<Appointment>

Returns the IDs of the appointments involving the person.

Returns:

  • (Array<Appointment>)

    the IDs of the appointments involving the person



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

attribute :appointment_ids

#appointmentsArray<Appointment>

Returns the appointments involving the person.

Returns:

  • (Array<Appointment>)

    the appointments involving the person



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

has_many :appointments

#avatar_storage_idString?

Returns the storage ID of the avatar of the person.

Returns:

  • (String, nil)

    the storage ID of the avatar of the person



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

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.

Returns:

  • (String, nil)

    the URL of the avatar of the person



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

attribute :avatar_url

#birthdateString?

Returns the birthdate of the person.

Returns:

  • (String, nil)

    the birthdate of the person



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

attribute :birthdate

#cityString?

Returns the city of the person.

Returns:

  • (String, nil)

    the city of the person



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

attribute :city

#companyLWS::Auth::Company

Returns the company the person belongs to.

Returns:



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

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

#company_idInteger

Returns the ID of the company the person belongs to.

Returns:

  • (Integer)

    the ID of the company the person belongs to



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

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.

Returns:

  • (String)

    the name of the company the person works for



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

attribute :company_name

#countryString?

Returns the country of the person.

Returns:

  • (String, nil)

    the country of the person



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

attribute :country

#customer_referenceString?

Returns the customer specific reference for the person.

Returns:

  • (String, nil)

    the customer specific reference for the person



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

attribute :customer_reference

#emailString?

Returns the email address of the person.

Returns:

  • (String, nil)

    the email address of the person



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

attribute :email

#eroBoolean

Returns whether the person is emergency response ceritified.

Returns:

  • (Boolean)

    whether the person is emergency response ceritified



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

attribute :ero

#extra_infoString?

Returns some extra info for the person.

Returns:

  • (String, nil)

    some extra info for the person



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

attribute :extra_info

#import_refString?

Returns reference of the person in the remote database.

Returns:

  • (String, nil)

    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.

Returns:

  • ("employee", "guest")

    the person kind



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

attribute :kind

#last_syncString?

Returns the last date/time the status was updated via a device or RFID tag.

Returns:

  • (String, nil)

    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

#latFloat?

Returns the exact latitude of the person’s location.

Returns:

  • (Float, nil)

    the exact latitude of the person’s location



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

attribute :lat

#locationLocation

Returns the location the person is located at.

Returns:

  • (Location)

    the location the person is located at



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

belongs_to :location

#location_ancestors_idsArray<Integer>

Returns the IDs of the (nesting) locations the person is located at.

Returns:

  • (Array<Integer>)

    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_idInteger

Returns the ID of the location the person is located at.

Returns:

  • (Integer)

    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_permissionsArray<"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.

Returns:

  • (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



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

attribute :location_status_change_permissions

#longFloat?

Returns the exact longitude of the person’s location.

Returns:

  • (Float, nil)

    the exact longitude of the person’s location



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

attribute :long

#nameString

Returns the name of the person.

Returns:

  • (String)

    the name of the person



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

attribute :name

#people_responsible_forArray<Person>

Returns the people the person is responsible for.

Returns:

  • (Array<Person>)

    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_idsArray<Integer>

Returns the IDs of the people the person is responsible for.

Returns:

  • (Array<Integer>)

    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_responsiblePerson?

Returns the person responsible for this person.

Returns:

  • (Person, nil)

    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_idInteger?

Returns the ID of the person responsible for this person.

Returns:

  • (Integer, nil)

    the ID of the person responsible for this person



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

attribute :person_responsible_id

#phone_extensionString

Returns the fixed phonenumber extension of the person.

Returns:

  • (String)

    the fixed phonenumber extension of the person



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

attribute :phone_extension

#phone_fixedString

Returns the fixed phonenumber of the person.

Returns:

  • (String)

    the fixed phonenumber of the person



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

attribute :phone_fixed

#phone_mobileString

Returns the mobile phonenumber of the person.

Returns:

  • (String)

    the mobile phonenumber of the person



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

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.

Returns:

  • (String, nil)

    the URL of the picture of the person



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

attribute :picture_url

#presentBoolean

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.

Returns:

  • (Boolean)

    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

#rfidString?

Returns the RFID tag ID linked to the person.

Returns:

  • (String, nil)

    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.

Returns:

  • ("available", "busy", "away", "disabled", nil)

    the presence status of the person



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

attribute :status

#udidString?

Returns the unique device ID (e.g. of a mobile phone) linked to the person.

Returns:

  • (String, nil)

    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_plateString?

Returns The vehicle registration plate of the persons transport.

Returns:

  • (String, nil)

    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.

Returns:

  • ("public", "private")

    if a person should be protected by not showing critical information



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

attribute :visibility

#zip_codeString?

Returns the zip code of the person.

Returns:

  • (String, nil)

    the zip code of the person



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

attribute :zip_code