fiuai-sdk-python 0.3.2__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/PKG-INFO +1 -1
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/pyproject.toml +1 -1
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/bank.py +3 -1
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/company.py +8 -8
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/item.py +1 -1
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/.gitignore +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/CHANGELOG.md +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/LICENSE +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/README.md +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/__init__.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/__init__.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/header.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/helper.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/test_auth.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/auth/type.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/client.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/const.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/error.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/perm.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/profile.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/setup.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/test_all.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/type.py +0 -0
- {fiuai_sdk_python-0.3.2 → fiuai_sdk_python-0.3.3}/src/fiuai_sdk_python/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fiuai_sdk_python
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: FiuAI Python SDK - 企业级AI服务集成开发工具包
|
|
5
5
|
Project-URL: Homepage, https://github.com/fiuai/fiuai-sdk-python
|
|
6
6
|
Project-URL: Documentation, https://github.com/fiuai/fiuai-sdk-python#readme
|
|
@@ -93,7 +93,7 @@ def get_bank_account_by_bank_id(client: FiuaiSDK, bank_id: str) -> BankAccount|N
|
|
|
93
93
|
"""
|
|
94
94
|
根据银行账号id获取银行账号信息
|
|
95
95
|
"""
|
|
96
|
-
resp = client.
|
|
96
|
+
resp = client.internal_get_list(
|
|
97
97
|
doctype="Bank Account",
|
|
98
98
|
filters=[["name", "=", bank_id]],
|
|
99
99
|
fields=[
|
|
@@ -107,6 +107,8 @@ def get_bank_account_by_bank_id(client: FiuaiSDK, bank_id: str) -> BankAccount|N
|
|
|
107
107
|
|
|
108
108
|
if not resp:
|
|
109
109
|
return None
|
|
110
|
+
|
|
111
|
+
resp = resp[0]
|
|
110
112
|
|
|
111
113
|
# 获取支行信息
|
|
112
114
|
bank_branch = ""
|
|
@@ -36,7 +36,7 @@ def get_target_company_by_name(client: FiuaiSDK, full_name: str, target_side: Li
|
|
|
36
36
|
"""
|
|
37
37
|
connection_type = "Customer" if target_side == "buyer" else "Supplier"
|
|
38
38
|
|
|
39
|
-
_lookup = client.
|
|
39
|
+
_lookup = client.internal_get_list(
|
|
40
40
|
doctype="Company Lookup",
|
|
41
41
|
fields=["target_company_id", "unique_no"],
|
|
42
42
|
filters=[["company_name", "=", full_name]])
|
|
@@ -45,19 +45,19 @@ def get_target_company_by_name(client: FiuaiSDK, full_name: str, target_side: Li
|
|
|
45
45
|
return TargetCompanySearchResult(name="", full_name="", unique_no="", exists=False, in_network=False, comment="该公司不存在")
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
_network = client.
|
|
48
|
+
_network = client.internal_get_list(
|
|
49
49
|
doctype="Company Network",
|
|
50
50
|
fields=["name", "target_company_id", "target_company"],
|
|
51
|
-
filters=[["target_company_id", "=", _lookup["target_company_id"]], ["connection_type", "=", connection_type]])
|
|
51
|
+
filters=[["target_company_id", "=", _lookup[0]["target_company_id"]], ["connection_type", "=", connection_type]])
|
|
52
52
|
if not _network:
|
|
53
53
|
logger.debug(f"get_target_company_by_name: {full_name} is not in network")
|
|
54
54
|
return TargetCompanySearchResult(name="", full_name="", unique_no="", exists=True, in_network=False, comment="该公司不在本方网络中")
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
n = TargetCompanySearchResult(
|
|
58
|
-
name=_network["target_company_id"],
|
|
59
|
-
full_name=_network["target_company"],
|
|
60
|
-
unique_no=_lookup["unique_no"],
|
|
58
|
+
name=_network[0]["target_company_id"],
|
|
59
|
+
full_name=_network[0]["target_company"],
|
|
60
|
+
unique_no=_lookup[0]["unique_no"],
|
|
61
61
|
exists=True,
|
|
62
62
|
in_network=True,
|
|
63
63
|
comment="",
|
|
@@ -70,7 +70,7 @@ def get_company_profile(client: FiuaiSDK, auth_company_id: str)-> CompanyProfile
|
|
|
70
70
|
"""
|
|
71
71
|
获取公司信息
|
|
72
72
|
"""
|
|
73
|
-
resp = client.
|
|
73
|
+
resp = client.internal_get_list(
|
|
74
74
|
doctype="Company",
|
|
75
75
|
filters=[["name", "=", auth_company_id]],
|
|
76
76
|
fields=[
|
|
@@ -95,7 +95,7 @@ def get_company_profile(client: FiuaiSDK, auth_company_id: str)-> CompanyProfile
|
|
|
95
95
|
if not resp:
|
|
96
96
|
return None
|
|
97
97
|
|
|
98
|
-
r = resp
|
|
98
|
+
r = resp[0]
|
|
99
99
|
|
|
100
100
|
if r["default_bank_account"]:
|
|
101
101
|
rr = get_bank_account_by_bank_id(client, r["default_bank_account"])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|