lib/seam/clients/access_codes.rb in seamapi-1.13.0 vs lib/seam/clients/access_codes.rb in seamapi-1.14.0
- old
+ new
@@ -23,18 +23,18 @@
"access_codes",
body: {device_id: device_id, access_code_ids: access_code_ids}.compact
)
end
- def create(device_id: nil, name: nil, code: nil, starts_at: nil, ends_at: nil, use_backup_access_code_pool: nil)
+ def create(device_id: nil, name: nil, code: nil, starts_at: nil, ends_at: nil, use_backup_access_code_pool: nil, allow_external_modification: nil)
action_attempt = request_seam_object(
:post,
"/access_codes/create",
Seam::ActionAttempt,
"action_attempt",
body: {device_id: device_id, code: code, starts_at: starts_at, ends_at: ends_at, name: name,
- use_backup_access_code_pool: use_backup_access_code_pool}.compact
+ use_backup_access_code_pool: use_backup_access_code_pool, allow_external_modification: allow_external_modification}.compact
)
action_attempt.wait_until_finished
# TODO: check if failed
Seam::AccessCode.new(action_attempt.result["access_code"], @client)
end
@@ -49,11 +49,11 @@
)
action_attempt.wait_until_finished
action_attempt
end
- def update(access_code_id: nil, name: nil, code: nil, starts_at: nil, ends_at: nil, type: nil)
+ def update(access_code_id: nil, name: nil, code: nil, starts_at: nil, ends_at: nil, type: nil, allow_external_modification: nil)
action_attempt = request_seam_object(
:post,
"/access_codes/update",
Seam::ActionAttempt,
"action_attempt",
@@ -61,10 +61,11 @@
access_code_id: access_code_id,
name: name,
code: code,
starts_at: starts_at,
ends_at: ends_at,
- type: type
+ type: type,
+ allow_external_modification: allow_external_modification
}.compact
)
action_attempt.wait_until_finished
action_attempt
end