updateUserEmail method

Future<TUpdateUserEmailResponse> updateUserEmail({
  1. required TUpdateUserEmailBody input,
})

Update a user's email in an existing organization.

Sign the provided TUpdateUserEmailBody with the client's stamp function and submit the request (POST /public/v1/submit/update_user_email).

See also: stampUpdateUserEmail.

Implementation

Future<TUpdateUserEmailResponse> updateUserEmail({
  required TUpdateUserEmailBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_UPDATE_USER_EMAIL',
  );
  return await request<Map<String, dynamic>, TUpdateUserEmailResponse>(
      "/public/v1/submit/update_user_email",
      body,
      (json) => TUpdateUserEmailResponse.fromJson(
          transformActivityResponse(json, 'UpdateUserEmail')));
}