assignPermissionToOrganizationRoleWithHttpInfo method

Future<Response> assignPermissionToOrganizationRoleWithHttpInfo(
  1. String organizationRoleId,
  2. String permissionId
)

Assign a permission to an organization role

Assigns a permission to an organization role

Note: This method returns the HTTP Response.

Parameters:

  • String organizationRoleId (required): The ID of the organization role

  • String permissionId (required): The ID of the permission to assign

Implementation

Future<http.Response> assignPermissionToOrganizationRoleWithHttpInfo(
  String organizationRoleId,
  String permissionId,
) async {
  // ignore: prefer_const_declarations
  final path =
      r'/organization_roles/{organization_role_id}/permissions/{permission_id}'
          .replaceAll('{organization_role_id}', organizationRoleId)
          .replaceAll('{permission_id}', permissionId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}