from ..base import AdyenServiceBase


class ManageCardPINApi(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(ManageCardPINApi, self).__init__(client=client)
        self.service = "balancePlatform"
        self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"

    def change_card_pin(self, request, idempotency_key=None, **kwargs):
        """
        Change a card PIN
        """
        endpoint = self.baseUrl + f"/pins/change"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def public_key(self, idempotency_key=None, **kwargs):
        """
        Get an RSA public key
        """
        endpoint = self.baseUrl + f"/publicKey"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

    def reveal_card_pin(self, request, idempotency_key=None, **kwargs):
        """
        Reveal a card PIN
        """
        endpoint = self.baseUrl + f"/pins/reveal"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

