from .base import AdyenServiceBase


class AdyenTerminalApi(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(AdyenTerminalApi, self).__init__(client=client)
        self.service = "terminal"
        self.baseUrl = "https://postfmapi-test.adyen.com/postfmapi/terminal/v1"

    def assign_terminals(self, request, idempotency_key=None, **kwargs):
        """
        Assign terminals
        """
        endpoint = self.baseUrl + f"/assignTerminals"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def find_terminal(self, request, idempotency_key=None, **kwargs):
        """
        Get the account or store of a terminal
        """
        endpoint = self.baseUrl + f"/findTerminal"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def get_stores_under_account(self, request, idempotency_key=None, **kwargs):
        """
        Get the stores of an account
        """
        endpoint = self.baseUrl + f"/getStoresUnderAccount"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def get_terminal_details(self, request, idempotency_key=None, **kwargs):
        """
        Get the details of a terminal
        """
        endpoint = self.baseUrl + f"/getTerminalDetails"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def get_terminals_under_account(self, request, idempotency_key=None, **kwargs):
        """
        Get the list of terminals
        """
        endpoint = self.baseUrl + f"/getTerminalsUnderAccount"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

