seam 2.0.0a2 → 2.0.0b0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +54 -51
  3. data/README.md +323 -3
  4. data/Rakefile +4 -1
  5. data/lib/seam/auth.rb +118 -0
  6. data/lib/seam/base_resource.rb +63 -0
  7. data/lib/seam/deep_hash_accessor.rb +37 -0
  8. data/lib/seam/default_endpoint.rb +5 -0
  9. data/lib/seam/helpers/action_attempt.rb +45 -0
  10. data/lib/seam/http.rb +52 -0
  11. data/lib/seam/http_multi_workspace.rb +62 -0
  12. data/lib/seam/http_single_workspace.rb +42 -0
  13. data/lib/seam/options.rb +64 -0
  14. data/lib/seam/parse_options.rb +23 -0
  15. data/lib/seam/request.rb +82 -51
  16. data/lib/seam/routes/clients/access_codes.rb +74 -0
  17. data/lib/seam/routes/clients/access_codes_simulate.rb +18 -0
  18. data/lib/seam/routes/clients/access_codes_unmanaged.rb +42 -0
  19. data/lib/seam/routes/clients/acs.rb +44 -0
  20. data/lib/seam/routes/clients/acs_access_groups.rb +48 -0
  21. data/lib/seam/routes/clients/acs_access_groups_unmanaged.rb +24 -0
  22. data/lib/seam/routes/clients/acs_credential_pools.rb +18 -0
  23. data/lib/seam/routes/clients/acs_credential_provisioning_automations.rb +18 -0
  24. data/lib/seam/routes/clients/acs_credentials.rb +60 -0
  25. data/lib/seam/routes/clients/acs_credentials_unmanaged.rb +24 -0
  26. data/lib/seam/routes/clients/acs_encoders.rb +36 -0
  27. data/lib/seam/routes/clients/acs_entrances.rb +36 -0
  28. data/lib/seam/routes/clients/acs_systems.rb +30 -0
  29. data/lib/seam/routes/clients/acs_users.rb +78 -0
  30. data/lib/seam/routes/clients/acs_users_unmanaged.rb +24 -0
  31. data/lib/seam/routes/clients/action_attempts.rb +28 -0
  32. data/lib/seam/routes/clients/client_sessions.rb +54 -0
  33. data/lib/seam/routes/clients/connect_webviews.rb +36 -0
  34. data/lib/seam/routes/clients/connected_accounts.rb +36 -0
  35. data/lib/seam/routes/clients/devices.rb +50 -0
  36. data/lib/seam/routes/clients/devices_simulate.rb +30 -0
  37. data/lib/seam/routes/clients/devices_unmanaged.rb +30 -0
  38. data/lib/seam/routes/clients/events.rb +24 -0
  39. data/lib/seam/routes/clients/index.rb +38 -0
  40. data/lib/seam/routes/clients/locks.rb +42 -0
  41. data/lib/seam/routes/clients/networks.rb +24 -0
  42. data/lib/seam/routes/clients/noise_sensors.rb +26 -0
  43. data/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +42 -0
  44. data/lib/seam/routes/clients/noise_sensors_simulate.rb +18 -0
  45. data/lib/seam/routes/clients/phones.rb +28 -0
  46. data/lib/seam/routes/clients/phones_simulate.rb +18 -0
  47. data/lib/seam/routes/clients/thermostats.rb +108 -0
  48. data/lib/seam/routes/clients/thermostats_schedules.rb +42 -0
  49. data/lib/seam/routes/clients/user_identities.rb +88 -0
  50. data/lib/seam/routes/clients/user_identities_enrollment_automations.rb +36 -0
  51. data/lib/seam/routes/clients/webhooks.rb +42 -0
  52. data/lib/seam/routes/clients/workspaces.rb +40 -0
  53. data/lib/seam/routes/resources/access_code.rb +14 -0
  54. data/lib/seam/routes/resources/acs_access_group.rb +11 -0
  55. data/lib/seam/routes/resources/acs_credential.rb +14 -0
  56. data/lib/seam/routes/resources/acs_credential_pool.rb +11 -0
  57. data/lib/seam/routes/resources/acs_credential_provisioning_automation.rb +11 -0
  58. data/lib/seam/routes/resources/acs_entrance.rb +13 -0
  59. data/lib/seam/routes/resources/acs_system.rb +14 -0
  60. data/lib/seam/routes/resources/acs_user.rb +14 -0
  61. data/lib/seam/routes/resources/action_attempt.rb +9 -0
  62. data/lib/seam/routes/resources/client_session.rb +11 -0
  63. data/lib/seam/routes/resources/connect_webview.rb +11 -0
  64. data/lib/seam/routes/resources/connected_account.rb +14 -0
  65. data/lib/seam/routes/resources/device.rb +14 -0
  66. data/lib/seam/routes/resources/device_provider.rb +9 -0
  67. data/lib/seam/routes/resources/enrollment_automation.rb +11 -0
  68. data/lib/seam/routes/resources/event.rb +11 -0
  69. data/lib/seam/routes/resources/index.rb +33 -0
  70. data/lib/seam/routes/resources/network.rb +11 -0
  71. data/lib/seam/routes/resources/noise_threshold.rb +9 -0
  72. data/lib/seam/routes/resources/phone.rb +14 -0
  73. data/lib/seam/routes/resources/resource_error.rb +11 -0
  74. data/lib/seam/routes/resources/resource_errors_support.rb +11 -0
  75. data/lib/seam/routes/resources/resource_warning.rb +11 -0
  76. data/lib/seam/routes/resources/resource_warnings_support.rb +11 -0
  77. data/lib/seam/routes/resources/service_health.rb +9 -0
  78. data/lib/seam/routes/resources/thermostat_schedule.rb +13 -0
  79. data/lib/seam/routes/resources/unmanaged_access_code.rb +14 -0
  80. data/lib/seam/routes/resources/unmanaged_device.rb +14 -0
  81. data/lib/seam/routes/resources/user_identity.rb +11 -0
  82. data/lib/seam/routes/resources/webhook.rb +9 -0
  83. data/lib/seam/routes/resources/workspace.rb +9 -0
  84. data/lib/seam/routes/routes.rb +94 -0
  85. data/lib/seam/token.rb +53 -0
  86. data/lib/seam/version.rb +1 -1
  87. data/lib/seam/wait_for_action_attempt.rb +32 -0
  88. data/lib/seam/webhook.rb +22 -0
  89. data/lib/seam.rb +19 -68
  90. metadata +115 -70
  91. data/lib/seam/client.rb +0 -129
  92. data/lib/seam/clients/access_codes.rb +0 -95
  93. data/lib/seam/clients/access_codes_simulate.rb +0 -17
  94. data/lib/seam/clients/access_codes_unmanaged.rb +0 -57
  95. data/lib/seam/clients/acs.rb +0 -35
  96. data/lib/seam/clients/acs_access_groups.rb +0 -57
  97. data/lib/seam/clients/acs_credential_pools.rb +0 -17
  98. data/lib/seam/clients/acs_credential_provisioning_automations.rb +0 -17
  99. data/lib/seam/clients/acs_credentials.rb +0 -77
  100. data/lib/seam/clients/acs_entrances.rb +0 -47
  101. data/lib/seam/clients/acs_systems.rb +0 -27
  102. data/lib/seam/clients/acs_users.rb +0 -117
  103. data/lib/seam/clients/action_attempts.rb +0 -30
  104. data/lib/seam/clients/base_client.rb +0 -21
  105. data/lib/seam/clients/client_sessions.rb +0 -77
  106. data/lib/seam/clients/connect_webviews.rb +0 -47
  107. data/lib/seam/clients/connected_accounts.rb +0 -47
  108. data/lib/seam/clients/devices.rb +0 -65
  109. data/lib/seam/clients/devices_simulate.rb +0 -17
  110. data/lib/seam/clients/devices_unmanaged.rb +0 -37
  111. data/lib/seam/clients/events.rb +0 -27
  112. data/lib/seam/clients/locks.rb +0 -53
  113. data/lib/seam/clients/networks.rb +0 -27
  114. data/lib/seam/clients/noise_sensors.rb +0 -15
  115. data/lib/seam/clients/noise_sensors_noise_thresholds.rb +0 -57
  116. data/lib/seam/clients/noise_sensors_simulate.rb +0 -17
  117. data/lib/seam/clients/phones.rb +0 -31
  118. data/lib/seam/clients/phones_simulate.rb +0 -17
  119. data/lib/seam/clients/thermostats.rb +0 -106
  120. data/lib/seam/clients/thermostats_climate_setting_schedules.rb +0 -57
  121. data/lib/seam/clients/user_identities.rb +0 -131
  122. data/lib/seam/clients/user_identities_enrollment_automations.rb +0 -47
  123. data/lib/seam/clients/webhooks.rb +0 -57
  124. data/lib/seam/clients/workspaces.rb +0 -50
  125. data/lib/seam/resources/access_code.rb +0 -12
  126. data/lib/seam/resources/acs_access_group.rb +0 -9
  127. data/lib/seam/resources/acs_credential.rb +0 -12
  128. data/lib/seam/resources/acs_credential_pool.rb +0 -9
  129. data/lib/seam/resources/acs_credential_provisioning_automation.rb +0 -9
  130. data/lib/seam/resources/acs_entrance.rb +0 -9
  131. data/lib/seam/resources/acs_system.rb +0 -9
  132. data/lib/seam/resources/acs_user.rb +0 -9
  133. data/lib/seam/resources/action_attempt.rb +0 -46
  134. data/lib/seam/resources/base_resource.rb +0 -58
  135. data/lib/seam/resources/client_session.rb +0 -9
  136. data/lib/seam/resources/climate_setting_schedule.rb +0 -11
  137. data/lib/seam/resources/connect_webview.rb +0 -9
  138. data/lib/seam/resources/connected_account.rb +0 -12
  139. data/lib/seam/resources/device.rb +0 -12
  140. data/lib/seam/resources/device_provider.rb +0 -7
  141. data/lib/seam/resources/enrollment_automation.rb +0 -9
  142. data/lib/seam/resources/event.rb +0 -9
  143. data/lib/seam/resources/network.rb +0 -9
  144. data/lib/seam/resources/noise_threshold.rb +0 -7
  145. data/lib/seam/resources/phone.rb +0 -12
  146. data/lib/seam/resources/resource_error.rb +0 -9
  147. data/lib/seam/resources/resource_errors_support.rb +0 -9
  148. data/lib/seam/resources/resource_warning.rb +0 -9
  149. data/lib/seam/resources/resource_warnings_support.rb +0 -9
  150. data/lib/seam/resources/service_health.rb +0 -7
  151. data/lib/seam/resources/unmanaged_access_code.rb +0 -12
  152. data/lib/seam/resources/unmanaged_device.rb +0 -12
  153. data/lib/seam/resources/user_identity.rb +0 -9
  154. data/lib/seam/resources/webhook.rb +0 -7
  155. data/lib/seam/resources/workspace.rb +0 -7
