seam 2.131.0 → 2.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/seam/http_multi_workspace.rb +2 -2
- data/lib/seam/http_single_workspace.rb +2 -2
- data/lib/seam/resources/access_code.rb +67 -0
- data/lib/seam/resources/access_grant.rb +51 -0
- data/lib/seam/resources/access_method.rb +46 -0
- data/lib/seam/resources/acs_access_group.rb +45 -0
- data/lib/seam/resources/acs_credential.rb +73 -0
- data/lib/seam/resources/acs_encoder.rb +37 -0
- data/lib/seam/resources/acs_entrance.rb +61 -0
- data/lib/seam/resources/acs_system.rb +54 -0
- data/lib/seam/resources/acs_user.rb +63 -0
- data/lib/seam/resources/action_attempt.rb +18 -0
- data/lib/seam/resources/batch.rb +134 -0
- data/lib/seam/resources/client_session.rb +44 -0
- data/lib/seam/resources/connect_webview.rb +59 -0
- data/lib/seam/resources/connected_account.rb +46 -0
- data/lib/seam/resources/customer_portal.rb +25 -0
- data/lib/seam/resources/device.rb +83 -0
- data/lib/seam/resources/device_provider.rb +56 -0
- data/lib/seam/resources/event.rb +193 -0
- data/lib/seam/{routes/resources → resources}/index.rb +3 -0
- data/lib/seam/resources/instant_key.rb +31 -0
- data/lib/seam/resources/noise_threshold.rb +23 -0
- data/lib/seam/resources/pagination.rb +15 -0
- data/lib/seam/resources/phone.rb +29 -0
- data/lib/seam/resources/space.rb +32 -0
- data/lib/seam/resources/thermostat_daily_program.rb +22 -0
- data/lib/seam/resources/thermostat_schedule.rb +34 -0
- data/lib/seam/resources/unmanaged_access_code.rb +53 -0
- data/lib/seam/resources/unmanaged_access_grant.rb +43 -0
- data/lib/seam/resources/unmanaged_access_method.rb +40 -0
- data/lib/seam/resources/unmanaged_device.rb +73 -0
- data/lib/seam/resources/unmanaged_user_identity.rb +29 -0
- data/lib/seam/resources/user_identity.rb +31 -0
- data/lib/seam/resources/webhook.rb +17 -0
- data/lib/seam/resources/workspace.rb +28 -0
- data/lib/seam/routes/access_codes.rb +227 -0
- data/lib/seam/routes/access_codes_simulate.rb +23 -0
- data/lib/seam/routes/access_codes_unmanaged.rb +76 -0
- data/lib/seam/routes/access_grants.rb +117 -0
- data/lib/seam/routes/access_grants_unmanaged.rb +50 -0
- data/lib/seam/routes/access_methods.rb +101 -0
- data/lib/seam/routes/access_methods_unmanaged.rb +33 -0
- data/lib/seam/routes/acs_access_groups.rb +82 -0
- data/lib/seam/routes/acs_credentials.rb +109 -0
- data/lib/seam/routes/{clients/acs_encoders.rb → acs_encoders.rb} +25 -0
- data/lib/seam/routes/acs_encoders_simulate.rb +55 -0
- data/lib/seam/routes/acs_entrances.rb +76 -0
- data/lib/seam/routes/acs_systems.rb +56 -0
- data/lib/seam/routes/acs_users.rb +150 -0
- data/lib/seam/routes/{clients/action_attempts.rb → action_attempts.rb} +9 -0
- data/lib/seam/routes/client_sessions.rb +102 -0
- data/lib/seam/routes/connect_webviews.rb +72 -0
- data/lib/seam/routes/connected_accounts.rb +77 -0
- data/lib/seam/routes/{clients/connected_accounts_simulate.rb → connected_accounts_simulate.rb} +3 -0
- data/lib/seam/routes/customers.rb +87 -0
- data/lib/seam/routes/devices.rb +95 -0
- data/lib/seam/routes/devices_simulate.rb +76 -0
- data/lib/seam/routes/devices_unmanaged.rb +66 -0
- data/lib/seam/routes/events.rb +59 -0
- data/lib/seam/routes/{clients/instant_keys.rb → instant_keys.rb} +10 -0
- data/lib/seam/routes/locks.rb +89 -0
- data/lib/seam/routes/{clients/locks_simulate.rb → locks_simulate.rb} +7 -0
- data/lib/seam/routes/noise_sensors.rb +45 -0
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +69 -0
- data/lib/seam/routes/noise_sensors_simulate.rb +21 -0
- data/lib/seam/routes/phones.rb +44 -0
- data/lib/seam/routes/phones_simulate.rb +24 -0
- data/lib/seam/routes/spaces.rb +145 -0
- data/lib/seam/routes/thermostats.rb +238 -0
- data/lib/seam/routes/{clients/thermostats_daily_programs.rb → thermostats_daily_programs.rb} +13 -0
- data/lib/seam/routes/thermostats_schedules.rb +70 -0
- data/lib/seam/routes/thermostats_simulate.rb +37 -0
- data/lib/seam/routes/user_identities.rb +167 -0
- data/lib/seam/routes/user_identities_unmanaged.rb +46 -0
- data/lib/seam/routes/{clients/webhooks.rb → webhooks.rb} +16 -0
- data/lib/seam/routes/workspaces.rb +77 -0
- data/lib/seam/version.rb +1 -1
- data/lib/seam/webhook.rb +1 -1
- metadata +83 -80
- data/lib/seam/routes/clients/access_codes.rb +0 -80
- data/lib/seam/routes/clients/access_codes_simulate.rb +0 -18
- data/lib/seam/routes/clients/access_codes_unmanaged.rb +0 -42
- data/lib/seam/routes/clients/access_grants.rb +0 -58
- data/lib/seam/routes/clients/access_grants_unmanaged.rb +0 -30
- data/lib/seam/routes/clients/access_methods.rb +0 -66
- data/lib/seam/routes/clients/access_methods_unmanaged.rb +0 -24
- data/lib/seam/routes/clients/acs_access_groups.rb +0 -54
- data/lib/seam/routes/clients/acs_credentials.rb +0 -60
- data/lib/seam/routes/clients/acs_encoders_simulate.rb +0 -36
- data/lib/seam/routes/clients/acs_entrances.rb +0 -46
- data/lib/seam/routes/clients/acs_systems.rb +0 -36
- data/lib/seam/routes/clients/acs_users.rb +0 -78
- data/lib/seam/routes/clients/client_sessions.rb +0 -54
- data/lib/seam/routes/clients/connect_webviews.rb +0 -36
- data/lib/seam/routes/clients/connected_accounts.rb +0 -46
- data/lib/seam/routes/clients/customers.rb +0 -30
- data/lib/seam/routes/clients/devices.rb +0 -50
- data/lib/seam/routes/clients/devices_simulate.rb +0 -48
- data/lib/seam/routes/clients/devices_unmanaged.rb +0 -30
- data/lib/seam/routes/clients/events.rb +0 -24
- data/lib/seam/routes/clients/locks.rb +0 -54
- data/lib/seam/routes/clients/noise_sensors.rb +0 -26
- data/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +0 -42
- data/lib/seam/routes/clients/noise_sensors_simulate.rb +0 -18
- data/lib/seam/routes/clients/phones.rb +0 -34
- data/lib/seam/routes/clients/phones_simulate.rb +0 -18
- data/lib/seam/routes/clients/spaces.rb +0 -84
- data/lib/seam/routes/clients/thermostats.rb +0 -126
- data/lib/seam/routes/clients/thermostats_schedules.rb +0 -42
- data/lib/seam/routes/clients/thermostats_simulate.rb +0 -24
- data/lib/seam/routes/clients/user_identities.rb +0 -100
- data/lib/seam/routes/clients/user_identities_unmanaged.rb +0 -30
- data/lib/seam/routes/clients/workspaces.rb +0 -46
- data/lib/seam/routes/resources/access_code.rb +0 -14
- data/lib/seam/routes/resources/access_grant.rb +0 -14
- data/lib/seam/routes/resources/access_method.rb +0 -14
- data/lib/seam/routes/resources/acs_access_group.rb +0 -14
- data/lib/seam/routes/resources/acs_credential.rb +0 -14
- data/lib/seam/routes/resources/acs_encoder.rb +0 -13
- data/lib/seam/routes/resources/acs_entrance.rb +0 -14
- data/lib/seam/routes/resources/acs_system.rb +0 -14
- data/lib/seam/routes/resources/acs_user.rb +0 -14
- data/lib/seam/routes/resources/action_attempt.rb +0 -9
- data/lib/seam/routes/resources/batch.rb +0 -9
- data/lib/seam/routes/resources/client_session.rb +0 -11
- data/lib/seam/routes/resources/connect_webview.rb +0 -11
- data/lib/seam/routes/resources/connected_account.rb +0 -14
- data/lib/seam/routes/resources/customer_portal.rb +0 -11
- data/lib/seam/routes/resources/device.rb +0 -14
- data/lib/seam/routes/resources/device_provider.rb +0 -9
- data/lib/seam/routes/resources/event.rb +0 -11
- data/lib/seam/routes/resources/instant_key.rb +0 -11
- data/lib/seam/routes/resources/noise_threshold.rb +0 -9
- data/lib/seam/routes/resources/pagination.rb +0 -9
- data/lib/seam/routes/resources/phone.rb +0 -14
- data/lib/seam/routes/resources/space.rb +0 -11
- data/lib/seam/routes/resources/thermostat_daily_program.rb +0 -11
- data/lib/seam/routes/resources/thermostat_schedule.rb +0 -13
- data/lib/seam/routes/resources/unmanaged_access_code.rb +0 -14
- data/lib/seam/routes/resources/unmanaged_device.rb +0 -14
- data/lib/seam/routes/resources/user_identity.rb +0 -14
- data/lib/seam/routes/resources/webhook.rb +0 -9
- data/lib/seam/routes/resources/workspace.rb +0 -9
- /data/lib/seam/{routes/resources → resources}/resource_error.rb +0 -0
- /data/lib/seam/{routes/resources → resources}/resource_errors_support.rb +0 -0
- /data/lib/seam/{routes/resources → resources}/resource_warning.rb +0 -0
- /data/lib/seam/{routes/resources → resources}/resource_warnings_support.rb +0 -0
- /data/lib/seam/routes/{clients/acs.rb → acs.rb} +0 -0
- /data/lib/seam/routes/{clients/index.rb → index.rb} +0 -0
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AccessCodesSimulate
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def create_unmanaged_access_code(code:, device_id:, name:)
|
|
12
|
-
res = @client.post("/access_codes/simulate/create_unmanaged_access_code", {code: code, device_id: device_id, name: name}.compact)
|
|
13
|
-
|
|
14
|
-
Seam::Resources::UnmanagedAccessCode.load_from_response(res.body["access_code"])
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AccessCodesUnmanaged
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def convert_to_managed(access_code_id:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil)
|
|
12
|
-
@client.post("/access_codes/unmanaged/convert_to_managed", {access_code_id: access_code_id, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def delete(access_code_id:)
|
|
18
|
-
@client.post("/access_codes/unmanaged/delete", {access_code_id: access_code_id}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def get(access_code_id: nil, code: nil, device_id: nil)
|
|
24
|
-
res = @client.post("/access_codes/unmanaged/get", {access_code_id: access_code_id, code: code, device_id: device_id}.compact)
|
|
25
|
-
|
|
26
|
-
Seam::Resources::UnmanagedAccessCode.load_from_response(res.body["access_code"])
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def list(device_id:, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil)
|
|
30
|
-
res = @client.post("/access_codes/unmanaged/list", {device_id: device_id, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact)
|
|
31
|
-
|
|
32
|
-
Seam::Resources::UnmanagedAccessCode.load_from_response(res.body["access_codes"])
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def update(access_code_id:, is_managed:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil)
|
|
36
|
-
@client.post("/access_codes/unmanaged/update", {access_code_id: access_code_id, is_managed: is_managed, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed}.compact)
|
|
37
|
-
|
|
38
|
-
nil
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AccessGrants
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def unmanaged
|
|
12
|
-
@unmanaged ||= Seam::Clients::AccessGrantsUnmanaged.new(client: @client, defaults: @defaults)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def create(requested_access_methods:, user_identity_id: nil, user_identity: nil, access_grant_key: nil, acs_entrance_ids: nil, customization_profile_id: nil, device_ids: nil, ends_at: nil, location: nil, location_ids: nil, name: nil, reservation_key: nil, space_ids: nil, space_keys: nil, starts_at: nil)
|
|
16
|
-
res = @client.post("/access_grants/create", {requested_access_methods: requested_access_methods, user_identity_id: user_identity_id, user_identity: user_identity, access_grant_key: access_grant_key, acs_entrance_ids: acs_entrance_ids, customization_profile_id: customization_profile_id, device_ids: device_ids, ends_at: ends_at, location: location, location_ids: location_ids, name: name, reservation_key: reservation_key, space_ids: space_ids, space_keys: space_keys, starts_at: starts_at}.compact)
|
|
17
|
-
|
|
18
|
-
Seam::Resources::AccessGrant.load_from_response(res.body["access_grant"])
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def delete(access_grant_id:)
|
|
22
|
-
@client.post("/access_grants/delete", {access_grant_id: access_grant_id}.compact)
|
|
23
|
-
|
|
24
|
-
nil
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def get(access_grant_id: nil, access_grant_key: nil)
|
|
28
|
-
res = @client.post("/access_grants/get", {access_grant_id: access_grant_id, access_grant_key: access_grant_key}.compact)
|
|
29
|
-
|
|
30
|
-
Seam::Resources::AccessGrant.load_from_response(res.body["access_grant"])
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def get_related(access_grant_ids: nil, access_grant_keys: nil, exclude: nil, include: nil)
|
|
34
|
-
res = @client.post("/access_grants/get_related", {access_grant_ids: access_grant_ids, access_grant_keys: access_grant_keys, exclude: exclude, include: include}.compact)
|
|
35
|
-
|
|
36
|
-
Seam::Resources::Batch.load_from_response(res.body["batch"])
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def list(access_code_id: nil, access_grant_ids: nil, access_grant_key: nil, acs_entrance_id: nil, acs_system_id: nil, customer_key: nil, device_id: nil, limit: nil, location_id: nil, page_cursor: nil, reservation_key: nil, space_id: nil, user_identity_id: nil)
|
|
40
|
-
res = @client.post("/access_grants/list", {access_code_id: access_code_id, access_grant_ids: access_grant_ids, access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, customer_key: customer_key, device_id: device_id, limit: limit, location_id: location_id, page_cursor: page_cursor, reservation_key: reservation_key, space_id: space_id, user_identity_id: user_identity_id}.compact)
|
|
41
|
-
|
|
42
|
-
Seam::Resources::AccessGrant.load_from_response(res.body["access_grants"])
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def request_access_methods(access_grant_id:, requested_access_methods:)
|
|
46
|
-
res = @client.post("/access_grants/request_access_methods", {access_grant_id: access_grant_id, requested_access_methods: requested_access_methods}.compact)
|
|
47
|
-
|
|
48
|
-
Seam::Resources::AccessGrant.load_from_response(res.body["access_grant"])
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def update(access_grant_id: nil, access_grant_key: nil, ends_at: nil, name: nil, starts_at: nil)
|
|
52
|
-
@client.post("/access_grants/update", {access_grant_id: access_grant_id, access_grant_key: access_grant_key, ends_at: ends_at, name: name, starts_at: starts_at}.compact)
|
|
53
|
-
|
|
54
|
-
nil
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AccessGrantsUnmanaged
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def get(access_grant_id:)
|
|
12
|
-
@client.post("/access_grants/unmanaged/get", {access_grant_id: access_grant_id}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def list(acs_entrance_id: nil, acs_system_id: nil, limit: nil, page_cursor: nil, reservation_key: nil, user_identity_id: nil)
|
|
18
|
-
@client.post("/access_grants/unmanaged/list", {acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, limit: limit, page_cursor: page_cursor, reservation_key: reservation_key, user_identity_id: user_identity_id}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def update(access_grant_id:, is_managed:, access_grant_key: nil)
|
|
24
|
-
@client.post("/access_grants/unmanaged/update", {access_grant_id: access_grant_id, is_managed: is_managed, access_grant_key: access_grant_key}.compact)
|
|
25
|
-
|
|
26
|
-
nil
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "seam/helpers/action_attempt"
|
|
4
|
-
|
|
5
|
-
module Seam
|
|
6
|
-
module Clients
|
|
7
|
-
class AccessMethods
|
|
8
|
-
def initialize(client:, defaults:)
|
|
9
|
-
@client = client
|
|
10
|
-
@defaults = defaults
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def unmanaged
|
|
14
|
-
@unmanaged ||= Seam::Clients::AccessMethodsUnmanaged.new(client: @client, defaults: @defaults)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def assign_card(access_method_id:, card_number:, wait_for_action_attempt: nil)
|
|
18
|
-
res = @client.post("/access_methods/assign_card", {access_method_id: access_method_id, card_number: card_number}.compact)
|
|
19
|
-
|
|
20
|
-
wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
|
|
21
|
-
|
|
22
|
-
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def delete(access_method_id: nil, access_grant_id: nil, reservation_key: nil)
|
|
26
|
-
@client.post("/access_methods/delete", {access_method_id: access_method_id, access_grant_id: access_grant_id, reservation_key: reservation_key}.compact)
|
|
27
|
-
|
|
28
|
-
nil
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def encode(access_method_id:, acs_encoder_id:, wait_for_action_attempt: nil)
|
|
32
|
-
res = @client.post("/access_methods/encode", {access_method_id: access_method_id, acs_encoder_id: acs_encoder_id}.compact)
|
|
33
|
-
|
|
34
|
-
wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
|
|
35
|
-
|
|
36
|
-
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def get(access_method_id:)
|
|
40
|
-
res = @client.post("/access_methods/get", {access_method_id: access_method_id}.compact)
|
|
41
|
-
|
|
42
|
-
Seam::Resources::AccessMethod.load_from_response(res.body["access_method"])
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def get_related(access_method_ids:, exclude: nil, include: nil)
|
|
46
|
-
res = @client.post("/access_methods/get_related", {access_method_ids: access_method_ids, exclude: exclude, include: include}.compact)
|
|
47
|
-
|
|
48
|
-
Seam::Resources::Batch.load_from_response(res.body["batch"])
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def list(access_code_id: nil, access_grant_id: nil, access_grant_key: nil, acs_entrance_id: nil, device_id: nil, space_id: nil)
|
|
52
|
-
res = @client.post("/access_methods/list", {access_code_id: access_code_id, access_grant_id: access_grant_id, access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, device_id: device_id, space_id: space_id}.compact)
|
|
53
|
-
|
|
54
|
-
Seam::Resources::AccessMethod.load_from_response(res.body["access_methods"])
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def unlock_door(access_method_id:, acs_entrance_id:, wait_for_action_attempt: nil)
|
|
58
|
-
res = @client.post("/access_methods/unlock_door", {access_method_id: access_method_id, acs_entrance_id: acs_entrance_id}.compact)
|
|
59
|
-
|
|
60
|
-
wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
|
|
61
|
-
|
|
62
|
-
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AccessMethodsUnmanaged
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def get(access_method_id:)
|
|
12
|
-
@client.post("/access_methods/unmanaged/get", {access_method_id: access_method_id}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def list(access_grant_id:, acs_entrance_id: nil, device_id: nil, space_id: nil)
|
|
18
|
-
@client.post("/access_methods/unmanaged/list", {access_grant_id: access_grant_id, acs_entrance_id: acs_entrance_id, device_id: device_id, space_id: space_id}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AcsAccessGroups
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
12
|
-
@client.post("/acs/access_groups/add_user", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def delete(acs_access_group_id:)
|
|
18
|
-
@client.post("/acs/access_groups/delete", {acs_access_group_id: acs_access_group_id}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def get(acs_access_group_id:)
|
|
24
|
-
res = @client.post("/acs/access_groups/get", {acs_access_group_id: acs_access_group_id}.compact)
|
|
25
|
-
|
|
26
|
-
Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_group"])
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil)
|
|
30
|
-
res = @client.post("/acs/access_groups/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, search: search, user_identity_id: user_identity_id}.compact)
|
|
31
|
-
|
|
32
|
-
Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_groups"])
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def list_accessible_entrances(acs_access_group_id:)
|
|
36
|
-
res = @client.post("/acs/access_groups/list_accessible_entrances", {acs_access_group_id: acs_access_group_id}.compact)
|
|
37
|
-
|
|
38
|
-
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def list_users(acs_access_group_id:)
|
|
42
|
-
res = @client.post("/acs/access_groups/list_users", {acs_access_group_id: acs_access_group_id}.compact)
|
|
43
|
-
|
|
44
|
-
Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
48
|
-
@client.post("/acs/access_groups/remove_user", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
49
|
-
|
|
50
|
-
nil
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AcsCredentials
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def assign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil)
|
|
12
|
-
@client.post("/acs/credentials/assign", {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def create(access_method:, acs_system_id: nil, acs_user_id: nil, allowed_acs_entrance_ids: nil, assa_abloy_vostio_metadata: nil, code: nil, credential_manager_acs_system_id: nil, ends_at: nil, is_multi_phone_sync_credential: nil, salto_space_metadata: nil, starts_at: nil, user_identity_id: nil, visionline_metadata: nil)
|
|
18
|
-
res = @client.post("/acs/credentials/create", {access_method: access_method, acs_system_id: acs_system_id, acs_user_id: acs_user_id, allowed_acs_entrance_ids: allowed_acs_entrance_ids, assa_abloy_vostio_metadata: assa_abloy_vostio_metadata, code: code, credential_manager_acs_system_id: credential_manager_acs_system_id, ends_at: ends_at, is_multi_phone_sync_credential: is_multi_phone_sync_credential, salto_space_metadata: salto_space_metadata, starts_at: starts_at, user_identity_id: user_identity_id, visionline_metadata: visionline_metadata}.compact)
|
|
19
|
-
|
|
20
|
-
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credential"])
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def delete(acs_credential_id:)
|
|
24
|
-
@client.post("/acs/credentials/delete", {acs_credential_id: acs_credential_id}.compact)
|
|
25
|
-
|
|
26
|
-
nil
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def get(acs_credential_id:)
|
|
30
|
-
res = @client.post("/acs/credentials/get", {acs_credential_id: acs_credential_id}.compact)
|
|
31
|
-
|
|
32
|
-
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credential"])
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def list(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil, created_before: nil, is_multi_phone_sync_credential: nil, limit: nil, page_cursor: nil, search: nil)
|
|
36
|
-
res = @client.post("/acs/credentials/list", {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id, created_before: created_before, is_multi_phone_sync_credential: is_multi_phone_sync_credential, limit: limit, page_cursor: page_cursor, search: search}.compact)
|
|
37
|
-
|
|
38
|
-
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def list_accessible_entrances(acs_credential_id:)
|
|
42
|
-
res = @client.post("/acs/credentials/list_accessible_entrances", {acs_credential_id: acs_credential_id}.compact)
|
|
43
|
-
|
|
44
|
-
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def unassign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil)
|
|
48
|
-
@client.post("/acs/credentials/unassign", {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
49
|
-
|
|
50
|
-
nil
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def update(acs_credential_id:, code: nil, ends_at: nil)
|
|
54
|
-
@client.post("/acs/credentials/update", {acs_credential_id: acs_credential_id, code: code, ends_at: ends_at}.compact)
|
|
55
|
-
|
|
56
|
-
nil
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AcsEncodersSimulate
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def next_credential_encode_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id: nil)
|
|
12
|
-
@client.post("/acs/encoders/simulate/next_credential_encode_will_fail", {acs_encoder_id: acs_encoder_id, error_code: error_code, acs_credential_id: acs_credential_id}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def next_credential_encode_will_succeed(acs_encoder_id:, scenario: nil)
|
|
18
|
-
@client.post("/acs/encoders/simulate/next_credential_encode_will_succeed", {acs_encoder_id: acs_encoder_id, scenario: scenario}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def next_credential_scan_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id_on_seam: nil)
|
|
24
|
-
@client.post("/acs/encoders/simulate/next_credential_scan_will_fail", {acs_encoder_id: acs_encoder_id, error_code: error_code, acs_credential_id_on_seam: acs_credential_id_on_seam}.compact)
|
|
25
|
-
|
|
26
|
-
nil
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def next_credential_scan_will_succeed(acs_encoder_id:, acs_credential_id_on_seam: nil, scenario: nil)
|
|
30
|
-
@client.post("/acs/encoders/simulate/next_credential_scan_will_succeed", {acs_encoder_id: acs_encoder_id, acs_credential_id_on_seam: acs_credential_id_on_seam, scenario: scenario}.compact)
|
|
31
|
-
|
|
32
|
-
nil
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "seam/helpers/action_attempt"
|
|
4
|
-
|
|
5
|
-
module Seam
|
|
6
|
-
module Clients
|
|
7
|
-
class AcsEntrances
|
|
8
|
-
def initialize(client:, defaults:)
|
|
9
|
-
@client = client
|
|
10
|
-
@defaults = defaults
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def get(acs_entrance_id:)
|
|
14
|
-
res = @client.post("/acs/entrances/get", {acs_entrance_id: acs_entrance_id}.compact)
|
|
15
|
-
|
|
16
|
-
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrance"])
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil)
|
|
20
|
-
@client.post("/acs/entrances/grant_access", {acs_entrance_id: acs_entrance_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
21
|
-
|
|
22
|
-
nil
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def list(acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil)
|
|
26
|
-
res = @client.post("/acs/entrances/list", {acs_credential_id: acs_credential_id, acs_entrance_ids: acs_entrance_ids, acs_system_id: acs_system_id, connected_account_id: connected_account_id, customer_key: customer_key, limit: limit, location_id: location_id, page_cursor: page_cursor, search: search, space_id: space_id}.compact)
|
|
27
|
-
|
|
28
|
-
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def list_credentials_with_access(acs_entrance_id:, include_if: nil)
|
|
32
|
-
res = @client.post("/acs/entrances/list_credentials_with_access", {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact)
|
|
33
|
-
|
|
34
|
-
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def unlock(acs_credential_id:, acs_entrance_id:, wait_for_action_attempt: nil)
|
|
38
|
-
res = @client.post("/acs/entrances/unlock", {acs_credential_id: acs_credential_id, acs_entrance_id: acs_entrance_id}.compact)
|
|
39
|
-
|
|
40
|
-
wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
|
|
41
|
-
|
|
42
|
-
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AcsSystems
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def get(acs_system_id:)
|
|
12
|
-
res = @client.post("/acs/systems/get", {acs_system_id: acs_system_id}.compact)
|
|
13
|
-
|
|
14
|
-
Seam::Resources::AcsSystem.load_from_response(res.body["acs_system"])
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def list(connected_account_id: nil, customer_key: nil, search: nil)
|
|
18
|
-
res = @client.post("/acs/systems/list", {connected_account_id: connected_account_id, customer_key: customer_key, search: search}.compact)
|
|
19
|
-
|
|
20
|
-
Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def list_compatible_credential_manager_acs_systems(acs_system_id:)
|
|
24
|
-
res = @client.post("/acs/systems/list_compatible_credential_manager_acs_systems", {acs_system_id: acs_system_id}.compact)
|
|
25
|
-
|
|
26
|
-
Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil)
|
|
30
|
-
@client.post("/acs/systems/report_devices", {acs_system_id: acs_system_id, acs_encoders: acs_encoders, acs_entrances: acs_entrances}.compact)
|
|
31
|
-
|
|
32
|
-
nil
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class AcsUsers
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def add_to_access_group(acs_access_group_id:, acs_user_id:)
|
|
12
|
-
@client.post("/acs/users/add_to_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact)
|
|
13
|
-
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def create(acs_system_id:, full_name:, access_schedule: nil, acs_access_group_ids: nil, email: nil, email_address: nil, phone_number: nil, user_identity_id: nil)
|
|
18
|
-
res = @client.post("/acs/users/create", {acs_system_id: acs_system_id, full_name: full_name, access_schedule: access_schedule, acs_access_group_ids: acs_access_group_ids, email: email, email_address: email_address, phone_number: phone_number, user_identity_id: user_identity_id}.compact)
|
|
19
|
-
|
|
20
|
-
Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def delete(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
24
|
-
@client.post("/acs/users/delete", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
25
|
-
|
|
26
|
-
nil
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def get(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil)
|
|
30
|
-
res = @client.post("/acs/users/get", {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id}.compact)
|
|
31
|
-
|
|
32
|
-
Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def list(acs_system_id: nil, created_before: nil, limit: nil, page_cursor: nil, search: nil, user_identity_email_address: nil, user_identity_id: nil, user_identity_phone_number: nil)
|
|
36
|
-
res = @client.post("/acs/users/list", {acs_system_id: acs_system_id, created_before: created_before, limit: limit, page_cursor: page_cursor, search: search, user_identity_email_address: user_identity_email_address, user_identity_id: user_identity_id, user_identity_phone_number: user_identity_phone_number}.compact)
|
|
37
|
-
|
|
38
|
-
Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def list_accessible_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
42
|
-
res = @client.post("/acs/users/list_accessible_entrances", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
43
|
-
|
|
44
|
-
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def remove_from_access_group(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
48
|
-
@client.post("/acs/users/remove_from_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
49
|
-
|
|
50
|
-
nil
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def revoke_access_to_all_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
54
|
-
@client.post("/acs/users/revoke_access_to_all_entrances", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
55
|
-
|
|
56
|
-
nil
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def suspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
60
|
-
@client.post("/acs/users/suspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
61
|
-
|
|
62
|
-
nil
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def unsuspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
66
|
-
@client.post("/acs/users/unsuspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
67
|
-
|
|
68
|
-
nil
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def update(access_schedule: nil, acs_system_id: nil, acs_user_id: nil, email: nil, email_address: nil, full_name: nil, hid_acs_system_id: nil, phone_number: nil, user_identity_id: nil)
|
|
72
|
-
@client.post("/acs/users/update", {access_schedule: access_schedule, acs_system_id: acs_system_id, acs_user_id: acs_user_id, email: email, email_address: email_address, full_name: full_name, hid_acs_system_id: hid_acs_system_id, phone_number: phone_number, user_identity_id: user_identity_id}.compact)
|
|
73
|
-
|
|
74
|
-
nil
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
end
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class ClientSessions
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def create(connect_webview_ids: nil, connected_account_ids: nil, customer_id: nil, customer_key: nil, expires_at: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
|
|
12
|
-
res = @client.post("/client_sessions/create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, customer_id: customer_id, customer_key: customer_key, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
|
|
13
|
-
|
|
14
|
-
Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def delete(client_session_id:)
|
|
18
|
-
@client.post("/client_sessions/delete", {client_session_id: client_session_id}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def get(client_session_id: nil, user_identifier_key: nil)
|
|
24
|
-
res = @client.post("/client_sessions/get", {client_session_id: client_session_id, user_identifier_key: user_identifier_key}.compact)
|
|
25
|
-
|
|
26
|
-
Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def get_or_create(connect_webview_ids: nil, connected_account_ids: nil, expires_at: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
|
|
30
|
-
res = @client.post("/client_sessions/get_or_create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
|
|
31
|
-
|
|
32
|
-
Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def grant_access(client_session_id: nil, connect_webview_ids: nil, connected_account_ids: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
|
|
36
|
-
@client.post("/client_sessions/grant_access", {client_session_id: client_session_id, connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
|
|
37
|
-
|
|
38
|
-
nil
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def list(client_session_id: nil, connect_webview_id: nil, user_identifier_key: nil, user_identity_id: nil, without_user_identifier_key: nil)
|
|
42
|
-
res = @client.post("/client_sessions/list", {client_session_id: client_session_id, connect_webview_id: connect_webview_id, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, without_user_identifier_key: without_user_identifier_key}.compact)
|
|
43
|
-
|
|
44
|
-
Seam::Resources::ClientSession.load_from_response(res.body["client_sessions"])
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def revoke(client_session_id:)
|
|
48
|
-
@client.post("/client_sessions/revoke", {client_session_id: client_session_id}.compact)
|
|
49
|
-
|
|
50
|
-
nil
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Seam
|
|
4
|
-
module Clients
|
|
5
|
-
class ConnectWebviews
|
|
6
|
-
def initialize(client:, defaults:)
|
|
7
|
-
@client = client
|
|
8
|
-
@defaults = defaults
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def create(accepted_capabilities: nil, accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, customer_key: nil, excluded_providers: nil, provider_category: nil, wait_for_device_creation: nil)
|
|
12
|
-
res = @client.post("/connect_webviews/create", {accepted_capabilities: accepted_capabilities, accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, customer_key: customer_key, excluded_providers: excluded_providers, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact)
|
|
13
|
-
|
|
14
|
-
Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"])
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def delete(connect_webview_id:)
|
|
18
|
-
@client.post("/connect_webviews/delete", {connect_webview_id: connect_webview_id}.compact)
|
|
19
|
-
|
|
20
|
-
nil
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def get(connect_webview_id:)
|
|
24
|
-
res = @client.post("/connect_webviews/get", {connect_webview_id: connect_webview_id}.compact)
|
|
25
|
-
|
|
26
|
-
Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"])
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil)
|
|
30
|
-
res = @client.post("/connect_webviews/list", {custom_metadata_has: custom_metadata_has, customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact)
|
|
31
|
-
|
|
32
|
-
Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webviews"])
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|