from ..base import AdyenServiceBase


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

    def get_android_app(self, companyId, id, idempotency_key=None, **kwargs):
        """
        Get Android app
        """
        endpoint = self.baseUrl + f"/companies/{companyId}/androidApps/{id}"
        method = "GET"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

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

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

    def reprocess_android_app(self, companyId, id, idempotency_key=None, **kwargs):
        """
        Reprocess Android App
        """
        endpoint = self.baseUrl + f"/companies/{companyId}/androidApps/{id}"
        method = "PATCH"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

    def upload_android_app(self, companyId, idempotency_key=None, **kwargs):
        """
        Upload Android App
        """
        endpoint = self.baseUrl + f"/companies/{companyId}/androidApps"
        method = "POST"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

    def upload_android_certificate(self, companyId, idempotency_key=None, **kwargs):
        """
        Upload Android Certificate
        """
        endpoint = self.baseUrl + f"/companies/{companyId}/androidCertificates"
        method = "POST"
        return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

