from .base import AdyenServiceBase


class AdyenDisputesApi(AdyenServiceBase):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, client=None):
        super(AdyenDisputesApi, self).__init__(client=client)
        self.service = "disputes"
        self.baseUrl = "https://ca-test.adyen.com/ca/services/DisputeService/v30"

    def accept_dispute(self, request, idempotency_key=None, **kwargs):
        """
        Accept a dispute
        """
        endpoint = self.baseUrl + f"/acceptDispute"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def defend_dispute(self, request, idempotency_key=None, **kwargs):
        """
        Defend a dispute
        """
        endpoint = self.baseUrl + f"/defendDispute"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def delete_dispute_defense_document(self, request, idempotency_key=None, **kwargs):
        """
        Delete a defense document
        """
        endpoint = self.baseUrl + f"/deleteDisputeDefenseDocument"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def retrieve_applicable_defense_reasons(self, request, idempotency_key=None, **kwargs):
        """
        Get applicable defense reasons
        """
        endpoint = self.baseUrl + f"/retrieveApplicableDefenseReasons"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def supply_defense_document(self, request, idempotency_key=None, **kwargs):
        """
        Supply a defense document
        """
        endpoint = self.baseUrl + f"/supplyDefenseDocument"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

