Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 279ba04

Browse files
authored
feat: Add attempt_for_offline_device to access_codes.create (#67)
1 parent c3076b4 commit 279ba04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

seamapi/access_codes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def create(
129129
starts_at: Optional[str] = None,
130130
ends_at: Optional[str] = None,
131131
common_code_key: Optional[str] = None,
132+
attempt_for_offline_device: Optional[bool] = True,
132133
wait_for_code: Optional[bool] = False,
133134
timeout: Optional[int] = 300,
134135
) -> AccessCode:
@@ -146,6 +147,9 @@ def create(
146147
Time when access code becomes effective
147148
ends_at : str, optional
148149
Time when access code ceases to be effective
150+
attempt_for_offline_device : bool, optional
151+
If the device status is offline,
152+
attempt to set the access code anyway.
149153
wait_for_code : bool, optional
150154
Poll the access code until the code is known.
151155
timeout : int, optional:
@@ -175,6 +179,8 @@ def create(
175179
create_payload["ends_at"] = ends_at
176180
if common_code_key is not None:
177181
create_payload["common_code_key"] = common_code_key
182+
if attempt_for_offline_device is not None:
183+
create_payload["attempt_for_offline_device"] = attempt_for_offline_device
178184

179185
if (wait_for_code
180186
and starts_at is not None

0 commit comments

Comments
 (0)