updateOrganizationRoleWithHttpInfo method

Future<Response> updateOrganizationRoleWithHttpInfo(
  1. String organizationRoleId,
  2. UpdateOrganizationRoleRequest updateOrganizationRoleRequest
)

Update an organization role

Updates an existing organization role. You can update the name, key, description, and permissions of the role. All parameters are optional - you can update only the fields you want to change. If the role is used as a creator role or domain default role, updating the key will cascade the update to the organization settings.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> updateOrganizationRoleWithHttpInfo(
  String organizationRoleId,
  UpdateOrganizationRoleRequest updateOrganizationRoleRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/organization_roles/{organization_role_id}'
      .replaceAll('{organization_role_id}', organizationRoleId);

  // ignore: prefer_final_locals
  Object? postBody = updateOrganizationRoleRequest;

  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,
  );
}