from ..base import AdyenServiceBase


class AccountCompanyLevelApi(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(AccountCompanyLevelApi, self).__init__(client=client)
        self.service = "management"
        self.baseUrl = "https://management-test.adyen.com/v3"

    def get_company_account(self, companyId, idempotency_key=None, **kwargs):
        """
        Get a company account
        """
        endpoint = self.baseUrl + f"/companies/{companyId}"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

    def list_company_accounts(self, idempotency_key=None, **kwargs):
        """
        Get a list of company accounts
        """
        endpoint = self.baseUrl + f"/companies"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

    def list_merchant_accounts(self, companyId, idempotency_key=None, **kwargs):
        """
        Get a list of merchant accounts
        """
        endpoint = self.baseUrl + f"/companies/{companyId}/merchants"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

