3 Commits

Author SHA1 Message Date
1d55e08c15 Fixed individual report 2025-11-07 15:28:16 +03:00
71596d9cec Bump version 2025-11-07 13:45:39 +03:00
71cd6ddfcd Small fix 2025-11-07 13:44:19 +03:00
2 changed files with 13 additions and 10 deletions

View File

@@ -211,19 +211,22 @@ class FocusCompliance(Request):
"""
if self.inn:
response = self.get(path=f'{self._focus_base_url}/formFullIndividualReport')
if not self.inn and passport and fio:
elif not self.inn and passport and fio:
response = self.get(path=f'{self._focus_base_url}/formFullIndividualReport', passportNumber=passport, fio=fio)
else:
return {'success': True, 'result': 'Необходимо указать: либо ИНН, либо ФИО (хотя бы фамилию и имя) и паспорт'}
return {'success': False, 'result': 'Необходимо указать: либо ИНН, либо ФИО (хотя бы фамилию и имя) и паспорт'}
result = self._save_file(
filename='Полный_отчет',
content=response.content,
file_type='docx',
path=path
)
if response.status_code == 200:
result = self._save_file(
filename='Полный_отчет',
content=response.content,
file_type='docx',
path=path
)
return {'success': True, 'file': result}
return {'success': True, 'file': result}
else:
return {'success': False, 'result': 'Ошибка получения отчета. Проверьте корректность ИНН, ФИО или паспортных данных.'}
# Иноагенты
def get_foreign_agents_list(self, fa_type: str = None) -> list: # Не работает, если нет подключенной лицензии

View File

@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="kontur_focus",
version="2025.11.1",
version="2025.11.3",
author="Ilya Sapunov",
author_email="sapunov@selectel.ru",
description="Библиотека-обертка для взаимодействия с REST API Контур.Фокус и Фокус.Комплаенс",