You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: seam/resources/access_code.py
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@
5
5
6
6
@dataclass
7
7
classAccessCode:
8
-
"""Represents a smart lock [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
8
+
"""Represents a smart lock `access code <https://docs.seam.co/low-level-apis/smart-locks/access-codes>`_.
9
9
10
10
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. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate.
11
11
12
-
Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time.
12
+
Seam supports programming two types of access codes: `ongoing <https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes>`_ and `time-bound <https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes>`_. To differentiate between the two, refer to the ``type`` property of the access code. Ongoing codes display as ``ongoing``, whereas time-bound codes are labeled ``time_bound``. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both ``starts_at`` and ``ends_at`` empty. A time-bound access code will be programmed at the ``starts_at`` time and removed at the ``ends_at`` time.
13
13
14
-
In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.
14
+
In addition, for certain devices, Seam also supports `offline access codes <https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes>`_. Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.
15
15
16
-
For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.
16
+
For granting a person access to a space, `Access Grants <https://docs.seam.co/use-cases/granting-access>`_ are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.
17
17
18
18
:ivar access_code_id: Unique identifier for the access code.
19
19
:vartype access_code_id: str
@@ -36,7 +36,7 @@ class AccessCode:
36
36
:ivar ends_at: Date and time after which the time-bound access code becomes inactive.
37
37
:vartype ends_at: str
38
38
39
-
:ivar errors: Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
39
+
:ivar errors: Errors associated with the `access code <https://docs.seam.co/low-level-apis/smart-locks/access-codes>`_.
40
40
:vartype errors: List[Dict[str, Any]]
41
41
42
42
:ivar is_backup: Indicates whether the access code is a backup code.
@@ -51,10 +51,10 @@ class AccessCode:
51
51
:ivar is_managed: Indicates whether Seam manages the access code.
52
52
:vartype is_managed: bool
53
53
54
-
:ivar is_offline_access_code: Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection.
54
+
:ivar is_offline_access_code: Indicates whether the access code is intended for use in offline scenarios. If ``true``, this code can be created on a device without a network connection.
55
55
:vartype is_offline_access_code: bool
56
56
57
-
:ivar is_one_time_use: Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use.
57
+
:ivar is_one_time_use: Indicates whether the access code can only be used once. If ``true``, the code becomes invalid after the first use.
58
58
:vartype is_one_time_use: bool
59
59
60
60
:ivar is_scheduled_on_device: Indicates whether the code is set on the device according to a preconfigured schedule.
@@ -63,7 +63,7 @@ class AccessCode:
63
63
:ivar is_waiting_for_code_assignment: Indicates whether the access code is waiting for a code assignment.
64
64
:vartype is_waiting_for_code_assignment: bool
65
65
66
-
:ivar name: 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).
66
+
:ivar name: 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).
67
67
:vartype name: str
68
68
69
69
:ivar pending_mutations: Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device.
@@ -75,13 +75,13 @@ class AccessCode:
75
75
:ivar starts_at: Date and time at which the time-bound access code becomes active.
76
76
:vartype starts_at: str
77
77
78
-
:ivar status: Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
78
+
:ivar status: Current status of the access code within the operational lifecycle. Values are ``setting``, a transitional phase that indicates that the code is being configured or activated; ``set``, which indicates that the code is active and operational; ``unset``, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; ``removing``, which indicates a transitional period in which the code is being deleted or made inactive; and ``unknown``, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also `Lifecycle of Access Codes <https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes>`_.
79
79
:vartype status: str
80
80
81
-
:ivar type: Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
81
+
:ivar type: Type of the access code. ``ongoing`` access codes are active continuously until deactivated manually. ``time_bound`` access codes have a specific duration.
82
82
:vartype type: str
83
83
84
-
:ivar warnings: Warnings associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
84
+
:ivar warnings: Warnings associated with the `access code <https://docs.seam.co/low-level-apis/smart-locks/access-codes>`_.
85
85
:vartype warnings: List[Dict[str, Any]]
86
86
87
87
:ivar workspace_id: Unique identifier for the Seam workspace associated with the access code.
:ivar pending_mutations: Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress.
55
+
:ivar pending_mutations: Pending mutations for the `access method <https://docs.seam.co/use-cases/granting-access/creating-an-access-grant>`_. Indicates operations that are in progress.
56
56
:vartype pending_mutations: List[Dict[str, Any]]
57
57
58
-
:ivar warnings: Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).
58
+
:ivar warnings: Warnings associated with the `access method <https://docs.seam.co/use-cases/granting-access/creating-an-access-grant>`_.
59
59
:vartype warnings: List[Dict[str, Any]]
60
60
61
61
:ivar workspace_id: ID of the Seam workspace associated with the access method.
0 commit comments