workos 9.0.0 → 9.2.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/.github/workflows/ci.yml +2 -2
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +49 -66
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +101 -14
- data/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +89 -0
- data/Gemfile.lock +4 -4
- data/lib/workos/{directory_sync/dsync_deactivated.rb → api_keys/api_key_updated.rb} +2 -2
- data/lib/workos/api_keys/api_key_updated_data.rb +49 -0
- data/lib/workos/{directory_sync/dsync_deactivated_data_domain.rb → api_keys/api_key_updated_data_owner.rb} +1 -1
- data/lib/workos/api_keys/api_key_updated_data_previous_attribute.rb +18 -0
- data/lib/workos/api_keys/expire_api_key.rb +18 -0
- data/lib/workos/api_keys.rb +25 -0
- data/lib/workos/{types/dsync_deactivated_data_type.rb → authorization/create_group_role_assignment.rb} +1 -3
- data/lib/workos/authorization/delete_group_role_assignments_by_criteria.rb +7 -0
- data/lib/workos/authorization/group_role_assignment.rb +37 -0
- data/lib/workos/authorization/group_role_assignment_list.rb +25 -0
- data/lib/workos/authorization/group_role_assignment_resource.rb +25 -0
- data/lib/workos/authorization/replace_group_role_assignment_entry.rb +7 -0
- data/lib/workos/authorization/replace_group_role_assignments.rb +18 -0
- data/lib/workos/authorization/user_role_assignment_resource.rb +1 -19
- data/lib/workos/authorization.rb +190 -10
- data/lib/workos/base_client.rb +19 -2
- data/lib/workos/client.rb +8 -0
- data/lib/workos/client_api/client_api_token.rb +22 -0
- data/lib/workos/client_api/client_api_token_response.rb +18 -0
- data/lib/workos/client_api.rb +39 -0
- data/lib/workos/connect/user_object.rb +3 -0
- data/lib/workos/connect.rb +1 -1
- data/lib/workos/directory_sync/dsync_token_created.rb +34 -0
- data/lib/workos/directory_sync/dsync_token_created_data.rb +34 -0
- data/lib/workos/directory_sync/dsync_token_revoked.rb +34 -0
- data/lib/workos/directory_sync/dsync_token_revoked_data.rb +7 -0
- data/lib/workos/directory_sync.rb +2 -2
- data/lib/workos/events.rb +1 -1
- data/lib/workos/groups.rb +2 -2
- data/lib/workos/inflections.rb +0 -1
- data/lib/workos/organization_membership_service.rb +2 -2
- data/lib/workos/organizations.rb +1 -1
- data/lib/workos/pipes/connected_account.rb +6 -0
- data/lib/workos/pipes/data_integrations_list_response_data.rb +3 -0
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +6 -0
- data/lib/workos/pipes.rb +5 -5
- data/lib/workos/pipes_provider/configure_data_integration_body.rb +28 -0
- data/lib/workos/pipes_provider/data_integration_configuration_list_response.rb +22 -0
- data/lib/workos/{directory_sync/dsync_deactivated_data.rb → pipes_provider/data_integration_configuration_response.rb} +13 -13
- data/lib/workos/pipes_provider/data_integration_credentials.rb +31 -0
- data/lib/workos/pipes_provider.rb +68 -0
- data/lib/workos/types/audit_log_configuration_log_stream_type.rb +2 -1
- data/lib/workos/types/connected_account_auth_method.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +2 -1
- data/lib/workos/types/data_integration_access_token_response_error.rb +2 -2
- data/lib/workos/types/data_integration_credentials_credentials_type.rb +14 -0
- data/lib/workos/types/{dsync_deactivated_data_state.rb → data_integrations_list_response_data_auth_methods.rb} +1 -1
- data/lib/workos/types/data_integrations_list_response_data_connected_account_auth_method.rb +9 -0
- data/lib/workos/types/radar_standalone_response_control.rb +1 -2
- data/lib/workos/types/widget_session_token_scopes.rb +2 -1
- data/lib/workos/user_management/create_user.rb +3 -0
- data/lib/workos/user_management/email_change_confirmation_user.rb +3 -0
- data/lib/workos/user_management/revoke_session.rb +2 -6
- data/lib/workos/user_management/update_user.rb +3 -0
- data/lib/workos/user_management/user_api_key_updated_data_owner.rb +7 -0
- data/lib/workos/user_management.rb +13 -10
- data/lib/workos/vault/{object.rb → vault_object.rb} +1 -1
- data/lib/workos/vault.rb +4 -4
- data/lib/workos/version.rb +1 -1
- data/lib/workos/webhooks.rb +1 -1
- data/lib/workos/widgets/widget_session_token_response.rb +1 -12
- data/lib/workos.rb +2 -0
- data/rbi/workos/{dsync_deactivated.rbi → api_key_updated.rbi} +3 -3
- data/rbi/workos/api_key_updated_data.rbi +84 -0
- data/rbi/workos/api_key_updated_data_owner.rbi +30 -0
- data/rbi/workos/api_key_updated_data_previous_attribute.rbi +24 -0
- data/rbi/workos/api_keys.rbi +9 -0
- data/rbi/workos/authorization.rbi +63 -0
- data/rbi/workos/authorization_code_session_authenticate_request.rbi +2 -2
- data/rbi/workos/client.rbi +6 -0
- data/rbi/workos/client_api.rbi +22 -0
- data/rbi/workos/client_api_token.rbi +30 -0
- data/rbi/workos/client_api_token_response.rbi +24 -0
- data/rbi/workos/configure_data_integration_body.rbi +42 -0
- data/rbi/workos/connected_account.rbi +12 -0
- data/rbi/workos/create_group_role_assignment.rbi +42 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/data_integration_configuration_list_response.rbi +30 -0
- data/rbi/workos/{dsync_deactivated_data.rbi → data_integration_configuration_response.rbi} +21 -21
- data/rbi/workos/data_integration_credentials.rbi +48 -0
- data/rbi/workos/data_integrations_list_response_data.rbi +6 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +12 -0
- data/rbi/workos/delete_group_role_assignments_by_criteria.rbi +42 -0
- data/rbi/workos/dsync_token_created.rbi +54 -0
- data/rbi/workos/dsync_token_created_data.rbi +54 -0
- data/rbi/workos/dsync_token_revoked.rbi +54 -0
- data/rbi/workos/dsync_token_revoked_data.rbi +54 -0
- data/rbi/workos/email_change_confirmation_user.rbi +6 -0
- data/rbi/workos/expire_api_key.rbi +24 -0
- data/rbi/workos/group_role_assignment.rbi +60 -0
- data/rbi/workos/group_role_assignment_resource.rbi +36 -0
- data/rbi/workos/organization_membership_service.rbi +1 -1
- data/rbi/workos/pipes.rbi +2 -2
- data/rbi/workos/pipes_provider.rbi +34 -0
- data/rbi/workos/refresh_token_session_authenticate_request.rbi +2 -2
- data/rbi/workos/replace_group_role_assignment_entry.rbi +42 -0
- data/rbi/workos/replace_group_role_assignments.rbi +24 -0
- data/rbi/workos/revoke_session.rbi +0 -6
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user.rbi +6 -0
- data/rbi/workos/{dsync_deactivated_data_domain.rbi → user_api_key_updated_data_owner.rbi} +5 -5
- data/rbi/workos/user_management.rbi +8 -7
- data/rbi/workos/user_object.rbi +6 -0
- data/rbi/workos/vault.rbi +2 -2
- data/rbi/workos/{object.rbi → vault_object.rbi} +1 -1
- data/renovate.json +1 -61
- data/test/workos/test_api_keys.rb +9 -1
- data/test/workos/test_authorization.rb +48 -0
- data/test/workos/test_base_client.rb +64 -0
- data/test/workos/test_client_api.rb +33 -0
- data/test/workos/test_model_round_trip.rb +363 -67
- data/test/workos/test_pipes.rb +3 -3
- data/test/workos/test_pipes_provider.rb +41 -0
- data/test/workos/test_user_management.rb +2 -2
- data/test/workos/test_vault.rb +0 -1
- metadata +61 -17
- /data/lib/workos/{authorization → groups}/user_organization_membership_base_list_data.rb +0 -0
|
@@ -11,6 +11,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
11
11
|
"email" => "stub",
|
|
12
12
|
"first_name" => "stub",
|
|
13
13
|
"last_name" => "stub",
|
|
14
|
+
"name" => "stub",
|
|
14
15
|
"metadata" => {}
|
|
15
16
|
}
|
|
16
17
|
model = WorkOS::UserObject.new(fixture.to_json)
|
|
@@ -60,6 +61,16 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
60
61
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
61
62
|
end
|
|
62
63
|
|
|
64
|
+
def test_expire_api_key_round_trip
|
|
65
|
+
fixture = {
|
|
66
|
+
"expires_at" => nil
|
|
67
|
+
}
|
|
68
|
+
model = WorkOS::ExpireApiKey.new(fixture.to_json)
|
|
69
|
+
json = model.to_h
|
|
70
|
+
assert_kind_of Hash, json
|
|
71
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
72
|
+
end
|
|
73
|
+
|
|
63
74
|
def test_redirect_uri_input_round_trip
|
|
64
75
|
fixture = {
|
|
65
76
|
"uri" => "stub",
|
|
@@ -287,6 +298,58 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
287
298
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
288
299
|
end
|
|
289
300
|
|
|
301
|
+
def test_create_group_role_assignment_round_trip
|
|
302
|
+
fixture = {
|
|
303
|
+
"role_slug" => "stub",
|
|
304
|
+
"resource_id" => "stub",
|
|
305
|
+
"resource_external_id" => "stub",
|
|
306
|
+
"resource_type_slug" => "stub"
|
|
307
|
+
}
|
|
308
|
+
model = WorkOS::CreateGroupRoleAssignment.new(fixture.to_json)
|
|
309
|
+
json = model.to_h
|
|
310
|
+
assert_kind_of Hash, json
|
|
311
|
+
assert_equal fixture["role_slug"], json[:role_slug]
|
|
312
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
def test_replace_group_role_assignment_entry_round_trip
|
|
316
|
+
fixture = {
|
|
317
|
+
"role_slug" => "stub",
|
|
318
|
+
"resource_id" => "stub",
|
|
319
|
+
"resource_external_id" => "stub",
|
|
320
|
+
"resource_type_slug" => "stub"
|
|
321
|
+
}
|
|
322
|
+
model = WorkOS::ReplaceGroupRoleAssignmentEntry.new(fixture.to_json)
|
|
323
|
+
json = model.to_h
|
|
324
|
+
assert_kind_of Hash, json
|
|
325
|
+
assert_equal fixture["role_slug"], json[:role_slug]
|
|
326
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
def test_replace_group_role_assignments_round_trip
|
|
330
|
+
fixture = {
|
|
331
|
+
"role_assignments" => []
|
|
332
|
+
}
|
|
333
|
+
model = WorkOS::ReplaceGroupRoleAssignments.new(fixture.to_json)
|
|
334
|
+
json = model.to_h
|
|
335
|
+
assert_kind_of Hash, json
|
|
336
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
def test_delete_group_role_assignments_by_criteria_round_trip
|
|
340
|
+
fixture = {
|
|
341
|
+
"role_slug" => "stub",
|
|
342
|
+
"resource_id" => "stub",
|
|
343
|
+
"resource_external_id" => "stub",
|
|
344
|
+
"resource_type_slug" => "stub"
|
|
345
|
+
}
|
|
346
|
+
model = WorkOS::DeleteGroupRoleAssignmentsByCriteria.new(fixture.to_json)
|
|
347
|
+
json = model.to_h
|
|
348
|
+
assert_kind_of Hash, json
|
|
349
|
+
assert_equal fixture["role_slug"], json[:role_slug]
|
|
350
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
351
|
+
end
|
|
352
|
+
|
|
290
353
|
def test_assign_role_round_trip
|
|
291
354
|
fixture = {
|
|
292
355
|
"role_slug" => "stub",
|
|
@@ -730,6 +793,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
730
793
|
"email" => "stub",
|
|
731
794
|
"first_name" => nil,
|
|
732
795
|
"last_name" => nil,
|
|
796
|
+
"name" => nil,
|
|
733
797
|
"email_verified" => nil,
|
|
734
798
|
"metadata" => nil,
|
|
735
799
|
"external_id" => nil,
|
|
@@ -749,6 +813,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
749
813
|
"email" => "stub",
|
|
750
814
|
"first_name" => "stub",
|
|
751
815
|
"last_name" => "stub",
|
|
816
|
+
"name" => "stub",
|
|
752
817
|
"email_verified" => true,
|
|
753
818
|
"metadata" => nil,
|
|
754
819
|
"external_id" => nil,
|
|
@@ -822,8 +887,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
822
887
|
|
|
823
888
|
def test_revoke_session_round_trip
|
|
824
889
|
fixture = {
|
|
825
|
-
"session_id" => "stub"
|
|
826
|
-
"return_to" => "stub"
|
|
890
|
+
"session_id" => "stub"
|
|
827
891
|
}
|
|
828
892
|
model = WorkOS::RevokeSession.new(fixture.to_json)
|
|
829
893
|
json = model.to_h
|
|
@@ -869,6 +933,19 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
869
933
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
870
934
|
end
|
|
871
935
|
|
|
936
|
+
def test_client_api_token_round_trip
|
|
937
|
+
fixture = {
|
|
938
|
+
"organization_id" => "stub",
|
|
939
|
+
"user_id" => "stub"
|
|
940
|
+
}
|
|
941
|
+
model = WorkOS::ClientApiToken.new(fixture.to_json)
|
|
942
|
+
json = model.to_h
|
|
943
|
+
assert_kind_of Hash, json
|
|
944
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
945
|
+
assert_equal fixture["user_id"], json[:user_id]
|
|
946
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
947
|
+
end
|
|
948
|
+
|
|
872
949
|
def test_token_query_round_trip
|
|
873
950
|
fixture = {
|
|
874
951
|
"client_id" => "stub",
|
|
@@ -986,14 +1063,14 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
986
1063
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
987
1064
|
end
|
|
988
1065
|
|
|
989
|
-
def
|
|
1066
|
+
def test_vault_object_round_trip
|
|
990
1067
|
fixture = {
|
|
991
1068
|
"id" => "stub",
|
|
992
1069
|
"metadata" => {},
|
|
993
1070
|
"name" => "stub",
|
|
994
1071
|
"value" => "stub"
|
|
995
1072
|
}
|
|
996
|
-
model = WorkOS::
|
|
1073
|
+
model = WorkOS::VaultObject.new(fixture.to_json)
|
|
997
1074
|
json = model.to_h
|
|
998
1075
|
assert_kind_of Hash, json
|
|
999
1076
|
assert_equal fixture["id"], json[:id]
|
|
@@ -1477,6 +1554,26 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
1477
1554
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
1478
1555
|
end
|
|
1479
1556
|
|
|
1557
|
+
def test_group_role_assignment_round_trip
|
|
1558
|
+
fixture = {
|
|
1559
|
+
"object" => "group_role_assignment",
|
|
1560
|
+
"id" => "stub",
|
|
1561
|
+
"group_id" => "stub",
|
|
1562
|
+
"role" => {},
|
|
1563
|
+
"resource" => {},
|
|
1564
|
+
"created_at" => "stub",
|
|
1565
|
+
"updated_at" => "stub"
|
|
1566
|
+
}
|
|
1567
|
+
model = WorkOS::GroupRoleAssignment.new(fixture.to_json)
|
|
1568
|
+
json = model.to_h
|
|
1569
|
+
assert_kind_of Hash, json
|
|
1570
|
+
assert_equal fixture["id"], json[:id]
|
|
1571
|
+
assert_equal fixture["group_id"], json[:group_id]
|
|
1572
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
1573
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
1574
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
1575
|
+
end
|
|
1576
|
+
|
|
1480
1577
|
def test_user_role_assignment_round_trip
|
|
1481
1578
|
fixture = {
|
|
1482
1579
|
"object" => "role_assignment",
|
|
@@ -1540,6 +1637,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
1540
1637
|
"id" => "stub",
|
|
1541
1638
|
"first_name" => nil,
|
|
1542
1639
|
"last_name" => nil,
|
|
1640
|
+
"name" => nil,
|
|
1543
1641
|
"profile_picture_url" => nil,
|
|
1544
1642
|
"email" => "stub",
|
|
1545
1643
|
"email_verified" => true,
|
|
@@ -1965,6 +2063,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
1965
2063
|
assert_equal fixture["name"], json[:name]
|
|
1966
2064
|
assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
|
|
1967
2065
|
assert_nil json[:last_used_at]
|
|
2066
|
+
assert_nil json[:expires_at]
|
|
1968
2067
|
assert_equal fixture["created_at"], json[:created_at]
|
|
1969
2068
|
assert_equal fixture["updated_at"], json[:updated_at]
|
|
1970
2069
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
@@ -2033,6 +2132,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
2033
2132
|
assert_equal fixture["name"], json[:name]
|
|
2034
2133
|
assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
|
|
2035
2134
|
assert_nil json[:last_used_at]
|
|
2135
|
+
assert_nil json[:expires_at]
|
|
2036
2136
|
assert_equal fixture["created_at"], json[:created_at]
|
|
2037
2137
|
assert_equal fixture["updated_at"], json[:updated_at]
|
|
2038
2138
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
@@ -2064,6 +2164,87 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
2064
2164
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
2065
2165
|
end
|
|
2066
2166
|
|
|
2167
|
+
def test_api_key_updated_round_trip
|
|
2168
|
+
fixture = {
|
|
2169
|
+
"object" => "event",
|
|
2170
|
+
"id" => "stub",
|
|
2171
|
+
"event" => "api_key.updated",
|
|
2172
|
+
"data" => {},
|
|
2173
|
+
"created_at" => "stub",
|
|
2174
|
+
"context" => {}
|
|
2175
|
+
}
|
|
2176
|
+
model = WorkOS::ApiKeyUpdated.new(fixture.to_json)
|
|
2177
|
+
json = model.to_h
|
|
2178
|
+
assert_kind_of Hash, json
|
|
2179
|
+
assert_equal fixture["id"], json[:id]
|
|
2180
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
2181
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
2182
|
+
end
|
|
2183
|
+
|
|
2184
|
+
def test_api_key_updated_data_round_trip
|
|
2185
|
+
fixture = {
|
|
2186
|
+
"object" => "api_key",
|
|
2187
|
+
"id" => "stub",
|
|
2188
|
+
"owner" => {},
|
|
2189
|
+
"name" => "stub",
|
|
2190
|
+
"obfuscated_value" => "stub",
|
|
2191
|
+
"last_used_at" => nil,
|
|
2192
|
+
"expires_at" => nil,
|
|
2193
|
+
"permissions" => [],
|
|
2194
|
+
"created_at" => "stub",
|
|
2195
|
+
"updated_at" => "stub",
|
|
2196
|
+
"previous_attributes" => {}
|
|
2197
|
+
}
|
|
2198
|
+
model = WorkOS::ApiKeyUpdatedData.new(fixture.to_json)
|
|
2199
|
+
json = model.to_h
|
|
2200
|
+
assert_kind_of Hash, json
|
|
2201
|
+
assert_equal fixture["id"], json[:id]
|
|
2202
|
+
assert_equal fixture["name"], json[:name]
|
|
2203
|
+
assert_equal fixture["obfuscated_value"], json[:obfuscated_value]
|
|
2204
|
+
assert_nil json[:last_used_at]
|
|
2205
|
+
assert_nil json[:expires_at]
|
|
2206
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
2207
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
2208
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
2209
|
+
end
|
|
2210
|
+
|
|
2211
|
+
def test_api_key_updated_data_owner_round_trip
|
|
2212
|
+
fixture = {
|
|
2213
|
+
"type" => "organization",
|
|
2214
|
+
"id" => "stub"
|
|
2215
|
+
}
|
|
2216
|
+
model = WorkOS::ApiKeyUpdatedDataOwner.new(fixture.to_json)
|
|
2217
|
+
json = model.to_h
|
|
2218
|
+
assert_kind_of Hash, json
|
|
2219
|
+
assert_equal fixture["id"], json[:id]
|
|
2220
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
2221
|
+
end
|
|
2222
|
+
|
|
2223
|
+
def test_user_api_key_updated_data_owner_round_trip
|
|
2224
|
+
fixture = {
|
|
2225
|
+
"type" => "user",
|
|
2226
|
+
"id" => "stub",
|
|
2227
|
+
"organization_id" => "stub"
|
|
2228
|
+
}
|
|
2229
|
+
model = WorkOS::UserApiKeyUpdatedDataOwner.new(fixture.to_json)
|
|
2230
|
+
json = model.to_h
|
|
2231
|
+
assert_kind_of Hash, json
|
|
2232
|
+
assert_equal fixture["id"], json[:id]
|
|
2233
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
2234
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
2235
|
+
end
|
|
2236
|
+
|
|
2237
|
+
def test_api_key_updated_data_previous_attribute_round_trip
|
|
2238
|
+
fixture = {
|
|
2239
|
+
"expires_at" => nil
|
|
2240
|
+
}
|
|
2241
|
+
model = WorkOS::ApiKeyUpdatedDataPreviousAttribute.new(fixture.to_json)
|
|
2242
|
+
json = model.to_h
|
|
2243
|
+
assert_kind_of Hash, json
|
|
2244
|
+
assert_nil json[:expires_at]
|
|
2245
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
2246
|
+
end
|
|
2247
|
+
|
|
2067
2248
|
def test_authentication_email_verification_failed_round_trip
|
|
2068
2249
|
fixture = {
|
|
2069
2250
|
"object" => "event",
|
|
@@ -3172,16 +3353,16 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
3172
3353
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3173
3354
|
end
|
|
3174
3355
|
|
|
3175
|
-
def
|
|
3356
|
+
def test_dsync_deleted_round_trip
|
|
3176
3357
|
fixture = {
|
|
3177
3358
|
"object" => "event",
|
|
3178
3359
|
"id" => "stub",
|
|
3179
|
-
"event" => "dsync.
|
|
3360
|
+
"event" => "dsync.deleted",
|
|
3180
3361
|
"data" => {},
|
|
3181
3362
|
"created_at" => "stub",
|
|
3182
3363
|
"context" => {}
|
|
3183
3364
|
}
|
|
3184
|
-
model = WorkOS::
|
|
3365
|
+
model = WorkOS::DsyncDeleted.new(fixture.to_json)
|
|
3185
3366
|
json = model.to_h
|
|
3186
3367
|
assert_kind_of Hash, json
|
|
3187
3368
|
assert_equal fixture["id"], json[:id]
|
|
@@ -3189,7 +3370,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
3189
3370
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3190
3371
|
end
|
|
3191
3372
|
|
|
3192
|
-
def
|
|
3373
|
+
def test_dsync_deleted_data_round_trip
|
|
3193
3374
|
fixture = {
|
|
3194
3375
|
"object" => "directory",
|
|
3195
3376
|
"id" => "stub",
|
|
@@ -3198,45 +3379,45 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
3198
3379
|
"state" => "stub",
|
|
3199
3380
|
"name" => "stub",
|
|
3200
3381
|
"created_at" => "stub",
|
|
3201
|
-
"updated_at" => "stub"
|
|
3202
|
-
"external_key" => "stub",
|
|
3203
|
-
"domains" => []
|
|
3382
|
+
"updated_at" => "stub"
|
|
3204
3383
|
}
|
|
3205
|
-
model = WorkOS::
|
|
3384
|
+
model = WorkOS::DsyncDeletedData.new(fixture.to_json)
|
|
3206
3385
|
json = model.to_h
|
|
3207
3386
|
assert_kind_of Hash, json
|
|
3208
3387
|
assert_equal fixture["id"], json[:id]
|
|
3209
3388
|
assert_equal fixture["name"], json[:name]
|
|
3210
3389
|
assert_equal fixture["created_at"], json[:created_at]
|
|
3211
3390
|
assert_equal fixture["updated_at"], json[:updated_at]
|
|
3212
|
-
assert_equal fixture["external_key"], json[:external_key]
|
|
3213
3391
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3214
3392
|
end
|
|
3215
3393
|
|
|
3216
|
-
def
|
|
3394
|
+
def test_dsync_group_created_round_trip
|
|
3217
3395
|
fixture = {
|
|
3218
|
-
"object" => "
|
|
3396
|
+
"object" => "event",
|
|
3219
3397
|
"id" => "stub",
|
|
3220
|
-
"
|
|
3398
|
+
"event" => "dsync.group.created",
|
|
3399
|
+
"data" => {},
|
|
3400
|
+
"created_at" => "stub",
|
|
3401
|
+
"context" => {}
|
|
3221
3402
|
}
|
|
3222
|
-
model = WorkOS::
|
|
3403
|
+
model = WorkOS::DsyncGroupCreated.new(fixture.to_json)
|
|
3223
3404
|
json = model.to_h
|
|
3224
3405
|
assert_kind_of Hash, json
|
|
3225
3406
|
assert_equal fixture["id"], json[:id]
|
|
3226
|
-
assert_equal fixture["
|
|
3407
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
3227
3408
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3228
3409
|
end
|
|
3229
3410
|
|
|
3230
|
-
def
|
|
3411
|
+
def test_dsync_group_deleted_round_trip
|
|
3231
3412
|
fixture = {
|
|
3232
3413
|
"object" => "event",
|
|
3233
3414
|
"id" => "stub",
|
|
3234
|
-
"event" => "dsync.deleted",
|
|
3415
|
+
"event" => "dsync.group.deleted",
|
|
3235
3416
|
"data" => {},
|
|
3236
3417
|
"created_at" => "stub",
|
|
3237
3418
|
"context" => {}
|
|
3238
3419
|
}
|
|
3239
|
-
model = WorkOS::
|
|
3420
|
+
model = WorkOS::DsyncGroupDeleted.new(fixture.to_json)
|
|
3240
3421
|
json = model.to_h
|
|
3241
3422
|
assert_kind_of Hash, json
|
|
3242
3423
|
assert_equal fixture["id"], json[:id]
|
|
@@ -3244,37 +3425,59 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
3244
3425
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3245
3426
|
end
|
|
3246
3427
|
|
|
3247
|
-
def
|
|
3428
|
+
def test_dsync_group_updated_round_trip
|
|
3248
3429
|
fixture = {
|
|
3249
|
-
"object" => "
|
|
3430
|
+
"object" => "event",
|
|
3431
|
+
"id" => "stub",
|
|
3432
|
+
"event" => "dsync.group.updated",
|
|
3433
|
+
"data" => {},
|
|
3434
|
+
"created_at" => "stub",
|
|
3435
|
+
"context" => {}
|
|
3436
|
+
}
|
|
3437
|
+
model = WorkOS::DsyncGroupUpdated.new(fixture.to_json)
|
|
3438
|
+
json = model.to_h
|
|
3439
|
+
assert_kind_of Hash, json
|
|
3440
|
+
assert_equal fixture["id"], json[:id]
|
|
3441
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
3442
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3443
|
+
end
|
|
3444
|
+
|
|
3445
|
+
def test_dsync_group_updated_data_round_trip
|
|
3446
|
+
fixture = {
|
|
3447
|
+
"object" => "directory_group",
|
|
3250
3448
|
"id" => "stub",
|
|
3449
|
+
"idp_id" => "stub",
|
|
3450
|
+
"directory_id" => "stub",
|
|
3251
3451
|
"organization_id" => "stub",
|
|
3252
|
-
"type" => "stub",
|
|
3253
|
-
"state" => "stub",
|
|
3254
3452
|
"name" => "stub",
|
|
3453
|
+
"raw_attributes" => {},
|
|
3255
3454
|
"created_at" => "stub",
|
|
3256
|
-
"updated_at" => "stub"
|
|
3455
|
+
"updated_at" => "stub",
|
|
3456
|
+
"previous_attributes" => {}
|
|
3257
3457
|
}
|
|
3258
|
-
model = WorkOS::
|
|
3458
|
+
model = WorkOS::DsyncGroupUpdatedData.new(fixture.to_json)
|
|
3259
3459
|
json = model.to_h
|
|
3260
3460
|
assert_kind_of Hash, json
|
|
3261
3461
|
assert_equal fixture["id"], json[:id]
|
|
3462
|
+
assert_equal fixture["idp_id"], json[:idp_id]
|
|
3463
|
+
assert_equal fixture["directory_id"], json[:directory_id]
|
|
3464
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
3262
3465
|
assert_equal fixture["name"], json[:name]
|
|
3263
3466
|
assert_equal fixture["created_at"], json[:created_at]
|
|
3264
3467
|
assert_equal fixture["updated_at"], json[:updated_at]
|
|
3265
3468
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3266
3469
|
end
|
|
3267
3470
|
|
|
3268
|
-
def
|
|
3471
|
+
def test_dsync_token_created_round_trip
|
|
3269
3472
|
fixture = {
|
|
3270
3473
|
"object" => "event",
|
|
3271
3474
|
"id" => "stub",
|
|
3272
|
-
"event" => "dsync.
|
|
3475
|
+
"event" => "dsync.token.created",
|
|
3273
3476
|
"data" => {},
|
|
3274
3477
|
"created_at" => "stub",
|
|
3275
3478
|
"context" => {}
|
|
3276
3479
|
}
|
|
3277
|
-
model = WorkOS::
|
|
3480
|
+
model = WorkOS::DsyncTokenCreated.new(fixture.to_json)
|
|
3278
3481
|
json = model.to_h
|
|
3279
3482
|
assert_kind_of Hash, json
|
|
3280
3483
|
assert_equal fixture["id"], json[:id]
|
|
@@ -3282,33 +3485,35 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
3282
3485
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3283
3486
|
end
|
|
3284
3487
|
|
|
3285
|
-
def
|
|
3488
|
+
def test_dsync_token_created_data_round_trip
|
|
3286
3489
|
fixture = {
|
|
3287
|
-
"object" => "
|
|
3490
|
+
"object" => "directory_token",
|
|
3288
3491
|
"id" => "stub",
|
|
3289
|
-
"
|
|
3290
|
-
"
|
|
3291
|
-
"
|
|
3292
|
-
"
|
|
3492
|
+
"directory_id" => "stub",
|
|
3493
|
+
"organization_id" => "stub",
|
|
3494
|
+
"token_suffix" => "stub",
|
|
3495
|
+
"created_at" => "stub"
|
|
3293
3496
|
}
|
|
3294
|
-
model = WorkOS::
|
|
3497
|
+
model = WorkOS::DsyncTokenCreatedData.new(fixture.to_json)
|
|
3295
3498
|
json = model.to_h
|
|
3296
3499
|
assert_kind_of Hash, json
|
|
3297
3500
|
assert_equal fixture["id"], json[:id]
|
|
3501
|
+
assert_equal fixture["directory_id"], json[:directory_id]
|
|
3502
|
+
assert_equal fixture["token_suffix"], json[:token_suffix]
|
|
3298
3503
|
assert_equal fixture["created_at"], json[:created_at]
|
|
3299
3504
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3300
3505
|
end
|
|
3301
3506
|
|
|
3302
|
-
def
|
|
3507
|
+
def test_dsync_token_revoked_round_trip
|
|
3303
3508
|
fixture = {
|
|
3304
3509
|
"object" => "event",
|
|
3305
3510
|
"id" => "stub",
|
|
3306
|
-
"event" => "dsync.
|
|
3511
|
+
"event" => "dsync.token.revoked",
|
|
3307
3512
|
"data" => {},
|
|
3308
3513
|
"created_at" => "stub",
|
|
3309
3514
|
"context" => {}
|
|
3310
3515
|
}
|
|
3311
|
-
model = WorkOS::
|
|
3516
|
+
model = WorkOS::DsyncTokenRevoked.new(fixture.to_json)
|
|
3312
3517
|
json = model.to_h
|
|
3313
3518
|
assert_kind_of Hash, json
|
|
3314
3519
|
assert_equal fixture["id"], json[:id]
|
|
@@ -3316,29 +3521,22 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
3316
3521
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3317
3522
|
end
|
|
3318
3523
|
|
|
3319
|
-
def
|
|
3524
|
+
def test_dsync_token_revoked_data_round_trip
|
|
3320
3525
|
fixture = {
|
|
3321
|
-
"object" => "
|
|
3526
|
+
"object" => "directory_token",
|
|
3322
3527
|
"id" => "stub",
|
|
3323
|
-
"idp_id" => "stub",
|
|
3324
3528
|
"directory_id" => "stub",
|
|
3325
3529
|
"organization_id" => "stub",
|
|
3326
|
-
"
|
|
3327
|
-
"
|
|
3328
|
-
"created_at" => "stub",
|
|
3329
|
-
"updated_at" => "stub",
|
|
3330
|
-
"previous_attributes" => {}
|
|
3530
|
+
"token_suffix" => "stub",
|
|
3531
|
+
"created_at" => "stub"
|
|
3331
3532
|
}
|
|
3332
|
-
model = WorkOS::
|
|
3533
|
+
model = WorkOS::DsyncTokenRevokedData.new(fixture.to_json)
|
|
3333
3534
|
json = model.to_h
|
|
3334
3535
|
assert_kind_of Hash, json
|
|
3335
3536
|
assert_equal fixture["id"], json[:id]
|
|
3336
|
-
assert_equal fixture["idp_id"], json[:idp_id]
|
|
3337
3537
|
assert_equal fixture["directory_id"], json[:directory_id]
|
|
3338
|
-
assert_equal fixture["
|
|
3339
|
-
assert_equal fixture["name"], json[:name]
|
|
3538
|
+
assert_equal fixture["token_suffix"], json[:token_suffix]
|
|
3340
3539
|
assert_equal fixture["created_at"], json[:created_at]
|
|
3341
|
-
assert_equal fixture["updated_at"], json[:updated_at]
|
|
3342
3540
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
3343
3541
|
end
|
|
3344
3542
|
|
|
@@ -6128,6 +6326,74 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
6128
6326
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6129
6327
|
end
|
|
6130
6328
|
|
|
6329
|
+
def test_data_integration_credentials_round_trip
|
|
6330
|
+
fixture = {
|
|
6331
|
+
"credentials_type" => "stub",
|
|
6332
|
+
"has_credentials" => true,
|
|
6333
|
+
"client_id" => nil,
|
|
6334
|
+
"client_secret_last_four" => nil,
|
|
6335
|
+
"redirect_uri" => "stub"
|
|
6336
|
+
}
|
|
6337
|
+
model = WorkOS::DataIntegrationCredentials.new(fixture.to_json)
|
|
6338
|
+
json = model.to_h
|
|
6339
|
+
assert_kind_of Hash, json
|
|
6340
|
+
assert_equal fixture["has_credentials"], json[:has_credentials]
|
|
6341
|
+
assert_nil json[:client_id]
|
|
6342
|
+
assert_nil json[:client_secret_last_four]
|
|
6343
|
+
assert_equal fixture["redirect_uri"], json[:redirect_uri]
|
|
6344
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6345
|
+
end
|
|
6346
|
+
|
|
6347
|
+
def test_data_integration_configuration_response_round_trip
|
|
6348
|
+
fixture = {
|
|
6349
|
+
"object" => "data_integration_configuration",
|
|
6350
|
+
"id" => "stub",
|
|
6351
|
+
"organization_id" => "stub",
|
|
6352
|
+
"slug" => "stub",
|
|
6353
|
+
"name" => "stub",
|
|
6354
|
+
"enabled" => true,
|
|
6355
|
+
"scopes" => nil,
|
|
6356
|
+
"created_at" => "stub",
|
|
6357
|
+
"updated_at" => "stub",
|
|
6358
|
+
"credentials" => {}
|
|
6359
|
+
}
|
|
6360
|
+
model = WorkOS::DataIntegrationConfigurationResponse.new(fixture.to_json)
|
|
6361
|
+
json = model.to_h
|
|
6362
|
+
assert_kind_of Hash, json
|
|
6363
|
+
assert_equal fixture["id"], json[:id]
|
|
6364
|
+
assert_equal fixture["organization_id"], json[:organization_id]
|
|
6365
|
+
assert_equal fixture["slug"], json[:slug]
|
|
6366
|
+
assert_equal fixture["name"], json[:name]
|
|
6367
|
+
assert_equal fixture["enabled"], json[:enabled]
|
|
6368
|
+
assert_equal fixture["created_at"], json[:created_at]
|
|
6369
|
+
assert_equal fixture["updated_at"], json[:updated_at]
|
|
6370
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6371
|
+
end
|
|
6372
|
+
|
|
6373
|
+
def test_data_integration_configuration_list_response_round_trip
|
|
6374
|
+
fixture = {
|
|
6375
|
+
"object" => "list",
|
|
6376
|
+
"data" => []
|
|
6377
|
+
}
|
|
6378
|
+
model = WorkOS::DataIntegrationConfigurationListResponse.new(fixture.to_json)
|
|
6379
|
+
json = model.to_h
|
|
6380
|
+
assert_kind_of Hash, json
|
|
6381
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6382
|
+
end
|
|
6383
|
+
|
|
6384
|
+
def test_configure_data_integration_body_round_trip
|
|
6385
|
+
fixture = {
|
|
6386
|
+
"enabled" => true,
|
|
6387
|
+
"scopes" => nil,
|
|
6388
|
+
"client_id" => "stub",
|
|
6389
|
+
"client_secret" => "stub"
|
|
6390
|
+
}
|
|
6391
|
+
model = WorkOS::ConfigureDataIntegrationBody.new(fixture.to_json)
|
|
6392
|
+
json = model.to_h
|
|
6393
|
+
assert_kind_of Hash, json
|
|
6394
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6395
|
+
end
|
|
6396
|
+
|
|
6131
6397
|
def test_data_integration_authorize_url_response_round_trip
|
|
6132
6398
|
fixture = {
|
|
6133
6399
|
"url" => "stub"
|
|
@@ -6158,6 +6424,8 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
6158
6424
|
"user_id" => nil,
|
|
6159
6425
|
"organization_id" => nil,
|
|
6160
6426
|
"scopes" => [],
|
|
6427
|
+
"auth_method" => "stub",
|
|
6428
|
+
"api_key_last_4" => nil,
|
|
6161
6429
|
"state" => "stub",
|
|
6162
6430
|
"created_at" => "stub",
|
|
6163
6431
|
"updated_at" => "stub"
|
|
@@ -6561,6 +6829,17 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
6561
6829
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6562
6830
|
end
|
|
6563
6831
|
|
|
6832
|
+
def test_client_api_token_response_round_trip
|
|
6833
|
+
fixture = {
|
|
6834
|
+
"token" => "stub"
|
|
6835
|
+
}
|
|
6836
|
+
model = WorkOS::ClientApiTokenResponse.new(fixture.to_json)
|
|
6837
|
+
json = model.to_h
|
|
6838
|
+
assert_kind_of Hash, json
|
|
6839
|
+
assert_equal fixture["token"], json[:token]
|
|
6840
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
6841
|
+
end
|
|
6842
|
+
|
|
6564
6843
|
def test_sso_authorize_url_response_round_trip
|
|
6565
6844
|
fixture = {
|
|
6566
6845
|
"url" => "stub"
|
|
@@ -6767,6 +7046,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
6767
7046
|
"integration_type" => "stub",
|
|
6768
7047
|
"credentials_type" => "stub",
|
|
6769
7048
|
"scopes" => nil,
|
|
7049
|
+
"auth_methods" => [],
|
|
6770
7050
|
"ownership" => "stub",
|
|
6771
7051
|
"created_at" => "stub",
|
|
6772
7052
|
"updated_at" => "stub",
|
|
@@ -7008,6 +7288,21 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7008
7288
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7009
7289
|
end
|
|
7010
7290
|
|
|
7291
|
+
def test_group_role_assignment_resource_round_trip
|
|
7292
|
+
fixture = {
|
|
7293
|
+
"id" => "stub",
|
|
7294
|
+
"external_id" => "stub",
|
|
7295
|
+
"resource_type_slug" => "stub"
|
|
7296
|
+
}
|
|
7297
|
+
model = WorkOS::GroupRoleAssignmentResource.new(fixture.to_json)
|
|
7298
|
+
json = model.to_h
|
|
7299
|
+
assert_kind_of Hash, json
|
|
7300
|
+
assert_equal fixture["id"], json[:id]
|
|
7301
|
+
assert_equal fixture["external_id"], json[:external_id]
|
|
7302
|
+
assert_equal fixture["resource_type_slug"], json[:resource_type_slug]
|
|
7303
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7304
|
+
end
|
|
7305
|
+
|
|
7011
7306
|
def test_authentication_factor_sms_round_trip
|
|
7012
7307
|
fixture = {
|
|
7013
7308
|
"phone_number" => "stub"
|
|
@@ -7206,18 +7501,6 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7206
7501
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7207
7502
|
end
|
|
7208
7503
|
|
|
7209
|
-
def test_data_integrations_get_user_token_request_round_trip
|
|
7210
|
-
fixture = {
|
|
7211
|
-
"user_id" => "stub",
|
|
7212
|
-
"organization_id" => "stub"
|
|
7213
|
-
}
|
|
7214
|
-
model = WorkOS::DataIntegrationsGetUserTokenRequest.new(fixture.to_json)
|
|
7215
|
-
json = model.to_h
|
|
7216
|
-
assert_kind_of Hash, json
|
|
7217
|
-
assert_equal fixture["user_id"], json[:user_id]
|
|
7218
|
-
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7219
|
-
end
|
|
7220
|
-
|
|
7221
7504
|
def test_feature_flag_round_trip
|
|
7222
7505
|
fixture = {
|
|
7223
7506
|
"object" => "feature_flag",
|
|
@@ -7338,7 +7621,6 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7338
7621
|
json = model.to_h
|
|
7339
7622
|
assert_kind_of Hash, json
|
|
7340
7623
|
assert_equal fixture["client_id"], json[:client_id]
|
|
7341
|
-
assert_equal fixture["client_secret"], json[:client_secret]
|
|
7342
7624
|
assert_equal fixture["code"], json[:code]
|
|
7343
7625
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7344
7626
|
end
|
|
@@ -7380,7 +7662,6 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7380
7662
|
json = model.to_h
|
|
7381
7663
|
assert_kind_of Hash, json
|
|
7382
7664
|
assert_equal fixture["client_id"], json[:client_id]
|
|
7383
|
-
assert_equal fixture["client_secret"], json[:client_secret]
|
|
7384
7665
|
assert_equal fixture["refresh_token"], json[:refresh_token]
|
|
7385
7666
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7386
7667
|
end
|
|
@@ -7581,6 +7862,7 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7581
7862
|
"id" => "stub",
|
|
7582
7863
|
"first_name" => nil,
|
|
7583
7864
|
"last_name" => nil,
|
|
7865
|
+
"name" => nil,
|
|
7584
7866
|
"profile_picture_url" => nil,
|
|
7585
7867
|
"email" => "stub",
|
|
7586
7868
|
"email_verified" => true,
|
|
@@ -7663,6 +7945,18 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7663
7945
|
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7664
7946
|
end
|
|
7665
7947
|
|
|
7948
|
+
def test_data_integrations_get_user_token_request_round_trip
|
|
7949
|
+
fixture = {
|
|
7950
|
+
"user_id" => "stub",
|
|
7951
|
+
"organization_id" => nil
|
|
7952
|
+
}
|
|
7953
|
+
model = WorkOS::DataIntegrationsGetUserTokenRequest.new(fixture.to_json)
|
|
7954
|
+
json = model.to_h
|
|
7955
|
+
assert_kind_of Hash, json
|
|
7956
|
+
assert_equal fixture["user_id"], json[:user_id]
|
|
7957
|
+
fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
|
|
7958
|
+
end
|
|
7959
|
+
|
|
7666
7960
|
def test_directory_metadata_user_round_trip
|
|
7667
7961
|
fixture = {
|
|
7668
7962
|
"active" => 1,
|
|
@@ -7683,6 +7977,8 @@ class ModelRoundTripTest < Minitest::Test
|
|
|
7683
7977
|
"user_id" => nil,
|
|
7684
7978
|
"organization_id" => nil,
|
|
7685
7979
|
"scopes" => [],
|
|
7980
|
+
"auth_method" => "stub",
|
|
7981
|
+
"api_key_last_4" => nil,
|
|
7686
7982
|
"state" => "stub",
|
|
7687
7983
|
"created_at" => "stub",
|
|
7688
7984
|
"updated_at" => "stub",
|