Class: Seam::Resources::UnmanagedAccessCode

Inherits:
BaseResource show all
Defined in:
lib/seam/resources/unmanaged_access_code.rb

Overview

Represents an unmanaged smart lock access code.

An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly.

When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes.

Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace.

Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes:

Defined Under Namespace

Classes: DormakabaOracodeMetadata, Errors, Warnings

Instance Attribute Summary collapse

Attributes inherited from BaseResource

#client, #data

Instance Method Summary collapse

Methods inherited from BaseResource

#[], aliased_accessor, attribute_aliases, date_accessor, discriminated_by, #initialize, #inspect, load_from_response, resource_accessor, resource_accessors, resource_list_accessor, resource_list_accessors, #update_from_response

Constructor Details

This class inherits a constructor from Seam::Resources::BaseResource

Instance Attribute Details

#access_code_idString

Unique identifier for the access code.

Returns:

  • (String)


759
760
761
# File 'lib/seam/resources/unmanaged_access_code.rb', line 759

def access_code_id
  @access_code_id
end

#cannot_be_managedTrueClass?

Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations.

Returns:

  • (TrueClass, nil)


762
763
764
# File 'lib/seam/resources/unmanaged_access_code.rb', line 762

def cannot_be_managed
  @cannot_be_managed
end

#cannot_delete_unmanaged_access_codeTrueClass?

Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app.

Returns:

  • (TrueClass, nil)


765
766
767
# File 'lib/seam/resources/unmanaged_access_code.rb', line 765

def cannot_delete_unmanaged_access_code
  @cannot_delete_unmanaged_access_code
end

#codeString?

Code used for access. Typically, a numeric or alphanumeric string.

Returns:

  • (String, nil)


768
769
770
# File 'lib/seam/resources/unmanaged_access_code.rb', line 768

def code
  @code
end

#device_idString

Unique identifier for the device associated with the access code.

Returns:

  • (String)


771
772
773
# File 'lib/seam/resources/unmanaged_access_code.rb', line 771

def device_id
  @device_id
end

#is_managedFalseClass

Indicates that Seam does not manage the access code.

Returns:

  • (FalseClass)


774
775
776
# File 'lib/seam/resources/unmanaged_access_code.rb', line 774

def is_managed
  @is_managed
end

#nameString?

Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as first_name and last_name. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called appearance. This is an object with a name property and, optionally, first_name and last_name properties (for providers that break down a name into components).

Returns:

  • (String, nil)


777
778
779
# File 'lib/seam/resources/unmanaged_access_code.rb', line 777

def name
  @name
end

#statusString

Current status of the access code within the operational lifecycle. set indicates that the code is active and operational. unset indicates that the code exists on the provider but is not usable on the device. Known values:

  • set
  • unset

Returns:

  • (String)


783
784
785
# File 'lib/seam/resources/unmanaged_access_code.rb', line 783

def status
  @status
end

#typeString

Type of the access code. ongoing access codes are active continuously until deactivated manually. time_bound access codes have a specific duration. Known values:

  • time_bound
  • ongoing

Returns:

  • (String)


789
790
791
# File 'lib/seam/resources/unmanaged_access_code.rb', line 789

def type
  @type
end

#workspace_idString

Unique identifier for the Seam workspace associated with the access code.

Returns:

  • (String)


792
793
794
# File 'lib/seam/resources/unmanaged_access_code.rb', line 792

def workspace_id
  @workspace_id
end

Instance Method Details

#created_atTime

Date and time at which the access code was created.

Returns:

  • (Time)


796
# File 'lib/seam/resources/unmanaged_access_code.rb', line 796

date_accessor :created_at

#dormakaba_oracode_metadataDormakabaOracodeMetadata?

Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.

Returns:



750
# File 'lib/seam/resources/unmanaged_access_code.rb', line 750

resource_accessor :dormakaba_oracode_metadata, DormakabaOracodeMetadata

#ends_atTime?

Date and time after which the time-bound access code becomes inactive.

Returns:

  • (Time, nil)


800
# File 'lib/seam/resources/unmanaged_access_code.rb', line 800

date_accessor :ends_at

#errorsArray<Errors>

Errors associated with the access code.

Returns:



753
# File 'lib/seam/resources/unmanaged_access_code.rb', line 753

resource_list_accessor :errors, Errors

#starts_atTime?

Date and time at which the time-bound access code becomes active.

Returns:

  • (Time, nil)


804
# File 'lib/seam/resources/unmanaged_access_code.rb', line 804

date_accessor :starts_at

#warningsArray<Warnings>

Warnings associated with the access code.

Returns:



756
# File 'lib/seam/resources/unmanaged_access_code.rb', line 756

resource_list_accessor :warnings, Warnings