from ..base import AdyenServiceBase


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

    def get_network_token(self, networkTokenId, idempotency_key=None, **kwargs):
        """
        Get a network token
        """
        endpoint = self.baseUrl + f"/networkTokens/{networkTokenId}"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

    def update_network_token(self, request, networkTokenId, idempotency_key=None, **kwargs):
        """
        Update a network token
        """
        endpoint = self.baseUrl + f"/networkTokens/{networkTokenId}"
        method = "PATCH"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

