Class: LWS::Presence::Location
- Inherits:
-
Generic::Model
- Object
- Spyke::Base
- Generic::Model
- LWS::Presence::Location
- Defined in:
- lib/lws/apps/presence.rb
Overview
The location class
Defined Under Namespace
Classes: Map
Instance Attribute Summary collapse
-
#ancestor_ids ⇒ Array<Integer>
The ID of the locations that containt the location, including the location itself.
-
#appointment_ids ⇒ Array<Integer>
The IDs of the appointments taking place at the location.
-
#appointments ⇒ Array<Appointment>
The appointments taking place at the location.
-
#capacity ⇒ Integer
The capacity (maximum number of people) of the location.
-
#capacity_tree ⇒ Integer
The capacity (maximum number of people) of the location including descendant locations.
-
#capacity_used ⇒ Integer
The used capacity (present number of people) of the location.
-
#capacity_used_percentage ⇒ Float
The used capacity percentage of the location.
-
#capacity_used_percentage_tree ⇒ Float
The used capacity percentage of the location including descendant locations.
-
#capacity_used_tree ⇒ Integer
The used capacity (present number of people) of the location including descendant locations.
-
#checkin_status ⇒ "available", ...
The presence status to set people to when checking in.
-
#checkout_alter_status ⇒ "available", ...
The status to set the location to when someone checks out.
-
#checkout_location ⇒ Location?
The location to move people to when they are checked out.
-
#checkout_location_id ⇒ Integer?
The ID of the location to move people to when they are checked out.
-
#company ⇒ LWS::Auth::Company
The company the location belongs to.
-
#company_id ⇒ Integer
The ID of the company the location belongs to.
-
#descendant_ids ⇒ Array<Integer>
The IDs of the underlying locations of the location.
-
#image_storage_id ⇒ String?
The storage ID of the image of the location.
-
#image_url ⇒ String?
The URL of the image of the location.
-
#import_ref ⇒ String?
Reference of the location in the remote database.
-
#invite_remarks ⇒ String?
The remarks to add when sending invites for appointments involving the location.
-
#journal_ids ⇒ Array<Integer>
The IDs of the journal (entries) associated with the location.
-
#journals ⇒ Array<Journal>
The journal (entries) associated with the location.
-
#lat ⇒ Float
The latitude of the location.
-
#logoff_time ⇒ String
The format of the time is
HH:MM
and should be interpreted in the time zone of the location (see also #time_zone). -
#long ⇒ Float
The longitude of the location.
-
#map_ids ⇒ Array<Integer>
The IDs of the maps for this location.
-
#map_position_ids ⇒ Array<Integer>
The IDs of the location map positions that track this location.
-
#map_positions ⇒ Array<Location::Map::Position>
The location map positions that track this location.
-
#maps ⇒ Array<Location::Map>
The maps for this location.
-
#name ⇒ String
The name of the location.
-
#owner ⇒ Person?
The owner of the location.
-
#owner_id ⇒ Fixnum?
The ID of the owner of the location.
-
#parent ⇒ Location
The parent of the location.
-
#parent_id ⇒ Integer
The ID of the parent of the location.
-
#people ⇒ Array<Person>
The people associated with the location.
-
#people_tree ⇒ Array<Person>
The people associated with the location including descendant locations.
-
#people_tree_ids ⇒ Array<Integer>
location including descendant locations.
-
#person_ids ⇒ Array<Integer>
The IDs of the people associated with the location.
-
#range ⇒ Integer
The range around the location in meters.
-
#reader_ids ⇒ Array<Integer>
The IDs of the (RFID/code/ID/…) readers linked to this location.
-
#readers ⇒ Array<Reader>
The (RFID/code/ID/…) readers linked to this location.
-
#reservation_required ⇒ Boolean
Whether a reservation is required for checking in to this location.
-
#status ⇒ "available", ...
The status of the location.
-
#time_zone ⇒ String
The time zone of the location.
-
#uuid ⇒ String
The UUID of the location.
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
#ancestor_ids ⇒ Array<Integer>
Returns the ID of the locations that containt the location, including the location itself.
143 |
# File 'lib/lws/apps/presence.rb', line 143 attribute :ancestor_ids |
#appointment_ids ⇒ Array<Integer>
Returns the IDs of the appointments taking place at the location.
148 |
# File 'lib/lws/apps/presence.rb', line 148 attribute :appointment_ids |
#appointments ⇒ Array<Appointment>
Returns the appointments taking place at the location.
152 |
# File 'lib/lws/apps/presence.rb', line 152 has_many :appointments |
#capacity ⇒ Integer
Returns the capacity (maximum number of people) of the location.
156 |
# File 'lib/lws/apps/presence.rb', line 156 attribute :capacity |
#capacity_tree ⇒ Integer
Returns the capacity (maximum number of people) of the location including descendant locations.
161 |
# File 'lib/lws/apps/presence.rb', line 161 attribute :capacity_tree |
#capacity_used ⇒ Integer
Returns the used capacity (present number of people) of the location.
165 |
# File 'lib/lws/apps/presence.rb', line 165 attribute :capacity_used |
#capacity_used_percentage ⇒ Float
Returns the used capacity percentage of the location.
174 |
# File 'lib/lws/apps/presence.rb', line 174 attribute :capacity_used_precentage |
#capacity_used_percentage_tree ⇒ Float
Returns the used capacity percentage of the location including descendant locations.
179 |
# File 'lib/lws/apps/presence.rb', line 179 attribute :capacity_used_precentage_tree |
#capacity_used_tree ⇒ Integer
Returns the used capacity (present number of people) of the location including descendant locations.
170 |
# File 'lib/lws/apps/presence.rb', line 170 attribute :capacity_used_tree |
#checkin_status ⇒ "available", ...
Returns the presence status to set people to when checking in.
184 |
# File 'lib/lws/apps/presence.rb', line 184 attribute :checkin_status |
#checkout_alter_status ⇒ "available", ...
Returns the status to set the location to when someone checks out.
192 |
# File 'lib/lws/apps/presence.rb', line 192 attribute :checkout_alter_status |
#checkout_location ⇒ Location?
Returns the location to move people to when they are checked out.
197 198 199 |
# File 'lib/lws/apps/presence.rb', line 197 belongs_to :checkout_location, class_name: "LWS::Presence::Location", foreign_key: "checkout_location_id", uri: "locations/:id" |
#checkout_location_id ⇒ Integer?
Returns the ID of the location to move people to when they are checked out.
204 |
# File 'lib/lws/apps/presence.rb', line 204 attribute :checkout_location_id |
#company ⇒ LWS::Auth::Company
Returns the company the location belongs to.
208 |
# File 'lib/lws/apps/presence.rb', line 208 belongs_to :company, class_name: "LWS::Auth::Company" |
#company_id ⇒ Integer
Returns the ID of the company the location belongs to.
212 |
# File 'lib/lws/apps/presence.rb', line 212 attribute :company_id |
#descendant_ids ⇒ Array<Integer>
Returns the IDs of the underlying locations of the location.
216 |
# File 'lib/lws/apps/presence.rb', line 216 attribute :descendant_ids |
#image_storage_id ⇒ String?
Returns the storage ID of the image of the location.
220 |
# File 'lib/lws/apps/presence.rb', line 220 attribute :image_storage_id |
#image_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 image of the location.
227 |
# File 'lib/lws/apps/presence.rb', line 227 attribute :image_url |
#import_ref ⇒ String?
Returns reference of the location in the remote database.
231 |
# File 'lib/lws/apps/presence.rb', line 231 attribute :import_ref |
#invite_remarks ⇒ String?
Returns the remarks to add when sending invites for appointments involving the location.
236 |
# File 'lib/lws/apps/presence.rb', line 236 attribute :invite_remarks |
#journal_ids ⇒ Array<Integer>
Returns the IDs of the journal (entries) associated with the location.
241 |
# File 'lib/lws/apps/presence.rb', line 241 attribute :journal_ids |
#journals ⇒ Array<Journal>
Returns the journal (entries) associated with the location.
245 |
# File 'lib/lws/apps/presence.rb', line 245 has_many :journals, class: "LWS::Presence::Journal" |
#lat ⇒ Float
Returns the latitude of the location.
249 |
# File 'lib/lws/apps/presence.rb', line 249 attribute :lat |
#logoff_time ⇒ String
The format of the time is HH:MM
and should be interpreted in the time zone of the location (see also #time_zone).
255 |
# File 'lib/lws/apps/presence.rb', line 255 attribute :logoff_time |
#long ⇒ Float
Returns the longitude of the location.
259 |
# File 'lib/lws/apps/presence.rb', line 259 attribute :long |
#map_ids ⇒ Array<Integer>
Returns the IDs of the maps for this location.
273 |
# File 'lib/lws/apps/presence.rb', line 273 attribute :map_ids |
#map_position_ids ⇒ Array<Integer>
Returns the IDs of the location map positions that track this location.
264 |
# File 'lib/lws/apps/presence.rb', line 264 attribute :map_position_ids |
#map_positions ⇒ Array<Location::Map::Position>
Returns the location map positions that track this location.
269 |
# File 'lib/lws/apps/presence.rb', line 269 has_many :map_positions, class_name: "LWS::Presence::Location::Map::Position" |
#maps ⇒ Array<Location::Map>
Returns the maps for this location.
277 |
# File 'lib/lws/apps/presence.rb', line 277 has_many :maps, class_name: "LWS::Presence::Location::Map" |
#name ⇒ String
Returns the name of the location.
281 |
# File 'lib/lws/apps/presence.rb', line 281 attribute :name |
#owner ⇒ Person?
Returns the owner of the location.
285 286 287 |
# File 'lib/lws/apps/presence.rb', line 285 belongs_to :owner, class_name: "LWS::Presence::Person", foreign_key: "owner_id", uri: "people/:id" |
#owner_id ⇒ Fixnum?
Returns the ID of the owner of the location.
291 |
# File 'lib/lws/apps/presence.rb', line 291 attribute :owner_id |
#parent ⇒ Location
Returns the parent of the location.
295 296 297 |
# File 'lib/lws/apps/presence.rb', line 295 belongs_to :parent, class_name: "LWS::Presence::Location", foreign_key: "parent_id", uri: "locations/:id" |
#parent_id ⇒ Integer
Returns the ID of the parent of the location.
301 |
# File 'lib/lws/apps/presence.rb', line 301 attribute :parent_id |
#people ⇒ Array<Person>
Returns the people associated with the location.
310 |
# File 'lib/lws/apps/presence.rb', line 310 has_many :people |
#people_tree ⇒ Array<Person>
Returns the people associated with the location including descendant locations.
320 |
# File 'lib/lws/apps/presence.rb', line 320 has_many :people_tree, class_name: "LWS::Presence::Person" |
#people_tree_ids ⇒ Array<Integer>
location including descendant locations
315 |
# File 'lib/lws/apps/presence.rb', line 315 attribute :people_tree_ids |
#person_ids ⇒ Array<Integer>
Returns the IDs of the people associated with the location.
306 |
# File 'lib/lws/apps/presence.rb', line 306 attribute :person_ids |
#range ⇒ Integer
Returns the range around the location in meters.
324 |
# File 'lib/lws/apps/presence.rb', line 324 attribute :range |
#reader_ids ⇒ Array<Integer>
Returns the IDs of the (RFID/code/ID/…) readers linked to this location.
329 |
# File 'lib/lws/apps/presence.rb', line 329 attribute :reader_ids |
#readers ⇒ Array<Reader>
Returns the (RFID/code/ID/…) readers linked to this location.
333 |
# File 'lib/lws/apps/presence.rb', line 333 has_many :readers |
#reservation_required ⇒ Boolean
Returns whether a reservation is required for checking in to this location.
338 |
# File 'lib/lws/apps/presence.rb', line 338 attribute :reservation_required |
#status ⇒ "available", ...
Returns the status of the location.
346 |
# File 'lib/lws/apps/presence.rb', line 346 attribute :status |
#time_zone ⇒ String
Returns the time zone of the location.
350 |
# File 'lib/lws/apps/presence.rb', line 350 attribute :time_zone |
#uuid ⇒ String
Returns the UUID of the location.
354 |
# File 'lib/lws/apps/presence.rb', line 354 attribute :uuid |