Class: Seam::Resources::SeamEvent::DeviceLowBattery

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

Overview

A device battery level dropped below the low threshold.

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)


3486
3487
3488
# File 'lib/seam/resources/event.rb', line 3486

def battery_level
  @battery_level
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)


3489
3490
3491
# File 'lib/seam/resources/event.rb', line 3489

def 
  @connected_account_custom_metadata
end

#connected_account_idString

ID of the connected account associated with the event.

Returns:

  • (String)


3492
3493
3494
# File 'lib/seam/resources/event.rb', line 3492

def 
  @connected_account_id
end

#customer_keyString?

The customer key associated with the device, if any.

Returns:

  • (String, nil)


3495
3496
3497
# File 'lib/seam/resources/event.rb', line 3495

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)


3498
3499
3500
# File 'lib/seam/resources/event.rb', line 3498

def 
  @device_custom_metadata
end

#device_idString

ID of the affected device.

Returns:

  • (String)


3501
3502
3503
# File 'lib/seam/resources/event.rb', line 3501

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)


3504
3505
3506
# File 'lib/seam/resources/event.rb', line 3504

def event_description
  @event_description
end

#event_idString

ID of the event.

Returns:

  • (String)


3507
3508
3509
# File 'lib/seam/resources/event.rb', line 3507

def event_id
  @event_id
end

#event_typeString

Known values:

  • device.low_battery

Returns:

  • (String)


3511
3512
3513
# File 'lib/seam/resources/event.rb', line 3511

def event_type
  @event_type
end

#workspace_idString

ID of the workspace associated with the event.

Returns:

  • (String)


3514
3515
3516
# File 'lib/seam/resources/event.rb', line 3514

def workspace_id
  @workspace_id
end

Instance Method Details

#created_atTime

Date and time at which the event was created.

Returns:

  • (Time)


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

date_accessor :created_at

#occurred_atTime

Date and time at which the event occurred.

Returns:

  • (Time)


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

date_accessor :occurred_at