updateUserMetadataWithHttpInfo method
Future<Response>
updateUserMetadataWithHttpInfo(
- String userId, {
- UpdateUserMetadataRequest? updateUserMetadataRequest,
Merge and update a user's metadata
Update a user's metadata attributes by merging existing values with the provided parameters. This endpoint behaves differently than the Update a user endpoint. Metadata values will not be replaced entirely. Instead, a deep merge will be performed. Deep means that any nested JSON objects will be merged as well. You can remove metadata keys at any level by setting their value to null
.
Note: This method returns the HTTP Response
.
Parameters:
-
String userId (required): The ID of the user whose metadata will be updated and merged
-
UpdateUserMetadataRequest updateUserMetadataRequest:
Implementation
Future<http.Response> updateUserMetadataWithHttpInfo(
String userId, {
UpdateUserMetadataRequest? updateUserMetadataRequest,
}) async {
// ignore: prefer_const_declarations
final path = r'/users/{user_id}/metadata'.replaceAll('{user_id}', userId);
// ignore: prefer_final_locals
Object? postBody = updateUserMetadataRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PATCH',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}