Class: Seam::Resources::SeamEvent::LockUnlocked

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

Overview

A lock was unlocked.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_code_idString?

ID of the access code that was used to unlock the affected device.

Returns:

  • (String, nil)


4337
4338
4339
# File 'lib/seam/resources/event.rb', line 4337

def access_code_id
  @access_code_id
end

#access_code_is_managedBoolean?

Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set.

Returns:

  • (Boolean, nil)


4340
4341
4342
# File 'lib/seam/resources/event.rb', line 4340

def access_code_is_managed
  @access_code_is_managed
end

#action_attempt_idString?

ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an UNLOCK_DOOR action attempt).

Returns:

  • (String, nil)


4343
4344
4345
# File 'lib/seam/resources/event.rb', line 4343

def action_attempt_id
  @action_attempt_id
end

#codeString?

Code (PIN) that was used to unlock the affected device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched.

Returns:

  • (String, nil)


4346
4347
4348
# File 'lib/seam/resources/event.rb', line 4346

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


4349
4350
4351
# File 'lib/seam/resources/event.rb', line 4349

def 
  @connected_account_custom_metadata
end

#connected_account_idString

ID of the connected account associated with the event.

Returns:

  • (String)


4352
4353
4354
# File 'lib/seam/resources/event.rb', line 4352

def 
  @connected_account_id
end

#customer_keyString?

The customer key associated with the device, if any.

Returns:

  • (String, nil)


4355
4356
4357
# File 'lib/seam/resources/event.rb', line 4355

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)


4358
4359
4360
# File 'lib/seam/resources/event.rb', line 4358

def 
  @device_custom_metadata
end

#device_idString?

ID of the affected device.

Returns:

  • (String, nil)


4361
4362
4363
# File 'lib/seam/resources/event.rb', line 4361

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)


4364
4365
4366
# File 'lib/seam/resources/event.rb', line 4364

def event_description
  @event_description
end

#event_idString

ID of the event.

Returns:

  • (String)


4367
4368
4369
# File 'lib/seam/resources/event.rb', line 4367

def event_id
  @event_id
end

#event_typeString

Known values:

  • lock.unlocked

Returns:

  • (String)


4371
4372
4373
# File 'lib/seam/resources/event.rb', line 4371

def event_type
  @event_type
end

#is_via_bluetoothBoolean?

Whether the unlock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action.

Returns:

  • (Boolean, nil)


4374
4375
4376
# File 'lib/seam/resources/event.rb', line 4374

def is_via_bluetooth
  @is_via_bluetooth
end

#is_via_nfcBoolean?

Whether the unlock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action.

Returns:

  • (Boolean, nil)


4377
4378
4379
# File 'lib/seam/resources/event.rb', line 4377

def is_via_nfc
  @is_via_nfc
end

#workspace_idString

ID of the workspace associated with the event.

Returns:

  • (String)


4390
4391
4392
# File 'lib/seam/resources/event.rb', line 4390

def workspace_id
  @workspace_id
end

Instance Method Details

#created_atTime

Date and time at which the event was created.

Returns:

  • (Time)


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

date_accessor :created_at

#event_methodString

Method by which the lock was unlocked. keycode: an access code was used (see access_code_id). manual: a physical action such as a thumbturn or handle press. remote: a remote action via an app, Bluetooth, or the Seam API (see action_attempt_id if Seam-initiated; see is_via_bluetooth or is_via_nfc for the transport). automatic: triggered automatically, for example by a time-based schedule. unknown: could not be determined. Known values:

  • keycode
  • manual
  • automatic
  • unknown
  • remote
  • card

Returns:

  • (String)


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

aliased_accessor :event_method, from: :method

#occurred_atTime

Date and time at which the event occurred.

Returns:

  • (Time)


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

date_accessor :occurred_at