def METHOD_NAME(self):
    if not self.env.company.ibpt_api:
        return False
    object_name = OBJECT_NAMES.get(self._name)
    object_field = OBJECT_FIELDS.get(self._name)
    for record in self:
        try:
            company = self.env.company
            config = DeOlhoNoImposto(
                company.ibpt_token,
                misc.punctuation_rm(company.cnpj_cpf),
                company.state_id.code,
            )
            result = self._get_ibpt(config, record.code_unmasked)
            if result:
                values = {
                    object_field: record.id,
                    "key": result.chave,
                    "origin": result.fonte,
                    "state_id": company.state_id.id,
                    "state_taxes": result.estadual,
                    "federal_taxes_national": result.nacional,
                    "federal_taxes_import": result.importado,
                }
                self.env["l10n_br_fiscal.tax.estimate"].create(values)
                record.message_post(
                    body=_("{} Tax Estimate Updated").format(object_name),
                    subject=_("{} Tax Estimate Updated").format(object_name),
                )
        except Exception as e:
            _logger.warning(
                _("{0} Tax Estimate Failure: {1}").format(object_name, e)
            )
            record.message_post(
                body=str(e),
                subject=_("{} Tax Estimate Failure").format(object_name),
            )
            continue