createPermissionGrant method

Future<PermissionGrant> createPermissionGrant({
  1. required int schemeId,
  2. String? expand,
  3. required PermissionGrant body,
})

Creates a permission grant in a permission scheme.

Permissions required: Administer Jira global permission.

Implementation

Future<PermissionGrant> createPermissionGrant(
    {required int schemeId,
    String? expand,
    required PermissionGrant body}) async {
  return PermissionGrant.fromJson(await _client.send(
    'post',
    'rest/api/3/permissionscheme/{schemeId}/permission',
    pathParameters: {
      'schemeId': '$schemeId',
    },
    queryParameters: {
      if (expand != null) 'expand': expand,
    },
    body: body.toJson(),
  ));
}