from .base import AdyenServiceBase


class AdyenRecurringApi(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(AdyenRecurringApi, self).__init__(client=client)
        self.service = "recurring"
        self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Recurring/v68"

    def create_permit(self, request, idempotency_key=None, **kwargs):
        """
        Create new permits linked to a recurring contract.

        Deprecated since Adyen Recurring API v68
        """
        endpoint = self.baseUrl + f"/createPermit"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def disable(self, request, idempotency_key=None, **kwargs):
        """
        Disable stored payment details

        Deprecated since Adyen Recurring API v68
        """
        endpoint = self.baseUrl + f"/disable"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def disable_permit(self, request, idempotency_key=None, **kwargs):
        """
        Disable an existing permit.

        Deprecated since Adyen Recurring API v68
        """
        endpoint = self.baseUrl + f"/disablePermit"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def list_recurring_details(self, request, idempotency_key=None, **kwargs):
        """
        Get stored payment details

        Deprecated since Adyen Recurring API v68
        """
        endpoint = self.baseUrl + f"/listRecurringDetails"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def notify_shopper(self, request, idempotency_key=None, **kwargs):
        """
        Ask issuer to notify the shopper

        Deprecated since Adyen Recurring API v68
        """
        endpoint = self.baseUrl + f"/notifyShopper"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def schedule_account_updater(self, request, idempotency_key=None, **kwargs):
        """
        Schedule running the Account Updater

        Deprecated since Adyen Recurring API v68
        """
        endpoint = self.baseUrl + f"/scheduleAccountUpdater"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

