content: /*
   * Disputes API
   *
   * The version of the OpenAPI document: 30
   *
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  package com.adyen.service;
  
  import com.adyen.Client;
  import com.adyen.Service;
  import com.adyen.constants.ApiConstants;
  import com.adyen.model.RequestOptions;
  import com.adyen.model.disputes.AcceptDisputeRequest;
  import com.adyen.model.disputes.AcceptDisputeResponse;
  import com.adyen.model.disputes.DefendDisputeRequest;
  import com.adyen.model.disputes.DefendDisputeResponse;
  import com.adyen.model.disputes.DefenseReasonsRequest;
  import com.adyen.model.disputes.DefenseReasonsResponse;
  import com.adyen.model.disputes.DeleteDefenseDocumentRequest;
  import com.adyen.model.disputes.DeleteDefenseDocumentResponse;
  import com.adyen.model.disputes.SupplyDefenseDocumentRequest;
  import com.adyen.model.disputes.SupplyDefenseDocumentResponse;
  import com.adyen.service.exception.ApiException;
  import com.adyen.service.resource.Resource;
  import java.io.IOException;
  
  /**
   * The service has been moved to a different package 'com.adyen.service.disputes.DisputesApi'
   *
   * @deprecated Use instead com.adyen.service.disputes.DisputesApi
   */
  @Deprecated(since = "v37.0.0", forRemoval = true)
  public class DisputesApi extends Service {
  
    public static final String API_VERSION = "30";
  
    protected String baseURL;
  
    /**
     * Default constructor in {@link com.adyen.service package}.
     *
     * @param client {@link Client } (required)
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DisputesApi(Client client) {
      super(client);
      this.baseURL = createBaseURL("https://ca-test.adyen.com/ca/services/DisputeService/v30");
    }
  
    /**
     * Alternative constructor in {@link com.adyen.service package}. Please use this constructor only
     * if you would like to pass along your own url for routing or testing purposes. The latest API
     * version is defined in this class as a constant.
     *
     * @param client {@link Client } (required)
     * @param baseURL {@link String } (required)
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DisputesApi(Client client, String baseURL) {
      super(client);
      this.baseURL = baseURL;
    }
  
    /**
     * Accept a dispute
     *
     * @param acceptDisputeRequest {@link AcceptDisputeRequest } (required)
     * @return {@link AcceptDisputeResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public AcceptDisputeResponse acceptDispute(AcceptDisputeRequest acceptDisputeRequest)
        throws ApiException, IOException {
      return acceptDispute(acceptDisputeRequest, null);
    }
  
    /**
     * Accept a dispute
     *
     * @param acceptDisputeRequest {@link AcceptDisputeRequest } (required)
     * @param requestOptions {@link RequestOptions } Object to store additional data such as
     *     idempotency-keys (optional)
     * @return {@link AcceptDisputeResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public AcceptDisputeResponse acceptDispute(
        AcceptDisputeRequest acceptDisputeRequest, RequestOptions requestOptions)
        throws ApiException, IOException {
  
      String requestBody = acceptDisputeRequest.toJson();
      Resource resource = new Resource(this, this.baseURL + "/acceptDispute", null);
      String jsonResult =
          resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
      return AcceptDisputeResponse.fromJson(jsonResult);
    }
  
    /**
     * Defend a dispute
     *
     * @param defendDisputeRequest {@link DefendDisputeRequest } (required)
     * @return {@link DefendDisputeResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DefendDisputeResponse defendDispute(DefendDisputeRequest defendDisputeRequest)
        throws ApiException, IOException {
      return defendDispute(defendDisputeRequest, null);
    }
  
    /**
     * Defend a dispute
     *
     * @param defendDisputeRequest {@link DefendDisputeRequest } (required)
     * @param requestOptions {@link RequestOptions } Object to store additional data such as
     *     idempotency-keys (optional)
     * @return {@link DefendDisputeResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DefendDisputeResponse defendDispute(
        DefendDisputeRequest defendDisputeRequest, RequestOptions requestOptions)
        throws ApiException, IOException {
  
      String requestBody = defendDisputeRequest.toJson();
      Resource resource = new Resource(this, this.baseURL + "/defendDispute", null);
      String jsonResult =
          resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
      return DefendDisputeResponse.fromJson(jsonResult);
    }
  
    /**
     * Delete a defense document
     *
     * @param deleteDefenseDocumentRequest {@link DeleteDefenseDocumentRequest } (required)
     * @return {@link DeleteDefenseDocumentResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DeleteDefenseDocumentResponse deleteDisputeDefenseDocument(
        DeleteDefenseDocumentRequest deleteDefenseDocumentRequest) throws ApiException, IOException {
      return deleteDisputeDefenseDocument(deleteDefenseDocumentRequest, null);
    }
  
    /**
     * Delete a defense document
     *
     * @param deleteDefenseDocumentRequest {@link DeleteDefenseDocumentRequest } (required)
     * @param requestOptions {@link RequestOptions } Object to store additional data such as
     *     idempotency-keys (optional)
     * @return {@link DeleteDefenseDocumentResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DeleteDefenseDocumentResponse deleteDisputeDefenseDocument(
        DeleteDefenseDocumentRequest deleteDefenseDocumentRequest, RequestOptions requestOptions)
        throws ApiException, IOException {
  
      String requestBody = deleteDefenseDocumentRequest.toJson();
      Resource resource = new Resource(this, this.baseURL + "/deleteDisputeDefenseDocument", null);
      String jsonResult =
          resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
      return DeleteDefenseDocumentResponse.fromJson(jsonResult);
    }
  
    /**
     * Get applicable defense reasons
     *
     * @param defenseReasonsRequest {@link DefenseReasonsRequest } (required)
     * @return {@link DefenseReasonsResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DefenseReasonsResponse retrieveApplicableDefenseReasons(
        DefenseReasonsRequest defenseReasonsRequest) throws ApiException, IOException {
      return retrieveApplicableDefenseReasons(defenseReasonsRequest, null);
    }
  
    /**
     * Get applicable defense reasons
     *
     * @param defenseReasonsRequest {@link DefenseReasonsRequest } (required)
     * @param requestOptions {@link RequestOptions } Object to store additional data such as
     *     idempotency-keys (optional)
     * @return {@link DefenseReasonsResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public DefenseReasonsResponse retrieveApplicableDefenseReasons(
        DefenseReasonsRequest defenseReasonsRequest, RequestOptions requestOptions)
        throws ApiException, IOException {
  
      String requestBody = defenseReasonsRequest.toJson();
      Resource resource =
          new Resource(this, this.baseURL + "/retrieveApplicableDefenseReasons", null);
      String jsonResult =
          resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
      return DefenseReasonsResponse.fromJson(jsonResult);
    }
  
    /**
     * Supply a defense document
     *
     * @param supplyDefenseDocumentRequest {@link SupplyDefenseDocumentRequest } (required)
     * @return {@link SupplyDefenseDocumentResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public SupplyDefenseDocumentResponse supplyDefenseDocument(
        SupplyDefenseDocumentRequest supplyDefenseDocumentRequest) throws ApiException, IOException {
      return supplyDefenseDocument(supplyDefenseDocumentRequest, null);
    }
  
    /**
     * Supply a defense document
     *
     * @param supplyDefenseDocumentRequest {@link SupplyDefenseDocumentRequest } (required)
     * @param requestOptions {@link RequestOptions } Object to store additional data such as
     *     idempotency-keys (optional)
     * @return {@link SupplyDefenseDocumentResponse }
     * @throws ApiException if fails to make API call
     */
    @Deprecated(
        since = "v37.0.0",
        forRemoval = true) // Use instead com.adyen.service.disputes.DisputesApi
    public SupplyDefenseDocumentResponse supplyDefenseDocument(
        SupplyDefenseDocumentRequest supplyDefenseDocumentRequest, RequestOptions requestOptions)
        throws ApiException, IOException {
  
      String requestBody = supplyDefenseDocumentRequest.toJson();
      Resource resource = new Resource(this, this.baseURL + "/supplyDefenseDocument", null);
      String jsonResult =
          resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, null);
      return SupplyDefenseDocumentResponse.fromJson(jsonResult);
    }
  }
  