Class: Seam::Resources::SeamEvent::DeviceLowBattery
- Inherits:
-
SeamEvent
- Object
- SeamEvent
- Seam::Resources::SeamEvent::DeviceLowBattery
- Defined in:
- lib/seam/resources/event.rb
Overview
A device battery level dropped below the low threshold.
Instance Attribute Summary collapse
-
#accessory_keypad_battery_level ⇒ Float?
Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known.
-
#battery_level ⇒ Float
deprecated
Deprecated.
Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.
-
#connected_account_custom_metadata ⇒ Hash{String => String, Boolean}?
Custom metadata of the connected account, present when connected_account_id is provided.
-
#connected_account_id ⇒ String
ID of the connected account associated with the event.
-
#customer_key ⇒ String?
The customer key associated with the device, if any.
-
#device_battery_level ⇒ Float?
Number in the range 0 to 1.0 indicating the affected device's own battery level, when known.
-
#device_custom_metadata ⇒ Hash{String => String, Boolean}?
Custom metadata of the device, present when device_id is provided.
-
#device_id ⇒ String
ID of the affected device.
-
#event_description ⇒ String?
Human-readable description of the event.
-
#event_id ⇒ String
ID of the event.
-
#event_type ⇒ String
Known values: -
device.low_battery. -
#workspace_id ⇒ String
ID of the workspace associated with the event.
Instance Method Summary collapse
-
#created_at ⇒ Time
Date and time at which the event was created.
-
#occurred_at ⇒ Time
Date and time at which the event occurred.
Instance Attribute Details
#accessory_keypad_battery_level ⇒ Float?
Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known.
3486 3487 3488 |
# File 'lib/seam/resources/event.rb', line 3486 def accessory_keypad_battery_level @accessory_keypad_battery_level end |
#battery_level ⇒ Float
Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.
Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
3490 3491 3492 |
# File 'lib/seam/resources/event.rb', line 3490 def battery_level @battery_level end |
#connected_account_custom_metadata ⇒ Hash{String => String, Boolean}?
Custom metadata of the connected account, present when connected_account_id is provided.
3493 3494 3495 |
# File 'lib/seam/resources/event.rb', line 3493 def @connected_account_custom_metadata end |
#connected_account_id ⇒ String
ID of the connected account associated with the event.
3496 3497 3498 |
# File 'lib/seam/resources/event.rb', line 3496 def connected_account_id @connected_account_id end |
#customer_key ⇒ String?
The customer key associated with the device, if any.
3499 3500 3501 |
# File 'lib/seam/resources/event.rb', line 3499 def customer_key @customer_key end |
#device_battery_level ⇒ Float?
Number in the range 0 to 1.0 indicating the affected device's own battery level, when known.
3502 3503 3504 |
# File 'lib/seam/resources/event.rb', line 3502 def device_battery_level @device_battery_level end |
#device_custom_metadata ⇒ Hash{String => String, Boolean}?
Custom metadata of the device, present when device_id is provided.
3505 3506 3507 |
# File 'lib/seam/resources/event.rb', line 3505 def @device_custom_metadata end |
#device_id ⇒ String
ID of the affected device.
3508 3509 3510 |
# File 'lib/seam/resources/event.rb', line 3508 def device_id @device_id end |
#event_description ⇒ String?
Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event.
3511 3512 3513 |
# File 'lib/seam/resources/event.rb', line 3511 def event_description @event_description end |
#event_id ⇒ String
ID of the event.
3514 3515 3516 |
# File 'lib/seam/resources/event.rb', line 3514 def event_id @event_id end |
#event_type ⇒ String
Known values:
device.low_battery
3518 3519 3520 |
# File 'lib/seam/resources/event.rb', line 3518 def event_type @event_type end |
#workspace_id ⇒ String
ID of the workspace associated with the event.
3521 3522 3523 |
# File 'lib/seam/resources/event.rb', line 3521 def workspace_id @workspace_id end |
Instance Method Details
#created_at ⇒ Time
Date and time at which the event was created.
3524 |
# File 'lib/seam/resources/event.rb', line 3524 date_accessor :created_at |
#occurred_at ⇒ Time
Date and time at which the event occurred.
3527 |
# File 'lib/seam/resources/event.rb', line 3527 date_accessor :occurred_at |