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?



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

attribute :address

#appointmentsArray<Appointment>



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

has_many :appointments

#avatar_storage_idString?



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

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.



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

attribute :avatar_url

#birthdateString?



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

attribute :birthdate

#cityString?



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

attribute :city

#companyLWS::Auth::Company



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

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

#company_idInteger



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

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.



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

attribute :company_name

#countryString?



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

attribute :country

#customer_referenceString?



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

attribute :customer_reference

#emailString?



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

attribute :email

#eroBoolean



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

attribute :ero

#extra_infoString?



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

attribute :extra_info

#import_refString?



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

attribute :import_ref

#kind"employee", "guest"



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

attribute :kind

#last_syncString?



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

attribute :last_sync

#latFloat?



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

attribute :lat

#locationLocation



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

belongs_to :location

#location_ancestors_idsArray<Integer>



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

attribute :location_ancestor_ids

#location_idInteger



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

attribute :location_id

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



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

attribute :location_status_change_permissions

#longFloat?



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

attribute :long

#nameString



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

attribute :name

#people_responsible_forArray<Person>



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

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

#person_responsiblePerson?



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

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

#person_responsible_idInteger?



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

attribute :person_responsible_id

#phone_extensionString



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

attribute :phone_extension

#phone_fixedString



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

attribute :phone_fixed

#phone_mobileString



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

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.



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

attribute :picture_url

#presentBoolean



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

attribute :present

#rfidString?



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

attribute :rfid

#status"available", ...



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

attribute :status

#udidString?



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

attribute :udid

#vehicle_registration_plateString?



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

attribute :vehicle_registration_plate

#visibility"public", "private"



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

attribute :visibility

#zip_codeString?



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

attribute :zip_code