You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# @param email_verified [Boolean, nil] Whether the user's email has been verified.
614
640
# @param metadata [Hash{String => String}, nil] Object containing metadata key/value pairs associated with the user.
615
641
# @param external_id [String, nil] The external ID of the user.
616
-
# @param password [String, nil] The password to set for the user. Mutually exclusive with `password_hash` and `password_hash_type`.
617
-
# @param password_hash [String, nil] The hashed password to set for the user. Required with `password_hash_type`. Mutually exclusive with `password`.
618
-
# @param password_hash_type [WorkOS::Types::CreateUserPasswordHashType, nil] The algorithm originally used to hash the password, used when providing a `password_hash`. Required with `password_hash`. Mutually exclusive with `password`.
642
+
# @param password [WorkOS::UserManagement::PasswordPlaintext, WorkOS::UserManagement::PasswordHashed, nil] Identifies the password.
619
643
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
raiseArgumentError,"expected password to be one of: WorkOS::UserManagement::PasswordPlaintext, WorkOS::UserManagement::PasswordHashed, got #{password.class}"
651
672
end
652
673
end
653
674
response=@client.request(
@@ -709,9 +730,7 @@ def get_user(
709
730
# @param metadata [Hash{String => String}, nil] Object containing metadata key/value pairs associated with the user.
710
731
# @param external_id [String, nil] The external ID of the user.
711
732
# @param locale [String, nil] The user's preferred locale.
712
-
# @param password [String, nil] The password to set for the user. Mutually exclusive with `password_hash` and `password_hash_type`.
713
-
# @param password_hash [String, nil] The hashed password to set for the user. Required with `password_hash_type`. Mutually exclusive with `password`.
714
-
# @param password_hash_type [WorkOS::Types::UpdateUserPasswordHashType, nil] The algorithm originally used to hash the password, used when providing a `password_hash`. Required with `password_hash`. Mutually exclusive with `password`.
733
+
# @param password [WorkOS::UserManagement::PasswordPlaintext, WorkOS::UserManagement::PasswordHashed, nil] Identifies the password.
715
734
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
raiseArgumentError,"expected password to be one of: WorkOS::UserManagement::PasswordPlaintext, WorkOS::UserManagement::PasswordHashed, got #{password.class}"
# @param user_id [String] The ID of the [user](https://workos.com/docs/reference/authkit/user).
1257
1273
# @param organization_id [String] The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to.
1258
-
# @param role_slug [String, nil] A single role identifier. Defaults to `member` or the explicit default role. Mutually exclusive with `role_slugs`.
1259
-
# @param role_slugs [Array<String>, nil] An array of role identifiers. Limited to one role when Multiple Roles is disabled. Mutually exclusive with `role_slug`.
1274
+
# @param role [WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, nil] Identifies the role.
1260
1275
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
1261
1276
# @return [WorkOS::OrganizationMembership]
1262
1277
defcreate_organization_membership(
1263
1278
user_id:,
1264
1279
organization_id:,
1265
-
role_slug: nil,
1266
-
role_slugs: nil,
1267
1280
role: nil,
1268
1281
request_options: {}
1269
1282
)
1270
1283
body={
1271
1284
"user_id"=>user_id,
1272
-
"organization_id"=>organization_id,
1273
-
"role_slug"=>role_slug,
1274
-
"role_slugs"=>role_slugs
1275
-
}.compact
1285
+
"organization_id"=>organization_id
1286
+
}
1276
1287
ifrole
1277
-
caserole[:type]
1278
-
when"single"
1279
-
body["role_slug"]=role[:role_slug]
1280
-
when"multiple"
1281
-
body["role_slugs"]=role[:role_slugs]
1288
+
caserole
1289
+
whenWorkOS::UserManagement::RoleSingle
1290
+
body["role_slug"]=role.role_slug
1291
+
whenWorkOS::UserManagement::RoleMultiple
1292
+
body["role_slugs"]=role.role_slugs
1293
+
else
1294
+
raiseArgumentError,"expected role to be one of: WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, got #{role.class}"
# @param id [String] The unique ID of the organization membership.
1317
-
# @param role_slug [String, nil] A single role identifier. Defaults to `member` or the explicit default role. Mutually exclusive with `role_slugs`.
1318
-
# @param role_slugs [Array<String>, nil] An array of role identifiers. Limited to one role when Multiple Roles is disabled. Mutually exclusive with `role_slug`.
1330
+
# @param role [WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, nil] Identifies the role.
1319
1331
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
1320
1332
# @return [WorkOS::UserOrganizationMembership]
1321
1333
defupdate_organization_membership(
1322
1334
id:,
1323
-
role_slug: nil,
1324
-
role_slugs: nil,
1325
1335
role: nil,
1326
1336
request_options: {}
1327
1337
)
1328
-
body={
1329
-
"role_slug"=>role_slug,
1330
-
"role_slugs"=>role_slugs
1331
-
}.compact
1338
+
body={}
1332
1339
ifrole
1333
-
caserole[:type]
1334
-
when"single"
1335
-
body["role_slug"]=role[:role_slug]
1336
-
when"multiple"
1337
-
body["role_slugs"]=role[:role_slugs]
1340
+
caserole
1341
+
whenWorkOS::UserManagement::RoleSingle
1342
+
body["role_slug"]=role.role_slug
1343
+
whenWorkOS::UserManagement::RoleMultiple
1344
+
body["role_slugs"]=role.role_slugs
1345
+
else
1346
+
raiseArgumentError,"expected role to be one of: WorkOS::UserManagement::RoleSingle, WorkOS::UserManagement::RoleMultiple, got #{role.class}"
0 commit comments