createCustomer method

Future<UserDTO> createCustomer({
  1. bool? strictConflictStatusCode,
  2. required CustomerCreateDTO body,
})

This method adds a customer to the Jira Service Management instance by passing a JSON file including an email address and display name. The display name does not need to be unique. The record's identifiers, name and key, are automatically generated from the request details.

Permissions required: Jira Administrator Global permission

Implementation

Future<UserDTO> createCustomer(
    {bool? strictConflictStatusCode, required CustomerCreateDTO body}) async {
  return UserDTO.fromJson(await _client.send(
    'post',
    'rest/servicedeskapi/customer',
    queryParameters: {
      if (strictConflictStatusCode != null)
        'strictConflictStatusCode': '$strictConflictStatusCode',
    },
    body: body.toJson(),
  ));
}