Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d162a654a1 | ||
|
|
017425523e | ||
|
|
f7e39f2edb | ||
|
|
bf3b188149 | ||
|
|
f657ca77a4 | ||
|
|
6982393d03 |
@@ -42,7 +42,7 @@ class Focus(Request):
|
|||||||
"""
|
"""
|
||||||
response = self.get('/excerpt')
|
response = self.get('/excerpt')
|
||||||
|
|
||||||
if response.status_code != 404:
|
if type(response) is not str and response.status_code != 404:
|
||||||
current_datetime = datetime.now().strftime('%d-%m-%Y_%H-%M')
|
current_datetime = datetime.now().strftime('%d-%m-%Y_%H-%M')
|
||||||
filename = f'Выписка_{self.inn}_{current_datetime}.pdf'
|
filename = f'Выписка_{self.inn}_{current_datetime}.pdf'
|
||||||
|
|
||||||
@@ -149,3 +149,7 @@ class Focus(Request):
|
|||||||
foreign_agents_list = next(lst for lst in self.government_lists() if lst['id'] == 'fcfc856d-89f8-408b-afef-56750cb90fed')
|
foreign_agents_list = next(lst for lst in self.government_lists() if lst['id'] == 'fcfc856d-89f8-408b-afef-56750cb90fed')
|
||||||
|
|
||||||
return foreign_agents_list['isInList']
|
return foreign_agents_list['isInList']
|
||||||
|
|
||||||
|
def kz_company_details(self):
|
||||||
|
response = self.get('/kz/companyDetails', bin=self.inn)
|
||||||
|
return response[0] if response else None
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ class FocusCompliance(Request):
|
|||||||
return {'success': True, 'result': [profiles[0]['id']]}
|
return {'success': True, 'result': [profiles[0]['id']]}
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return {'success': False, 'result': 'Key Error'}
|
return {'success': False, 'result': 'Key Error'}
|
||||||
|
except TypeError:
|
||||||
|
return {'success': False, 'result': 'Type Error'}
|
||||||
|
|
||||||
def full_legal_entity_sanctions_profile(self, profile_id_list: list) -> dict:
|
def full_legal_entity_sanctions_profile(self, profile_id_list: list) -> dict:
|
||||||
"""Просмотр полной информации определенного санкционного профиля ЮЛ
|
"""Просмотр полной информации определенного санкционного профиля ЮЛ
|
||||||
@@ -229,7 +231,9 @@ class FocusCompliance(Request):
|
|||||||
file_type='docx',
|
file_type='docx',
|
||||||
path=path
|
path=path
|
||||||
)
|
)
|
||||||
|
if not result['success']:
|
||||||
|
return {'success': False, 'result': result['message']}
|
||||||
|
|
||||||
return {'success': True, 'file': result}
|
return {'success': True, 'file': result}
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return {'success': False, 'result': 'Организация не найдена'}
|
return {'success': False, 'result': 'Организация не найдена'}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="kontur_focus",
|
name="kontur_focus",
|
||||||
version="2026.4.3",
|
version="2026.8.20",
|
||||||
author="Ilya Sapunov",
|
author="Ilya Sapunov",
|
||||||
author_email="me@slrover.ru",
|
author_email="me@slrover.ru",
|
||||||
description="Библиотека-обертка для взаимодействия с REST API Контур.Фокус и Фокус.Комплаенс",
|
description="Библиотека-обертка для взаимодействия с REST API Контур.Фокус и Фокус.Комплаенс",
|
||||||
|
|||||||
Reference in New Issue
Block a user