def get(self, by_id, action="get"):
        apimapopts = ConstantHelper.get_setting_constant().API_MAP.get(
            self.name)

        base_url = ConstantHelper.get_setting_constant(
        ).API_PROD_BASE_URL if request_wrapper.get_wrapper(
        ).mode == "prod" else ConstantHelper.get_setting_constant(
        ).API_DEV_BASE_URL

        url = CollectioHelper.process_key_join(value=[
            base_url,
            apimapopts.get(action).get("prefix"),
            apimapopts.get(action).get("endpoint")
        ],
                                               separator="").replace(
                                                   "{id}", by_id)
        headers = {**ConstantHelper.get_setting_constant().API_BASE_HEADER}

        token = "%(name)s:%(pass)s" % {
            "name": request_wrapper.get_wrapper().key,
            "pass": request_wrapper.get_wrapper().secret
        }
        headers.update({
            "authorization":
            "Basic " + base64.b64encode(token.encode("utf-8")).decode('ascii')
        })

        headers.update({"x-apikey": request_wrapper.get_wrapper().key})

        return request_wrapper.get_wrapper().process_axios_get(url=url,
                                                               headers=headers,
                                                               params={})
    def get_infos(self, endpoint):
        apimapopts = ConstantHelper.get_setting_constant().API_MAP.get(
            self.name)

        base_url = ConstantHelper.get_setting_constant(
        ).API_PROD_BASE_URL if request_wrapper.get_wrapper(
        ).mode == "prod" else ConstantHelper.get_setting_constant(
        ).API_DEV_BASE_URL

        url = CollectioHelper.process_key_join(
            value=[base_url, "/api/open", endpoint], separator="")
        headers = {**ConstantHelper.get_setting_constant().API_BASE_HEADER}
        params = {}

        return request_wrapper.get_wrapper().process_axios_get(url=url,
                                                               headers=headers,
                                                               params=params)
    def get_by(self, by_key, by_value, swap_id=None, action="get"):
        apimapopts = ConstantHelper.get_setting_constant().API_MAP.get(
            self.name)

        base_url = ConstantHelper.get_setting_constant(
        ).API_PROD_BASE_URL if request_wrapper.get_wrapper(
        ).mode == "prod" else ConstantHelper.get_setting_constant(
        ).API_DEV_BASE_URL

        url = CollectioHelper.process_key_join(value=[
            base_url,
            apimapopts.get(action).get("prefix"),
            apimapopts.get(action).get("endpoint")
        ],
                                               separator="").replace(
                                                   "{id}", str(uuid.uuid4()))
        headers = {**ConstantHelper.get_setting_constant().API_BASE_HEADER}
        params = {}

        params.update({by_key: by_value})
        if swap_id is not None:
            params.update({"swap_id": swap_id})

        token = "%(name)s:%(pass)s" % {
            "name": request_wrapper.get_wrapper().key,
            "pass": request_wrapper.get_wrapper().secret
        }
        headers.update({
            "authorization":
            "Basic " + base64.b64encode(token.encode("utf-8")).decode('ascii')
        })

        headers.update({"x-apikey": request_wrapper.get_wrapper().key})

        headers.update({"content-type": "application/x-www-form-urlencoded"})

        return request_wrapper.get_wrapper().process_axios_get(url=url,
                                                               headers=headers,
                                                               params=params)