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.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/seam/http_multi_workspace.rb +2 -2
  4. data/lib/seam/http_single_workspace.rb +2 -2
  5. data/lib/seam/resources/access_code.rb +67 -0
  6. data/lib/seam/resources/access_grant.rb +51 -0
  7. data/lib/seam/resources/access_method.rb +46 -0
  8. data/lib/seam/resources/acs_access_group.rb +45 -0
  9. data/lib/seam/resources/acs_credential.rb +73 -0
  10. data/lib/seam/resources/acs_encoder.rb +37 -0
  11. data/lib/seam/resources/acs_entrance.rb +61 -0
  12. data/lib/seam/resources/acs_system.rb +54 -0
  13. data/lib/seam/resources/acs_user.rb +63 -0
  14. data/lib/seam/resources/action_attempt.rb +18 -0
  15. data/lib/seam/resources/batch.rb +134 -0
  16. data/lib/seam/resources/client_session.rb +44 -0
  17. data/lib/seam/resources/connect_webview.rb +59 -0
  18. data/lib/seam/resources/connected_account.rb +46 -0
  19. data/lib/seam/resources/customer_portal.rb +25 -0
  20. data/lib/seam/resources/device.rb +83 -0
  21. data/lib/seam/resources/device_provider.rb +56 -0
  22. data/lib/seam/resources/event.rb +193 -0
  23. data/lib/seam/{routes/resources → resources}/index.rb +3 -0
  24. data/lib/seam/resources/instant_key.rb +31 -0
  25. data/lib/seam/resources/noise_threshold.rb +23 -0
  26. data/lib/seam/resources/pagination.rb +15 -0
  27. data/lib/seam/resources/phone.rb +29 -0
  28. data/lib/seam/resources/space.rb +32 -0
  29. data/lib/seam/resources/thermostat_daily_program.rb +22 -0
  30. data/lib/seam/resources/thermostat_schedule.rb +34 -0
  31. data/lib/seam/resources/unmanaged_access_code.rb +53 -0
  32. data/lib/seam/resources/unmanaged_access_grant.rb +43 -0
  33. data/lib/seam/resources/unmanaged_access_method.rb +40 -0
  34. data/lib/seam/resources/unmanaged_device.rb +73 -0
  35. data/lib/seam/resources/unmanaged_user_identity.rb +29 -0
  36. data/lib/seam/resources/user_identity.rb +31 -0
  37. data/lib/seam/resources/webhook.rb +17 -0
  38. data/lib/seam/resources/workspace.rb +28 -0
  39. data/lib/seam/routes/access_codes.rb +227 -0
  40. data/lib/seam/routes/access_codes_simulate.rb +23 -0
  41. data/lib/seam/routes/access_codes_unmanaged.rb +76 -0
  42. data/lib/seam/routes/access_grants.rb +117 -0
  43. data/lib/seam/routes/access_grants_unmanaged.rb +50 -0
  44. data/lib/seam/routes/access_methods.rb +101 -0
  45. data/lib/seam/routes/access_methods_unmanaged.rb +33 -0
  46. data/lib/seam/routes/acs_access_groups.rb +82 -0
  47. data/lib/seam/routes/acs_credentials.rb +109 -0
  48. data/lib/seam/routes/{clients/acs_encoders.rb → acs_encoders.rb} +25 -0
  49. data/lib/seam/routes/acs_encoders_simulate.rb +55 -0
  50. data/lib/seam/routes/acs_entrances.rb +76 -0
  51. data/lib/seam/routes/acs_systems.rb +56 -0
  52. data/lib/seam/routes/acs_users.rb +150 -0
  53. data/lib/seam/routes/{clients/action_attempts.rb → action_attempts.rb} +9 -0
  54. data/lib/seam/routes/client_sessions.rb +102 -0
  55. data/lib/seam/routes/connect_webviews.rb +72 -0
  56. data/lib/seam/routes/connected_accounts.rb +77 -0
  57. data/lib/seam/routes/{clients/connected_accounts_simulate.rb → connected_accounts_simulate.rb} +3 -0
  58. data/lib/seam/routes/customers.rb +87 -0
  59. data/lib/seam/routes/devices.rb +95 -0
  60. data/lib/seam/routes/devices_simulate.rb +76 -0
  61. data/lib/seam/routes/devices_unmanaged.rb +66 -0
  62. data/lib/seam/routes/events.rb +59 -0
  63. data/lib/seam/routes/{clients/instant_keys.rb → instant_keys.rb} +10 -0
  64. data/lib/seam/routes/locks.rb +89 -0
  65. data/lib/seam/routes/{clients/locks_simulate.rb → locks_simulate.rb} +7 -0
  66. data/lib/seam/routes/noise_sensors.rb +45 -0
  67. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +69 -0
  68. data/lib/seam/routes/noise_sensors_simulate.rb +21 -0
  69. data/lib/seam/routes/phones.rb +44 -0
  70. data/lib/seam/routes/phones_simulate.rb +24 -0
  71. data/lib/seam/routes/spaces.rb +145 -0
  72. data/lib/seam/routes/thermostats.rb +238 -0
  73. data/lib/seam/routes/{clients/thermostats_daily_programs.rb → thermostats_daily_programs.rb} +13 -0
  74. data/lib/seam/routes/thermostats_schedules.rb +70 -0
  75. data/lib/seam/routes/thermostats_simulate.rb +37 -0
  76. data/lib/seam/routes/user_identities.rb +167 -0
  77. data/lib/seam/routes/user_identities_unmanaged.rb +46 -0
  78. data/lib/seam/routes/{clients/webhooks.rb → webhooks.rb} +16 -0
  79. data/lib/seam/routes/workspaces.rb +77 -0
  80. data/lib/seam/version.rb +1 -1
  81. data/lib/seam/webhook.rb +1 -1
  82. metadata +83 -80
  83. data/lib/seam/routes/clients/access_codes.rb +0 -80
  84. data/lib/seam/routes/clients/access_codes_simulate.rb +0 -18
  85. data/lib/seam/routes/clients/access_codes_unmanaged.rb +0 -42
  86. data/lib/seam/routes/clients/access_grants.rb +0 -58
  87. data/lib/seam/routes/clients/access_grants_unmanaged.rb +0 -30
  88. data/lib/seam/routes/clients/access_methods.rb +0 -66
  89. data/lib/seam/routes/clients/access_methods_unmanaged.rb +0 -24
  90. data/lib/seam/routes/clients/acs_access_groups.rb +0 -54
  91. data/lib/seam/routes/clients/acs_credentials.rb +0 -60
  92. data/lib/seam/routes/clients/acs_encoders_simulate.rb +0 -36
  93. data/lib/seam/routes/clients/acs_entrances.rb +0 -46
  94. data/lib/seam/routes/clients/acs_systems.rb +0 -36
  95. data/lib/seam/routes/clients/acs_users.rb +0 -78
  96. data/lib/seam/routes/clients/client_sessions.rb +0 -54
  97. data/lib/seam/routes/clients/connect_webviews.rb +0 -36
  98. data/lib/seam/routes/clients/connected_accounts.rb +0 -46
  99. data/lib/seam/routes/clients/customers.rb +0 -30
  100. data/lib/seam/routes/clients/devices.rb +0 -50
  101. data/lib/seam/routes/clients/devices_simulate.rb +0 -48
  102. data/lib/seam/routes/clients/devices_unmanaged.rb +0 -30
  103. data/lib/seam/routes/clients/events.rb +0 -24
  104. data/lib/seam/routes/clients/locks.rb +0 -54
  105. data/lib/seam/routes/clients/noise_sensors.rb +0 -26
  106. data/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +0 -42
  107. data/lib/seam/routes/clients/noise_sensors_simulate.rb +0 -18
  108. data/lib/seam/routes/clients/phones.rb +0 -34
  109. data/lib/seam/routes/clients/phones_simulate.rb +0 -18
  110. data/lib/seam/routes/clients/spaces.rb +0 -84
  111. data/lib/seam/routes/clients/thermostats.rb +0 -126
  112. data/lib/seam/routes/clients/thermostats_schedules.rb +0 -42
  113. data/lib/seam/routes/clients/thermostats_simulate.rb +0 -24
  114. data/lib/seam/routes/clients/user_identities.rb +0 -100
  115. data/lib/seam/routes/clients/user_identities_unmanaged.rb +0 -30
  116. data/lib/seam/routes/clients/workspaces.rb +0 -46
  117. data/lib/seam/routes/resources/access_code.rb +0 -14
  118. data/lib/seam/routes/resources/access_grant.rb +0 -14
  119. data/lib/seam/routes/resources/access_method.rb +0 -14
  120. data/lib/seam/routes/resources/acs_access_group.rb +0 -14
  121. data/lib/seam/routes/resources/acs_credential.rb +0 -14
  122. data/lib/seam/routes/resources/acs_encoder.rb +0 -13
  123. data/lib/seam/routes/resources/acs_entrance.rb +0 -14
  124. data/lib/seam/routes/resources/acs_system.rb +0 -14
  125. data/lib/seam/routes/resources/acs_user.rb +0 -14
  126. data/lib/seam/routes/resources/action_attempt.rb +0 -9
  127. data/lib/seam/routes/resources/batch.rb +0 -9
  128. data/lib/seam/routes/resources/client_session.rb +0 -11
  129. data/lib/seam/routes/resources/connect_webview.rb +0 -11
  130. data/lib/seam/routes/resources/connected_account.rb +0 -14
  131. data/lib/seam/routes/resources/customer_portal.rb +0 -11
  132. data/lib/seam/routes/resources/device.rb +0 -14
  133. data/lib/seam/routes/resources/device_provider.rb +0 -9
  134. data/lib/seam/routes/resources/event.rb +0 -11
  135. data/lib/seam/routes/resources/instant_key.rb +0 -11
  136. data/lib/seam/routes/resources/noise_threshold.rb +0 -9
  137. data/lib/seam/routes/resources/pagination.rb +0 -9
  138. data/lib/seam/routes/resources/phone.rb +0 -14
  139. data/lib/seam/routes/resources/space.rb +0 -11
  140. data/lib/seam/routes/resources/thermostat_daily_program.rb +0 -11
  141. data/lib/seam/routes/resources/thermostat_schedule.rb +0 -13
  142. data/lib/seam/routes/resources/unmanaged_access_code.rb +0 -14
  143. data/lib/seam/routes/resources/unmanaged_device.rb +0 -14
  144. data/lib/seam/routes/resources/user_identity.rb +0 -14
  145. data/lib/seam/routes/resources/webhook.rb +0 -9
  146. data/lib/seam/routes/resources/workspace.rb +0 -9
  147. /data/lib/seam/{routes/resources → resources}/resource_error.rb +0 -0
  148. /data/lib/seam/{routes/resources → resources}/resource_errors_support.rb +0 -0
  149. /data/lib/seam/{routes/resources → resources}/resource_warning.rb +0 -0
  150. /data/lib/seam/{routes/resources → resources}/resource_warnings_support.rb +0 -0
  151. /data/lib/seam/routes/{clients/acs.rb → acs.rb} +0 -0
  152. /data/lib/seam/routes/{clients/index.rb → index.rb} +0 -0
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class ConnectedAccounts
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def simulate
12
- @simulate ||= Seam::Clients::ConnectedAccountsSimulate.new(client: @client, defaults: @defaults)
13
- end
14
-
15
- def delete(connected_account_id:)
16
- @client.post("/connected_accounts/delete", {connected_account_id: connected_account_id}.compact)
17
-
18
- nil
19
- end
20
-
21
- def get(connected_account_id: nil, email: nil)
22
- res = @client.post("/connected_accounts/get", {connected_account_id: connected_account_id, email: email}.compact)
23
-
24
- Seam::Resources::ConnectedAccount.load_from_response(res.body["connected_account"])
25
- end
26
-
27
- def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, space_id: nil, user_identifier_key: nil)
28
- res = @client.post("/connected_accounts/list", {custom_metadata_has: custom_metadata_has, customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, space_id: space_id, user_identifier_key: user_identifier_key}.compact)
29
-
30
- Seam::Resources::ConnectedAccount.load_from_response(res.body["connected_accounts"])
31
- end
32
-
33
- def sync(connected_account_id:)
34
- @client.post("/connected_accounts/sync", {connected_account_id: connected_account_id}.compact)
35
-
36
- nil
37
- end
38
-
39
- def update(connected_account_id:, accepted_capabilities: nil, automatically_manage_new_devices: nil, custom_metadata: nil, customer_key: nil, display_name: nil)
40
- @client.post("/connected_accounts/update", {connected_account_id: connected_account_id, accepted_capabilities: accepted_capabilities, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, customer_key: customer_key, display_name: display_name}.compact)
41
-
42
- nil
43
- end
44
- end
45
- end
46
- end
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Customers
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def create_portal(customer_resources_filters: nil, customization_profile_id: nil, deep_link: nil, exclude_locale_picker: nil, features: nil, is_embedded: nil, landing_page: nil, locale: nil, navigation_mode: nil, read_only: nil, customer_data: nil)
12
- res = @client.post("/customers/create_portal", {customer_resources_filters: customer_resources_filters, customization_profile_id: customization_profile_id, deep_link: deep_link, exclude_locale_picker: exclude_locale_picker, features: features, is_embedded: is_embedded, landing_page: landing_page, locale: locale, navigation_mode: navigation_mode, read_only: read_only, customer_data: customer_data}.compact)
13
-
14
- Seam::Resources::CustomerPortal.load_from_response(res.body["customer_portal"])
15
- end
16
-
17
- def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, common_area_keys: nil, customer_keys: nil, facility_keys: nil, guest_keys: nil, listing_keys: nil, property_keys: nil, property_listing_keys: nil, reservation_keys: nil, resident_keys: nil, room_keys: nil, space_keys: nil, staff_member_keys: nil, tenant_keys: nil, unit_keys: nil, user_identity_keys: nil, user_keys: nil)
18
- @client.post("/customers/delete_data", {access_grant_keys: access_grant_keys, booking_keys: booking_keys, building_keys: building_keys, common_area_keys: common_area_keys, customer_keys: customer_keys, facility_keys: facility_keys, guest_keys: guest_keys, listing_keys: listing_keys, property_keys: property_keys, property_listing_keys: property_listing_keys, reservation_keys: reservation_keys, resident_keys: resident_keys, room_keys: room_keys, space_keys: space_keys, staff_member_keys: staff_member_keys, tenant_keys: tenant_keys, unit_keys: unit_keys, user_identity_keys: user_identity_keys, user_keys: user_keys}.compact)
19
-
20
- nil
21
- end
22
-
23
- def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil)
24
- @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, facilities: facilities, guests: guests, listings: listings, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staff_members: staff_members, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact)
25
-
26
- nil
27
- end
28
- end
29
- end
30
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Devices
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def simulate
12
- @simulate ||= Seam::Clients::DevicesSimulate.new(client: @client, defaults: @defaults)
13
- end
14
-
15
- def unmanaged
16
- @unmanaged ||= Seam::Clients::DevicesUnmanaged.new(client: @client, defaults: @defaults)
17
- end
18
-
19
- def get(device_id: nil, name: nil)
20
- res = @client.post("/devices/get", {device_id: device_id, name: name}.compact)
21
-
22
- Seam::Resources::Device.load_from_response(res.body["device"])
23
- end
24
-
25
- def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
26
- res = @client.post("/devices/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
27
-
28
- Seam::Resources::Device.load_from_response(res.body["devices"])
29
- end
30
-
31
- def list_device_providers(provider_category: nil)
32
- res = @client.post("/devices/list_device_providers", {provider_category: provider_category}.compact)
33
-
34
- Seam::Resources::DeviceProvider.load_from_response(res.body["device_providers"])
35
- end
36
-
37
- def report_provider_metadata(devices:)
38
- @client.post("/devices/report_provider_metadata", {devices: devices}.compact)
39
-
40
- nil
41
- end
42
-
43
- def update(device_id:, backup_access_code_pool_enabled: nil, custom_metadata: nil, is_managed: nil, name: nil, properties: nil)
44
- @client.post("/devices/update", {device_id: device_id, backup_access_code_pool_enabled: backup_access_code_pool_enabled, custom_metadata: custom_metadata, is_managed: is_managed, name: name, properties: properties}.compact)
45
-
46
- nil
47
- end
48
- end
49
- end
50
- end
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class DevicesSimulate
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def connect(device_id:)
12
- @client.post("/devices/simulate/connect", {device_id: device_id}.compact)
13
-
14
- nil
15
- end
16
-
17
- def connect_to_hub(device_id:)
18
- @client.post("/devices/simulate/connect_to_hub", {device_id: device_id}.compact)
19
-
20
- nil
21
- end
22
-
23
- def disconnect(device_id:)
24
- @client.post("/devices/simulate/disconnect", {device_id: device_id}.compact)
25
-
26
- nil
27
- end
28
-
29
- def disconnect_from_hub(device_id:)
30
- @client.post("/devices/simulate/disconnect_from_hub", {device_id: device_id}.compact)
31
-
32
- nil
33
- end
34
-
35
- def paid_subscription(device_id:, is_expired:)
36
- @client.post("/devices/simulate/paid_subscription", {device_id: device_id, is_expired: is_expired}.compact)
37
-
38
- nil
39
- end
40
-
41
- def remove(device_id:)
42
- @client.post("/devices/simulate/remove", {device_id: device_id}.compact)
43
-
44
- nil
45
- end
46
- end
47
- end
48
- end
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class DevicesUnmanaged
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def get(device_id: nil, name: nil)
12
- res = @client.post("/devices/unmanaged/get", {device_id: device_id, name: name}.compact)
13
-
14
- Seam::Resources::UnmanagedDevice.load_from_response(res.body["device"])
15
- end
16
-
17
- def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
18
- res = @client.post("/devices/unmanaged/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
19
-
20
- Seam::Resources::UnmanagedDevice.load_from_response(res.body["devices"])
21
- end
22
-
23
- def update(device_id:, custom_metadata: nil, is_managed: nil)
24
- @client.post("/devices/unmanaged/update", {device_id: device_id, custom_metadata: custom_metadata, is_managed: is_managed}.compact)
25
-
26
- nil
27
- end
28
- end
29
- end
30
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Events
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def get(event_id: nil, device_id: nil, event_type: nil)
12
- res = @client.post("/events/get", {event_id: event_id, device_id: device_id, event_type: event_type}.compact)
13
-
14
- Seam::Resources::SeamEvent.load_from_response(res.body["event"])
15
- end
16
-
17
- def list(access_code_id: nil, access_code_ids: nil, access_grant_id: nil, access_grant_ids: nil, access_method_id: nil, access_method_ids: nil, acs_access_group_id: nil, acs_credential_id: nil, acs_encoder_id: nil, acs_entrance_id: nil, acs_system_id: nil, acs_system_ids: nil, acs_user_id: nil, between: nil, connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_id: nil, device_ids: nil, event_ids: nil, event_type: nil, event_types: nil, limit: nil, since: nil, space_id: nil, space_ids: nil, unstable_offset: nil, user_identity_id: nil)
18
- res = @client.post("/events/list", {access_code_id: access_code_id, access_code_ids: access_code_ids, access_grant_id: access_grant_id, access_grant_ids: access_grant_ids, access_method_id: access_method_id, access_method_ids: access_method_ids, acs_access_group_id: acs_access_group_id, acs_credential_id: acs_credential_id, acs_encoder_id: acs_encoder_id, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, acs_user_id: acs_user_id, between: between, connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_id: device_id, device_ids: device_ids, event_ids: event_ids, event_type: event_type, event_types: event_types, limit: limit, since: since, space_id: space_id, space_ids: space_ids, unstable_offset: unstable_offset, user_identity_id: user_identity_id}.compact)
19
-
20
- Seam::Resources::SeamEvent.load_from_response(res.body["events"])
21
- end
22
- end
23
- end
24
- end
@@ -1,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "seam/helpers/action_attempt"
4
-
5
- module Seam
6
- module Clients
7
- class Locks
8
- def initialize(client:, defaults:)
9
- @client = client
10
- @defaults = defaults
11
- end
12
-
13
- def simulate
14
- @simulate ||= Seam::Clients::LocksSimulate.new(client: @client, defaults: @defaults)
15
- end
16
-
17
- def configure_auto_lock(auto_lock_enabled:, device_id:, auto_lock_delay_seconds: nil, wait_for_action_attempt: nil)
18
- res = @client.post("/locks/configure_auto_lock", {auto_lock_enabled: auto_lock_enabled, device_id: device_id, auto_lock_delay_seconds: auto_lock_delay_seconds}.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 get(device_id: nil, name: nil)
26
- res = @client.post("/locks/get", {device_id: device_id, name: name}.compact)
27
-
28
- Seam::Resources::Device.load_from_response(res.body["device"])
29
- end
30
-
31
- def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
32
- res = @client.post("/locks/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
33
-
34
- Seam::Resources::Device.load_from_response(res.body["devices"])
35
- end
36
-
37
- def lock_door(device_id:, wait_for_action_attempt: nil)
38
- res = @client.post("/locks/lock_door", {device_id: device_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
-
45
- def unlock_door(device_id:, wait_for_action_attempt: nil)
46
- res = @client.post("/locks/unlock_door", {device_id: device_id}.compact)
47
-
48
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
49
-
50
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
51
- end
52
- end
53
- end
54
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class NoiseSensors
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def noise_thresholds
12
- @noise_thresholds ||= Seam::Clients::NoiseSensorsNoiseThresholds.new(client: @client, defaults: @defaults)
13
- end
14
-
15
- def simulate
16
- @simulate ||= Seam::Clients::NoiseSensorsSimulate.new(client: @client, defaults: @defaults)
17
- end
18
-
19
- def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
20
- res = @client.post("/noise_sensors/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
21
-
22
- Seam::Resources::Device.load_from_response(res.body["devices"])
23
- end
24
- end
25
- end
26
- end
@@ -1,42 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class NoiseSensorsNoiseThresholds
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil)
12
- res = @client.post("/noise_sensors/noise_thresholds/create", {device_id: device_id, ends_daily_at: ends_daily_at, starts_daily_at: starts_daily_at, name: name, noise_threshold_decibels: noise_threshold_decibels, noise_threshold_nrs: noise_threshold_nrs}.compact)
13
-
14
- Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"])
15
- end
16
-
17
- def delete(device_id:, noise_threshold_id:)
18
- @client.post("/noise_sensors/noise_thresholds/delete", {device_id: device_id, noise_threshold_id: noise_threshold_id}.compact)
19
-
20
- nil
21
- end
22
-
23
- def get(noise_threshold_id:)
24
- res = @client.post("/noise_sensors/noise_thresholds/get", {noise_threshold_id: noise_threshold_id}.compact)
25
-
26
- Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"])
27
- end
28
-
29
- def list(device_id:)
30
- res = @client.post("/noise_sensors/noise_thresholds/list", {device_id: device_id}.compact)
31
-
32
- Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_thresholds"])
33
- end
34
-
35
- def update(device_id:, noise_threshold_id:, ends_daily_at: nil, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil, starts_daily_at: nil)
36
- @client.post("/noise_sensors/noise_thresholds/update", {device_id: device_id, noise_threshold_id: noise_threshold_id, ends_daily_at: ends_daily_at, name: name, noise_threshold_decibels: noise_threshold_decibels, noise_threshold_nrs: noise_threshold_nrs, starts_daily_at: starts_daily_at}.compact)
37
-
38
- nil
39
- end
40
- end
41
- end
42
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class NoiseSensorsSimulate
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def trigger_noise_threshold(device_id:)
12
- @client.post("/noise_sensors/simulate/trigger_noise_threshold", {device_id: device_id}.compact)
13
-
14
- nil
15
- end
16
- end
17
- end
18
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Phones
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def simulate
12
- @simulate ||= Seam::Clients::PhonesSimulate.new(client: @client, defaults: @defaults)
13
- end
14
-
15
- def deactivate(device_id:)
16
- @client.post("/phones/deactivate", {device_id: device_id}.compact)
17
-
18
- nil
19
- end
20
-
21
- def get(device_id:)
22
- res = @client.post("/phones/get", {device_id: device_id}.compact)
23
-
24
- Seam::Resources::Phone.load_from_response(res.body["phone"])
25
- end
26
-
27
- def list(acs_credential_id: nil, owner_user_identity_id: nil)
28
- res = @client.post("/phones/list", {acs_credential_id: acs_credential_id, owner_user_identity_id: owner_user_identity_id}.compact)
29
-
30
- Seam::Resources::Phone.load_from_response(res.body["phones"])
31
- end
32
- end
33
- end
34
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class PhonesSimulate
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def create_sandbox_phone(user_identity_id:, assa_abloy_metadata: nil, custom_sdk_installation_id: nil, phone_metadata: nil)
12
- res = @client.post("/phones/simulate/create_sandbox_phone", {user_identity_id: user_identity_id, assa_abloy_metadata: assa_abloy_metadata, custom_sdk_installation_id: custom_sdk_installation_id, phone_metadata: phone_metadata}.compact)
13
-
14
- Seam::Resources::Phone.load_from_response(res.body["phone"])
15
- end
16
- end
17
- end
18
- end
@@ -1,84 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Spaces
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def add_acs_entrances(acs_entrance_ids:, space_id:)
12
- @client.post("/spaces/add_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
13
-
14
- nil
15
- end
16
-
17
- def add_connected_account(connected_account_id:, space_id:)
18
- @client.post("/spaces/add_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
19
-
20
- nil
21
- end
22
-
23
- def add_devices(device_ids:, space_id:)
24
- @client.post("/spaces/add_devices", {device_ids: device_ids, space_id: space_id}.compact)
25
-
26
- nil
27
- end
28
-
29
- def create(name:, acs_entrance_ids: nil, connected_account_ids: nil, customer_data: nil, customer_key: nil, device_ids: nil, space_key: nil)
30
- res = @client.post("/spaces/create", {name: name, acs_entrance_ids: acs_entrance_ids, connected_account_ids: connected_account_ids, customer_data: customer_data, customer_key: customer_key, device_ids: device_ids, space_key: space_key}.compact)
31
-
32
- Seam::Resources::Space.load_from_response(res.body["space"])
33
- end
34
-
35
- def delete(space_id:)
36
- @client.post("/spaces/delete", {space_id: space_id}.compact)
37
-
38
- nil
39
- end
40
-
41
- def get(space_id: nil, space_key: nil)
42
- res = @client.post("/spaces/get", {space_id: space_id, space_key: space_key}.compact)
43
-
44
- Seam::Resources::Space.load_from_response(res.body["space"])
45
- end
46
-
47
- def get_related(exclude: nil, include: nil, space_ids: nil, space_keys: nil)
48
- res = @client.post("/spaces/get_related", {exclude: exclude, include: include, space_ids: space_ids, space_keys: space_keys}.compact)
49
-
50
- Seam::Resources::Batch.load_from_response(res.body["batch"])
51
- end
52
-
53
- def list(customer_key: nil, limit: nil, page_cursor: nil, search: nil, space_key: nil)
54
- res = @client.post("/spaces/list", {customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, space_key: space_key}.compact)
55
-
56
- Seam::Resources::Space.load_from_response(res.body["spaces"])
57
- end
58
-
59
- def remove_acs_entrances(acs_entrance_ids:, space_id:)
60
- @client.post("/spaces/remove_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
61
-
62
- nil
63
- end
64
-
65
- def remove_connected_account(connected_account_id:, space_id:)
66
- @client.post("/spaces/remove_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
67
-
68
- nil
69
- end
70
-
71
- def remove_devices(device_ids:, space_id:)
72
- @client.post("/spaces/remove_devices", {device_ids: device_ids, space_id: space_id}.compact)
73
-
74
- nil
75
- end
76
-
77
- def update(acs_entrance_ids: nil, customer_data: nil, device_ids: nil, name: nil, space_id: nil, space_key: nil)
78
- res = @client.post("/spaces/update", {acs_entrance_ids: acs_entrance_ids, customer_data: customer_data, device_ids: device_ids, name: name, space_id: space_id, space_key: space_key}.compact)
79
-
80
- Seam::Resources::Space.load_from_response(res.body["space"])
81
- end
82
- end
83
- end
84
- end
@@ -1,126 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "seam/helpers/action_attempt"
4
-
5
- module Seam
6
- module Clients
7
- class Thermostats
8
- def initialize(client:, defaults:)
9
- @client = client
10
- @defaults = defaults
11
- end
12
-
13
- def daily_programs
14
- @daily_programs ||= Seam::Clients::ThermostatsDailyPrograms.new(client: @client, defaults: @defaults)
15
- end
16
-
17
- def schedules
18
- @schedules ||= Seam::Clients::ThermostatsSchedules.new(client: @client, defaults: @defaults)
19
- end
20
-
21
- def simulate
22
- @simulate ||= Seam::Clients::ThermostatsSimulate.new(client: @client, defaults: @defaults)
23
- end
24
-
25
- def activate_climate_preset(climate_preset_key:, device_id:, wait_for_action_attempt: nil)
26
- res = @client.post("/thermostats/activate_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
27
-
28
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
29
-
30
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
31
- end
32
-
33
- def cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
34
- res = @client.post("/thermostats/cool", {device_id: device_id, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit}.compact)
35
-
36
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
37
-
38
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
39
- end
40
-
41
- def create_climate_preset(climate_preset_key:, device_id:, climate_preset_mode: nil, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, ecobee_metadata: nil, fan_mode_setting: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, hvac_mode_setting: nil, manual_override_allowed: nil, name: nil)
42
- @client.post("/thermostats/create_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id, climate_preset_mode: climate_preset_mode, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, ecobee_metadata: ecobee_metadata, fan_mode_setting: fan_mode_setting, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit, hvac_mode_setting: hvac_mode_setting, manual_override_allowed: manual_override_allowed, name: name}.compact)
43
-
44
- nil
45
- end
46
-
47
- def delete_climate_preset(climate_preset_key:, device_id:)
48
- @client.post("/thermostats/delete_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
49
-
50
- nil
51
- end
52
-
53
- def heat(device_id:, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
54
- res = @client.post("/thermostats/heat", {device_id: device_id, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit}.compact)
55
-
56
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
57
-
58
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
59
- end
60
-
61
- def heat_cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
62
- res = @client.post("/thermostats/heat_cool", {device_id: device_id, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit}.compact)
63
-
64
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
65
-
66
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
67
- end
68
-
69
- def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
70
- res = @client.post("/thermostats/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
71
-
72
- Seam::Resources::Device.load_from_response(res.body["devices"])
73
- end
74
-
75
- def off(device_id:, wait_for_action_attempt: nil)
76
- res = @client.post("/thermostats/off", {device_id: device_id}.compact)
77
-
78
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
79
-
80
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
81
- end
82
-
83
- def set_fallback_climate_preset(climate_preset_key:, device_id:)
84
- @client.post("/thermostats/set_fallback_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
85
-
86
- nil
87
- end
88
-
89
- def set_fan_mode(device_id:, fan_mode: nil, fan_mode_setting: nil, wait_for_action_attempt: nil)
90
- res = @client.post("/thermostats/set_fan_mode", {device_id: device_id, fan_mode: fan_mode, fan_mode_setting: fan_mode_setting}.compact)
91
-
92
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
93
-
94
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
95
- end
96
-
97
- def set_hvac_mode(device_id:, hvac_mode_setting:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
98
- res = @client.post("/thermostats/set_hvac_mode", {device_id: device_id, hvac_mode_setting: hvac_mode_setting, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit}.compact)
99
-
100
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
101
-
102
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
103
- end
104
-
105
- def set_temperature_threshold(device_id:, lower_limit_celsius: nil, lower_limit_fahrenheit: nil, upper_limit_celsius: nil, upper_limit_fahrenheit: nil)
106
- @client.post("/thermostats/set_temperature_threshold", {device_id: device_id, lower_limit_celsius: lower_limit_celsius, lower_limit_fahrenheit: lower_limit_fahrenheit, upper_limit_celsius: upper_limit_celsius, upper_limit_fahrenheit: upper_limit_fahrenheit}.compact)
107
-
108
- nil
109
- end
110
-
111
- def update_climate_preset(climate_preset_key:, device_id:, climate_preset_mode: nil, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, ecobee_metadata: nil, fan_mode_setting: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, hvac_mode_setting: nil, manual_override_allowed: nil, name: nil)
112
- @client.post("/thermostats/update_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id, climate_preset_mode: climate_preset_mode, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, ecobee_metadata: ecobee_metadata, fan_mode_setting: fan_mode_setting, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit, hvac_mode_setting: hvac_mode_setting, manual_override_allowed: manual_override_allowed, name: name}.compact)
113
-
114
- nil
115
- end
116
-
117
- def update_weekly_program(device_id:, friday_program_id: nil, monday_program_id: nil, saturday_program_id: nil, sunday_program_id: nil, thursday_program_id: nil, tuesday_program_id: nil, wednesday_program_id: nil, wait_for_action_attempt: nil)
118
- res = @client.post("/thermostats/update_weekly_program", {device_id: device_id, friday_program_id: friday_program_id, monday_program_id: monday_program_id, saturday_program_id: saturday_program_id, sunday_program_id: sunday_program_id, thursday_program_id: thursday_program_id, tuesday_program_id: tuesday_program_id, wednesday_program_id: wednesday_program_id}.compact)
119
-
120
- wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
121
-
122
- Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
123
- end
124
- end
125
- end
126
- end