updateProject method

Future<Project> updateProject({
  1. required String projectIdOrKey,
  2. String? expand,
  3. required UpdateProjectDetails body,
})

Updates the project details of a project.

All parameters are optional in the body of the request. Schemes will only be updated if they are included in the request, any omitted schemes will be left unchanged.

Permissions required: Administer Jira global permission. is only needed when changing the schemes or project key. Otherwise you will only need Administer Projects project permission

Implementation

Future<Project> updateProject(
    {required String projectIdOrKey,
    String? expand,
    required UpdateProjectDetails body}) async {
  return Project.fromJson(await _client.send(
    'put',
    'rest/api/3/project/{projectIdOrKey}',
    pathParameters: {
      'projectIdOrKey': projectIdOrKey,
    },
    queryParameters: {
      if (expand != null) 'expand': expand,
    },
    body: body.toJson(),
  ));
}