postChangePasswordAccountWithHttpInfo method

Future<Response> postChangePasswordAccountWithHttpInfo(
  1. String oldPassword,
  2. String newPassword, {
  3. String? confirmPassword,
})

Performs an HTTP 'POST /account/change-password' operation and returns the Response. Parameters:

Implementation

Future<Response> postChangePasswordAccountWithHttpInfo(String oldPassword, String newPassword, { String? confirmPassword, }) async {
  // ignore: prefer_const_declarations
  final path = r'/account/change-password';

  // ignore: prefer_final_locals
  Object? postBody;

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

    queryParams.addAll(_queryParams('', 'OldPassword', oldPassword));
    queryParams.addAll(_queryParams('', 'NewPassword', newPassword));
  if (confirmPassword != null) {
    queryParams.addAll(_queryParams('', 'ConfirmPassword', confirmPassword));
  }

  const contentTypes = <String>[];


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