from ..base import AdyenServiceBase


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

    def create_merchant_account(self, request, idempotency_key=None, **kwargs):
        """
        Create a merchant account
        """
        endpoint = self.baseUrl + f"/merchants"
        method = "POST"
        return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

    def get_merchant_account(self, merchantId, idempotency_key=None, **kwargs):
        """
        Get a merchant account
        """
        endpoint = self.baseUrl + f"/merchants/{merchantId}"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

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

    def request_to_activate_merchant_account(self, merchantId, idempotency_key=None, **kwargs):
        """
        Request to activate a merchant account
        """
        endpoint = self.baseUrl + f"/merchants/{merchantId}/activate"
        method = "POST"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

