Class: Seam::Resources::SeamEvent::DeviceBatteryStatusChanged

Inherits:
SeamEvent
  • Object
show all
Defined in:
lib/seam/resources/event.rb

Overview

A device battery status changed since the last battery_status_changed event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#battery_levelFloat

Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device.

Returns:

  • (Float)


3534
3535
3536
# File 'lib/seam/resources/event.rb', line 3534

def battery_level
  @battery_level
end

#battery_statusString

Battery status of the affected device, calculated from the numeric battery_level value. Known values:

  • critical
  • low
  • good
  • full

Returns:

  • (String)


3542
3543
3544
# File 'lib/seam/resources/event.rb', line 3542

def battery_status
  @battery_status
end

#connected_account_custom_metadataHash{String => String, Boolean}?

Custom metadata of the connected account, present when connected_account_id is provided.

Returns:

  • (Hash{String => String, Boolean}, nil)


3545
3546
3547
# File 'lib/seam/resources/event.rb', line 3545

def 
  @connected_account_custom_metadata
end

#connected_account_idString

ID of the connected account associated with the event.

Returns:

  • (String)


3548
3549
3550
# File 'lib/seam/resources/event.rb', line 3548

def 
  @connected_account_id
end

#customer_keyString?

The customer key associated with the device, if any.

Returns:

  • (String, nil)


3551
3552
3553
# File 'lib/seam/resources/event.rb', line 3551

def customer_key
  @customer_key
end

#device_custom_metadataHash{String => String, Boolean}?

Custom metadata of the device, present when device_id is provided.

Returns:

  • (Hash{String => String, Boolean}, nil)


3554
3555
3556
# File 'lib/seam/resources/event.rb', line 3554

def 
  @device_custom_metadata
end

#device_idString

ID of the affected device.

Returns:

  • (String)


3557
3558
3559
# File 'lib/seam/resources/event.rb', line 3557

def device_id
  @device_id
end

#event_descriptionString?

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.

Returns:

  • (String, nil)


3560
3561
3562
# File 'lib/seam/resources/event.rb', line 3560

def event_description
  @event_description
end

#event_idString

ID of the event.

Returns:

  • (String)


3563
3564
3565
# File 'lib/seam/resources/event.rb', line 3563

def event_id
  @event_id
end

#event_typeString

Known values:

  • device.battery_status_changed

Returns:

  • (String)


3567
3568
3569
# File 'lib/seam/resources/event.rb', line 3567

def event_type
  @event_type
end

#workspace_idString

ID of the workspace associated with the event.

Returns:

  • (String)


3570
3571
3572
# File 'lib/seam/resources/event.rb', line 3570

def workspace_id
  @workspace_id
end

Instance Method Details

#created_atTime

Date and time at which the event was created.

Returns:

  • (Time)


3573
# File 'lib/seam/resources/event.rb', line 3573

date_accessor :created_at

#occurred_atTime

Date and time at which the event occurred.

Returns:

  • (Time)


3576
# File 'lib/seam/resources/event.rb', line 3576

date_accessor :occurred_at