@@ -1,47 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class UserIdentitiesEnrollmentAutomations < BaseClient
6
- def delete(enrollment_automation_id:)
7
- request_seam(
8
- :post,
9
- "/user_identities/enrollment_automations/delete",
10
- body: {enrollment_automation_id: enrollment_automation_id}.compact
11
- )
12
-
13
- nil
14
- end
15
-
16
- def get(enrollment_automation_id:)
17
- request_seam_object(
18
- :post,
19
- "/user_identities/enrollment_automations/get",
20
- Seam::EnrollmentAutomation,
21
- "enrollment_automation",
22
- body: {enrollment_automation_id: enrollment_automation_id}.compact
23
- )
24
- end
25
-
26
- def launch(credential_manager_acs_system_id:, user_identity_id:, acs_credential_pool_id: nil, create_credential_manager_user: nil, credential_manager_acs_user_id: nil)
27
- request_seam(
28
- :post,
29
- "/user_identities/enrollment_automations/launch",
30
- body: {credential_manager_acs_system_id: credential_manager_acs_system_id, user_identity_id: user_identity_id, acs_credential_pool_id: acs_credential_pool_id, create_credential_manager_user: create_credential_manager_user, credential_manager_acs_user_id: credential_manager_acs_user_id}.compact
31
- )
32
-
33
- nil
34
- end
35
-
36
- def list(user_identity_id:)
37
- request_seam_object(
38
- :post,
39
- "/user_identities/enrollment_automations/list",
40
- Seam::EnrollmentAutomation,
41
- "enrollment_automations",
42
- body: {user_identity_id: user_identity_id}.compact
43
- )
44
- end
45
- end
46
- end
47
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Webhooks < BaseClient
6
- def create(url:, event_types: nil)
7
- request_seam_object(
8
- :post,
9
- "/webhooks/create",
10
- Seam::Webhook,
11
- "webhook",
12
- body: {url: url, event_types: event_types}.compact
13
- )
14
- end
15
-
16
- def delete(webhook_id:)
17
- request_seam(
18
- :post,
19
- "/webhooks/delete",
20
- body: {webhook_id: webhook_id}.compact
21
- )
22
-
23
- nil
24
- end
25
-
26
- def get(webhook_id:)
27
- request_seam_object(
28
- :post,
29
- "/webhooks/get",
30
- Seam::Webhook,
31
- "webhook",
32
- body: {webhook_id: webhook_id}.compact
33
- )
34
- end
35
-
36
- def list
37
- request_seam_object(
38
- :post,
39
- "/webhooks/list",
40
- Seam::Webhook,
41
- "webhooks",
42
- body: {}.compact
43
- )
44
- end
45
-
46
- def update(event_types:, webhook_id:)
47
- request_seam(
48
- :post,
49
- "/webhooks/update",
50
- body: {event_types: event_types, webhook_id: webhook_id}.compact
51
- )
52
-
53
- nil
54
- end
55
- end
56
- end
57
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class Workspaces < BaseClient
6
- def create(connect_partner_name:, name:, is_sandbox: nil, webview_logo_shape: nil, webview_primary_button_color: nil)
7
- request_seam_object(
8
- :post,
9
- "/workspaces/create",
10
- Seam::Workspace,
11
- "workspace",
12
- body: {connect_partner_name: connect_partner_name, name: name, is_sandbox: is_sandbox, webview_logo_shape: webview_logo_shape, webview_primary_button_color: webview_primary_button_color}.compact
13
- )
14
- end
15
-
16
- def get
17
- request_seam_object(
18
- :post,
19
- "/workspaces/get",
20
- Seam::Workspace,
21
- "workspace",
22
- body: {}.compact
23
- )
24
- end
25
-
26
- def list
27
- request_seam_object(
28
- :post,
29
- "/workspaces/list",
30
- Seam::Workspace,
31
- "workspaces",
32
- body: {}.compact
33
- )
34
- end
35
-
36
- def reset_sandbox(wait_for_action_attempt: nil)
37
- action_attempt = request_seam_object(
38
- :post,
39
- "/workspaces/reset_sandbox",
40
- Seam::ActionAttempt,
41
- "action_attempt",
42
- body: {}.compact
43
- )
44
-
45
- action_attempt.decide_and_wait(wait_for_action_attempt)
46
- action_attempt
47
- end
48
- end
49
- end
50
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AccessCode < BaseResource
5
- attr_accessor :access_code_id, :code, :common_code_key, :device_id, :is_backup, :is_backup_access_code_available, :is_external_modification_allowed, :is_managed, :is_offline_access_code, :is_one_time_use, :is_scheduled_on_device, :is_waiting_for_code_assignment, :name, :pulled_backup_access_code_id, :status, :type
6
-
7
- date_accessor :created_at, :ends_at, :starts_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsAccessGroup < BaseResource
5
- attr_accessor :access_group_type, :access_group_type_display_name, :acs_access_group_id, :acs_system_id, :external_type, :external_type_display_name, :name, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsCredential < BaseResource
5
- attr_accessor :access_method, :acs_credential_id, :acs_credential_pool_id, :acs_system_id, :acs_user_id, :code, :display_name, :ends_at, :external_type, :external_type_display_name, :is_multi_phone_sync_credential, :parent_acs_credential_id, :starts_at, :visionline_metadata, :workspace_id
6
-
7
- date_accessor :created_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsCredentialPool < BaseResource
5
- attr_accessor :acs_credential_pool_id, :acs_system_id, :display_name, :external_type, :external_type_display_name, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsCredentialProvisioningAutomation < BaseResource
5
- attr_accessor :acs_credential_provisioning_automation_id, :credential_manager_acs_system_id, :user_identity_id, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsEntrance < BaseResource
5
- attr_accessor :acs_entrance_id, :acs_system_id, :display_name, :latch_metadata, :visionline_metadata
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsSystem < BaseResource
5
- attr_accessor :acs_system_id, :can_add_acs_users_to_acs_access_groups, :can_automate_enrollment, :can_create_acs_access_groups, :can_remove_acs_users_from_acs_access_groups, :connected_account_ids, :external_type, :external_type_display_name, :image_alt_text, :image_url, :name, :system_type, :system_type_display_name, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class AcsUser < BaseResource
5
- attr_accessor :access_schedule, :acs_system_id, :acs_user_id, :display_name, :email, :email_address, :external_type, :external_type_display_name, :full_name, :hid_acs_system_id, :is_suspended, :phone_number, :user_identity_email_address, :user_identity_full_name, :user_identity_id, :user_identity_phone_number, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ActionAttempt < BaseResource
5
- attr_accessor :action_attempt_id, :action_type, :error, :result, :status
6
-
7
- def decide_and_wait(wait_for_action_attempt)
8
- wait_decision = wait_for_action_attempt.nil? ? @client.wait_for_action_attempt : wait_for_action_attempt
9
-
10
- if wait_decision == true
11
- wait_until_finished
12
- elsif wait_decision.is_a?(Hash)
13
- wait_until_finished(timeout: wait_decision[:timeout], polling_interval: wait_decision[:polling_interval])
14
- end
15
- end
16
-
17
- def wait_until_finished(timeout: 5.0, polling_interval: 0.5)
18
- time_waiting = 0.0
19
-
20
- while @status == "pending"
21
- sleep(polling_interval)
22
- time_waiting += polling_interval
23
-
24
- raise "Timed out waiting for action attempt to be finished" if time_waiting > timeout
25
-
26
- update!
27
-
28
- raise "Action Attempt failed: #{error["message"]}" if @status == "failed"
29
- end
30
-
31
- self
32
- end
33
-
34
- def update!
35
- response = @client.request_seam(
36
- :post,
37
- "/action_attempts/get",
38
- body: {
39
- action_attempt_id: action_attempt_id
40
- }
41
- )
42
-
43
- update_from_response(response["action_attempt"])
44
- end
45
- end
46
- end
@@ -1,58 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class BaseResource
5
- attr_accessor :data, :client
6
-
7
- def initialize(data, client = nil)
8
- @data = data
9
- @client = client
10
-
11
- @data.each do |key, value|
12
- instance_variable_set(:"@#{key}", value)
13
- end
14
- end
15
-
16
- def update_from_response(data)
17
- @data = data
18
- @data.each do |key, value|
19
- instance_variable_set(:"@#{key}", value)
20
- end
21
- end
22
-
23
- def self.load_from_response(data, client = nil)
24
- if data.is_a?(Array)
25
- data.map { |d| new(d, client) }
26
- else
27
- new(data, client)
28
- end
29
- end
30
-
31
- def inspect
32
- "<#{self.class.name}:#{"0x00%x" % (object_id << 1)}\n" + # rubocop:disable Style/StringConcatenation, Style/FormatString
33
- instance_variables
34
- .map { |k| k.to_s.sub("@", "") }
35
- .filter { |k| k != "data" and k != "client" and respond_to? k }
36
- .map { |k| " #{k}=#{send(k).inspect}" }
37
- .join("\n") + ">"
38
- end
39
-
40
- def self.date_accessor(*attrs)
41
- attrs.each do |attr|
42
- define_method(attr) do
43
- value = instance_variable_get(:"@#{attr}")
44
-
45
- raise "No value for #{attr} set" if value.nil?
46
-
47
- parse_datetime(value)
48
- end
49
- end
50
- end
51
-
52
- protected
53
-
54
- def parse_datetime(value)
55
- Time.parse(value)
56
- end
57
- end
58
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ClientSession < BaseResource
5
- attr_accessor :client_session_id, :connect_webview_ids, :connected_account_ids, :device_count, :token, :user_identifier_key, :user_identity_ids, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ClimateSettingSchedule < BaseResource
5
- attr_accessor :automatic_cooling_enabled, :automatic_heating_enabled, :climate_setting_schedule_id, :cooling_set_point_celsius, :cooling_set_point_fahrenheit, :device_id, :heating_set_point_celsius, :heating_set_point_fahrenheit, :hvac_mode_setting, :manual_override_allowed, :name, :schedule_ends_at, :schedule_starts_at, :schedule_type
6
-
7
- date_accessor :created_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ConnectWebview < BaseResource
5
- attr_accessor :accepted_devices, :accepted_providers, :any_device_allowed, :any_provider_allowed, :automatically_manage_new_devices, :connect_webview_id, :connected_account_id, :custom_metadata, :custom_redirect_failure_url, :custom_redirect_url, :device_selection_mode, :login_successful, :selected_provider, :status, :url, :wait_for_device_creation, :workspace_id
6
-
7
- date_accessor :authorized_at, :created_at
8
- end
9
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ConnectedAccount < BaseResource
5
- attr_accessor :account_type, :account_type_display_name, :automatically_manage_new_devices, :connected_account_id, :custom_metadata, :user_identifier
6
-
7
- date_accessor :created_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class Device < BaseResource
5
- attr_accessor :can_program_offline_access_codes, :can_program_online_access_codes, :can_remotely_lock, :can_remotely_unlock, :can_simulate_removal, :capabilities_supported, :connected_account_id, :custom_metadata, :device_id, :device_type, :display_name, :is_managed, :location, :nickname, :properties, :workspace_id
6
-
7
- date_accessor :created_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class DeviceProvider < BaseResource
5
- attr_accessor :device_provider_name, :display_name, :image_url, :provider_categories
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class EnrollmentAutomation < BaseResource
5
- attr_accessor :credential_manager_acs_system_id, :enrollment_automation_id, :user_identity_id, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class Event < BaseResource
5
- attr_accessor :action_attempt_id, :device_id, :event_id, :event_type, :workspace_id
6
-
7
- date_accessor :created_at, :occurred_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class Network < BaseResource
5
- attr_accessor :display_name, :network_id, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class NoiseThreshold < BaseResource
5
- attr_accessor :device_id, :ends_daily_at, :name, :noise_threshold_decibels, :noise_threshold_id, :noise_threshold_nrs, :starts_daily_at
6
- end
7
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class Phone < BaseResource
5
- attr_accessor :can_program_offline_access_codes, :can_program_online_access_codes, :can_remotely_lock, :can_remotely_unlock, :can_simulate_removal, :capabilities_supported, :custom_metadata, :device_id, :device_type, :display_name, :is_managed, :location, :nickname, :properties, :workspace_id
6
-
7
- date_accessor :created_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ResourceError < BaseResource
5
- attr_accessor :error_code, :message
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module ResourceErrorsSupport
5
- def errors
6
- @errors_converted ||= @errors.is_a?(Array) ? Seam::ResourceError.load_from_response(@errors) : []
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ResourceWarning < BaseResource
5
- attr_accessor :warning_code, :message
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module ResourceWarningsSupport
5
- def warnings
6
- @warnings_converted ||= @warnings.is_a?(Array) ? Seam::ResourceWarning.load_from_response(@warnings) : []
7
- end
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class ServiceHealth < BaseResource
5
- attr_accessor :description, :service, :status
6
- end
7
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class UnmanagedAccessCode < BaseResource
5
- attr_accessor :access_code_id, :code, :device_id, :is_managed, :name, :status, :type
6
-
7
- date_accessor :created_at, :ends_at, :starts_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class UnmanagedDevice < BaseResource
5
- attr_accessor :can_program_offline_access_codes, :can_program_online_access_codes, :can_remotely_lock, :can_remotely_unlock, :can_simulate_removal, :capabilities_supported, :connected_account_id, :device_id, :device_type, :is_managed, :properties, :workspace_id
6
-
7
- date_accessor :created_at
8
-
9
- include Seam::ResourceErrorsSupport
10
- include Seam::ResourceWarningsSupport
11
- end
12
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class UserIdentity < BaseResource
5
- attr_accessor :display_name, :email_address, :full_name, :phone_number, :user_identity_id, :user_identity_key, :workspace_id
6
-
7
- date_accessor :created_at
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class Webhook < BaseResource
5
- attr_accessor :event_types, :secret, :url, :webhook_id
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- class Workspace < BaseResource
5
- attr_accessor :connect_partner_name, :is_sandbox, :name, :workspace_id
6
- end
7
- end