mangopay4-python-sdk 3.59.0__tar.gz → 4.0.0__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.
- mangopay4_python_sdk-4.0.0/PKG-INFO +182 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/README.md +22 -10
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/fields.py +51 -1
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/resources.py +4 -1
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/utils.py +70 -0
- mangopay4_python_sdk-4.0.0/pyproject.toml +57 -0
- mangopay4_python_sdk-3.59.0/DESCRIPTION.md +0 -1
- mangopay4_python_sdk-3.59.0/MANIFEST.in +0 -8
- mangopay4_python_sdk-3.59.0/Makefile +0 -8
- mangopay4_python_sdk-3.59.0/PKG-INFO +0 -53
- mangopay4_python_sdk-3.59.0/mangopay4_python_sdk.egg-info/PKG-INFO +0 -53
- mangopay4_python_sdk-3.59.0/mangopay4_python_sdk.egg-info/SOURCES.txt +0 -95
- mangopay4_python_sdk-3.59.0/mangopay4_python_sdk.egg-info/dependency_links.txt +0 -1
- mangopay4_python_sdk-3.59.0/mangopay4_python_sdk.egg-info/entry_points.txt +0 -2
- mangopay4_python_sdk-3.59.0/mangopay4_python_sdk.egg-info/requires.txt +0 -25
- mangopay4_python_sdk-3.59.0/mangopay4_python_sdk.egg-info/top_level.txt +0 -1
- mangopay4_python_sdk-3.59.0/setup.cfg +0 -7
- mangopay4_python_sdk-3.59.0/setup.py +0 -43
- mangopay4_python_sdk-3.59.0/tests/__init__.py +0 -6
- mangopay4_python_sdk-3.59.0/tests/fixtures/card.json +0 -16
- mangopay4_python_sdk-3.59.0/tests/fixtures/cardregistrations.json +0 -16
- mangopay4_python_sdk-3.59.0/tests/fixtures/cardregistrations_update.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/fixtures/declarative_user.json +0 -26
- mangopay4_python_sdk-3.59.0/tests/fixtures/legal_user.json +0 -28
- mangopay4_python_sdk-3.59.0/tests/fixtures/legal_user_wallet.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/fixtures/legal_user_wallet_89.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/fixtures/legal_user_wallet_99.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/fixtures/list_ubo_declarations.json +0 -12
- mangopay4_python_sdk-3.59.0/tests/fixtures/natural_user.json +0 -25
- mangopay4_python_sdk-3.59.0/tests/fixtures/natural_user_wallet.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/fixtures/natural_user_wallet_9.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/fixtures/ubo.json +0 -20
- mangopay4_python_sdk-3.59.0/tests/fixtures/ubo_declaration.json +0 -10
- mangopay4_python_sdk-3.59.0/tests/fixtures/ubo_declaration_submit.json +0 -10
- mangopay4_python_sdk-3.59.0/tests/fixtures/ubo_update.json +0 -20
- mangopay4_python_sdk-3.59.0/tests/fixtures/user_list_2_per_page.json +0 -18
- mangopay4_python_sdk-3.59.0/tests/fixtures/user_list_2_per_page_page1.json +0 -18
- mangopay4_python_sdk-3.59.0/tests/fixtures/user_list_3_per_page_page2.json +0 -26
- mangopay4_python_sdk-3.59.0/tests/fixtures/user_list_full.json +0 -92
- mangopay4_python_sdk-3.59.0/tests/fixtures/user_list_page1.json +0 -82
- mangopay4_python_sdk-3.59.0/tests/fixtures/user_wallet.json +0 -14
- mangopay4_python_sdk-3.59.0/tests/images/image.jpg +0 -0
- mangopay4_python_sdk-3.59.0/tests/mocks.py +0 -304
- mangopay4_python_sdk-3.59.0/tests/resources/TestKycPageFile.png +0 -0
- mangopay4_python_sdk-3.59.0/tests/resources/settlement_sample.csv +0 -8
- mangopay4_python_sdk-3.59.0/tests/resources/settlement_sample_bad_footer.csv +0 -8
- mangopay4_python_sdk-3.59.0/tests/resources/settlement_sample_bad_line.csv +0 -8
- mangopay4_python_sdk-3.59.0/tests/resources.py +0 -9
- mangopay4_python_sdk-3.59.0/tests/settings.py +0 -15
- mangopay4_python_sdk-3.59.0/tests/test_acquiring.py +0 -215
- mangopay4_python_sdk-3.59.0/tests/test_bankaccounts.py +0 -501
- mangopay4_python_sdk-3.59.0/tests/test_banking_aliases.py +0 -93
- mangopay4_python_sdk-3.59.0/tests/test_base.py +0 -958
- mangopay4_python_sdk-3.59.0/tests/test_cards.py +0 -371
- mangopay4_python_sdk-3.59.0/tests/test_client_wallets.py +0 -200
- mangopay4_python_sdk-3.59.0/tests/test_clients.py +0 -64
- mangopay4_python_sdk-3.59.0/tests/test_conversion.py +0 -215
- mangopay4_python_sdk-3.59.0/tests/test_country_authorizations.py +0 -57
- mangopay4_python_sdk-3.59.0/tests/test_deposits.py +0 -162
- mangopay4_python_sdk-3.59.0/tests/test_disputes.py +0 -381
- mangopay4_python_sdk-3.59.0/tests/test_documentconsult.py +0 -176
- mangopay4_python_sdk-3.59.0/tests/test_emoney.py +0 -26
- mangopay4_python_sdk-3.59.0/tests/test_idempotency.py +0 -57
- mangopay4_python_sdk-3.59.0/tests/test_identity_verification.py +0 -81
- mangopay4_python_sdk-3.59.0/tests/test_kyc_document.py +0 -37
- mangopay4_python_sdk-3.59.0/tests/test_kycs.py +0 -312
- mangopay4_python_sdk-3.59.0/tests/test_mandates.py +0 -97
- mangopay4_python_sdk-3.59.0/tests/test_notifications.py +0 -282
- mangopay4_python_sdk-3.59.0/tests/test_payins.py +0 -2648
- mangopay4_python_sdk-3.59.0/tests/test_payouts.py +0 -254
- mangopay4_python_sdk-3.59.0/tests/test_preauthorizations.py +0 -852
- mangopay4_python_sdk-3.59.0/tests/test_rate_limit.py +0 -14
- mangopay4_python_sdk-3.59.0/tests/test_recipients.py +0 -191
- mangopay4_python_sdk-3.59.0/tests/test_refunds.py +0 -422
- mangopay4_python_sdk-3.59.0/tests/test_reports.py +0 -117
- mangopay4_python_sdk-3.59.0/tests/test_reports_v2.py +0 -145
- mangopay4_python_sdk-3.59.0/tests/test_repudiations.py +0 -15
- mangopay4_python_sdk-3.59.0/tests/test_settlements.py +0 -159
- mangopay4_python_sdk-3.59.0/tests/test_tokens.py +0 -61
- mangopay4_python_sdk-3.59.0/tests/test_transactions.py +0 -216
- mangopay4_python_sdk-3.59.0/tests/test_transfers.py +0 -226
- mangopay4_python_sdk-3.59.0/tests/test_ubos.py +0 -102
- mangopay4_python_sdk-3.59.0/tests/test_users.py +0 -987
- mangopay4_python_sdk-3.59.0/tests/test_utils.py +0 -49
- mangopay4_python_sdk-3.59.0/tests/test_virtual_account.py +0 -52
- mangopay4_python_sdk-3.59.0/tests/test_wallets.py +0 -358
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/LICENSE +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/__init__.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/api.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/auth.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/base.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/compat.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/constants.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/exceptions.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/page.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/query.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/ratelimit.py +0 -0
- {mangopay4_python_sdk-3.59.0 → mangopay4_python_sdk-4.0.0}/mangopay/signals.py +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mangopay4-python-sdk
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: A client library written in python to work with mangopay v2 api
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: mangopay,api,development,emoney,sdk
|
|
8
|
+
Author: Mangopay (www.mangopay.com)
|
|
9
|
+
Author-email: support@mangopay.com
|
|
10
|
+
Requires-Python: >=3.10,<3.15
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Provides-Extra: test
|
|
20
|
+
Requires-Dist: blinker (>=1.9.0,<2)
|
|
21
|
+
Requires-Dist: coverage (==7.14.0) ; extra == "dev"
|
|
22
|
+
Requires-Dist: coverage (==7.14.0) ; extra == "test"
|
|
23
|
+
Requires-Dist: exam (==0.10.6) ; extra == "dev"
|
|
24
|
+
Requires-Dist: exam (==0.10.6) ; extra == "test"
|
|
25
|
+
Requires-Dist: httplib2 (==0.31.2) ; extra == "dev"
|
|
26
|
+
Requires-Dist: httplib2 (==0.31.2) ; extra == "test"
|
|
27
|
+
Requires-Dist: ndg-httpsclient (==0.5.1) ; extra == "dev"
|
|
28
|
+
Requires-Dist: ndg-httpsclient (==0.5.1) ; extra == "test"
|
|
29
|
+
Requires-Dist: pyasn1 (==0.6.3) ; extra == "dev"
|
|
30
|
+
Requires-Dist: pyasn1 (==0.6.3) ; extra == "test"
|
|
31
|
+
Requires-Dist: pynose (==1.5.5) ; extra == "dev"
|
|
32
|
+
Requires-Dist: pynose (==1.5.5) ; extra == "test"
|
|
33
|
+
Requires-Dist: pyopenssl (==26.1.0) ; extra == "dev"
|
|
34
|
+
Requires-Dist: pyopenssl (==26.1.0) ; extra == "test"
|
|
35
|
+
Requires-Dist: pytz (>=2026.2)
|
|
36
|
+
Requires-Dist: requests (>=2.34.2,<3)
|
|
37
|
+
Requires-Dist: responses (==0.26.0) ; extra == "dev"
|
|
38
|
+
Requires-Dist: responses (==0.26.0) ; extra == "test"
|
|
39
|
+
Requires-Dist: simplejson (>=3.20.2,<4)
|
|
40
|
+
Requires-Dist: six (>=1.17.0,<2)
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
Mangopay Python SDK
|
|
44
|
+
=================================================
|
|
45
|
+
|
|
46
|
+
MangopaySDK is a Python client library to work with
|
|
47
|
+
[Mangopay REST API](http://docs.mangopay.com/api-references/).
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Installation
|
|
51
|
+
------------
|
|
52
|
+
|
|
53
|
+
mangopaysdk requires Python >=3.10,<3.15 and the following runtime dependencies:
|
|
54
|
+
|
|
55
|
+
* [requests](https://pypi.python.org/pypi/requests)
|
|
56
|
+
* [simplejson](https://pypi.python.org/pypi/simplejson)
|
|
57
|
+
* [blinker](https://pypi.python.org/pypi/blinker)
|
|
58
|
+
* [six](https://pypi.python.org/pypi/six)
|
|
59
|
+
* [pytz](https://pypi.python.org/pypi/pytz)
|
|
60
|
+
|
|
61
|
+
To install the package:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
pip install mangopay4-python-sdk
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
By installing this package with [pip](https://pypi.python.org/pypi/pip), all dependencies will be installed for you.
|
|
68
|
+
|
|
69
|
+
### Development install
|
|
70
|
+
|
|
71
|
+
The project is managed with [Poetry](https://python-poetry.org/). To set up a local development environment:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
poetry install --extras dev
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This installs the runtime dependencies as well as the `dev` extras (test runner, coverage, mocking, TLS helpers) defined in `pyproject.toml`. The resolved versions are pinned in `poetry.lock`.
|
|
78
|
+
|
|
79
|
+
To run the test suite (same command used in CI):
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
poetry run coverage run -m unittest discover
|
|
83
|
+
poetry run coverage xml
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
Documentation
|
|
88
|
+
-------------
|
|
89
|
+
|
|
90
|
+
For documentation and examples of usage for the Mangopay API please refer to: [API references](https://docs.mangopay.com/api-references/)
|
|
91
|
+
|
|
92
|
+
See the `docs/` directory to find examples.
|
|
93
|
+
|
|
94
|
+
mTLS certificates
|
|
95
|
+
-----------------
|
|
96
|
+
|
|
97
|
+
### Set the base URL for mTLS
|
|
98
|
+
|
|
99
|
+
Using mTLS authentication requires your integration to call a base URL with a different hostname from the standard API:
|
|
100
|
+
|
|
101
|
+
* Sandbox: `https://api-mtls.sandbox.mangopay.com`
|
|
102
|
+
* Production: `https://api-mtls.mangopay.com`
|
|
103
|
+
|
|
104
|
+
If using mTLS, your integration should use the `api-mtls` URLs for all API calls, including OAuth token generation.
|
|
105
|
+
|
|
106
|
+
**Caution:** Ensure you set the mTLS base URL, as shown in the configuration examples below. If you don’t, the mTLS certificate will not be transferred to Mangopay. When mTLS is enforced, your integration will result in an error.
|
|
107
|
+
|
|
108
|
+
### Configure the SDK’s mTLS properties
|
|
109
|
+
|
|
110
|
+
The Python SDK allows you to load the `.pem` and `.key` file paths in the global configuration or in the per-request handler.
|
|
111
|
+
|
|
112
|
+
| Property (global / per-request) | Type | Description |
|
|
113
|
+
| ------------------------------- | ------ | ------------------------------------ |
|
|
114
|
+
| `mtls_cert` / `cert` | string | Path to the certificate `.pem` file. |
|
|
115
|
+
| `mtls_private_key` / `key` | string | Path to the private `.key` file. |
|
|
116
|
+
|
|
117
|
+
**Caution:** The per-request properties `cert` and `key` take precedence if set and the global ones are ignored (`mangopay.mtls_cert` and `mangopay.mtls_private_key`).
|
|
118
|
+
|
|
119
|
+
The certificate files must be accessible at runtime; the SDK does not validate their content at initialization time.
|
|
120
|
+
|
|
121
|
+
When both are provided, the SDK sets `session.cert = (cert, key)` on the underlying `requests.Session`. If a combined certificate is provided (bundling the key), the SDK sets `session.cert = cert`.
|
|
122
|
+
|
|
123
|
+
#### Global configuration
|
|
124
|
+
|
|
125
|
+
The global properties allow you to set the certificate and key before making any API calls. The certificate is used for all requests made through the default handler.
|
|
126
|
+
|
|
127
|
+
```python theme={null}
|
|
128
|
+
import mangopay
|
|
129
|
+
|
|
130
|
+
mangopay.client_id = 'your-mangopay-client-id'
|
|
131
|
+
mangopay.apikey = 'your-mangopay-api-key'
|
|
132
|
+
mangopay.api_sandbox_url = 'https://api-mtls.sandbox.mangopay.com/v2.01/'
|
|
133
|
+
sandbox = True
|
|
134
|
+
# mangopay.api_url = 'https://api-mtls.mangopay.com/v2.01/'
|
|
135
|
+
mangopay.mtls_cert = '/path/to/certificate.pem'
|
|
136
|
+
mangopay.mtls_private_key = '/path/to/private.key'
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### Per-request handler
|
|
140
|
+
|
|
141
|
+
**Caution:** The per-request values take precedence over the global values.
|
|
142
|
+
|
|
143
|
+
Each `APIRequest` instance maintains its own `requests.Session`, so mTLS certificates are scoped to that instance and do not leak between handlers.
|
|
144
|
+
|
|
145
|
+
```python theme={null}
|
|
146
|
+
from mangopay.api import APIRequest
|
|
147
|
+
|
|
148
|
+
handler = APIRequest(
|
|
149
|
+
client_id='your-mangopay-client-id',
|
|
150
|
+
apikey='your-mangopay-api-key',
|
|
151
|
+
api_sandbox_url = 'https://api-mtls.sandbox.mangopay.com/v2.01/' # mTlS base URL
|
|
152
|
+
sandbox = True
|
|
153
|
+
# mangopay.api_url = 'https://api-mtls.mangopay.com/v2.01/'
|
|
154
|
+
cert='/path/to/certificate.pem',
|
|
155
|
+
key='/path/to/private.key'
|
|
156
|
+
)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Then pass the handler when making API calls:
|
|
160
|
+
|
|
161
|
+
```python theme={null}
|
|
162
|
+
from mangopay.resources import NaturalUser, Wallet
|
|
163
|
+
|
|
164
|
+
user = NaturalUser.get(user_id, handler=handler)
|
|
165
|
+
wallet = Wallet.get(wallet_id, handler=handler)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
License
|
|
169
|
+
-------------------------------------------------
|
|
170
|
+
MangopaySDK is distributed under MIT license, see LICENSE file.
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
Inspiration
|
|
174
|
+
-----------
|
|
175
|
+
|
|
176
|
+
The data model of python-mangopay is highly inspired by [peewee](https://github.com/coleifer/peewee).
|
|
177
|
+
|
|
178
|
+
Credits
|
|
179
|
+
-----------
|
|
180
|
+
|
|
181
|
+
The inital basis of this SDK was generously coded and donated by [Ulule](https://www.ulule.com/)
|
|
182
|
+
|
|
@@ -8,10 +8,13 @@ MangopaySDK is a Python client library to work with
|
|
|
8
8
|
Installation
|
|
9
9
|
------------
|
|
10
10
|
|
|
11
|
-
mangopaysdk requires:
|
|
11
|
+
mangopaysdk requires Python >=3.10,<3.15 and the following runtime dependencies:
|
|
12
12
|
|
|
13
13
|
* [requests](https://pypi.python.org/pypi/requests)
|
|
14
|
+
* [simplejson](https://pypi.python.org/pypi/simplejson)
|
|
14
15
|
* [blinker](https://pypi.python.org/pypi/blinker)
|
|
16
|
+
* [six](https://pypi.python.org/pypi/six)
|
|
17
|
+
* [pytz](https://pypi.python.org/pypi/pytz)
|
|
15
18
|
|
|
16
19
|
To install the package:
|
|
17
20
|
|
|
@@ -21,13 +24,30 @@ To install the package:
|
|
|
21
24
|
|
|
22
25
|
By installing this package with [pip](https://pypi.python.org/pypi/pip), all dependencies will be installed for you.
|
|
23
26
|
|
|
27
|
+
### Development install
|
|
28
|
+
|
|
29
|
+
The project is managed with [Poetry](https://python-poetry.org/). To set up a local development environment:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
poetry install --extras dev
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This installs the runtime dependencies as well as the `dev` extras (test runner, coverage, mocking, TLS helpers) defined in `pyproject.toml`. The resolved versions are pinned in `poetry.lock`.
|
|
36
|
+
|
|
37
|
+
To run the test suite (same command used in CI):
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
poetry run coverage run -m unittest discover
|
|
41
|
+
poetry run coverage xml
|
|
42
|
+
```
|
|
43
|
+
|
|
24
44
|
|
|
25
45
|
Documentation
|
|
26
46
|
-------------
|
|
27
47
|
|
|
28
48
|
For documentation and examples of usage for the Mangopay API please refer to: [API references](https://docs.mangopay.com/api-references/)
|
|
29
49
|
|
|
30
|
-
See
|
|
50
|
+
See the `docs/` directory to find examples.
|
|
31
51
|
|
|
32
52
|
mTLS certificates
|
|
33
53
|
-----------------
|
|
@@ -107,14 +127,6 @@ License
|
|
|
107
127
|
-------------------------------------------------
|
|
108
128
|
MangopaySDK is distributed under MIT license, see LICENSE file.
|
|
109
129
|
|
|
110
|
-
Contact
|
|
111
|
-
-------------------------------------------------
|
|
112
|
-
Report bugs or suggest features using [issue tracker at GitHub](https://github.com/Mangopay/mangopay2-python-sdk/issues).
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Account creation
|
|
116
|
-
-------------------------------------------------
|
|
117
|
-
You can get yourself a free sandbox account or sign up for a production account by [registering on the Mangopay site](https://www.mangopay.com/start/) (note that validation of your production account involves several steps, so think about doing it in advance of when you actually want to go live).
|
|
118
130
|
|
|
119
131
|
Inspiration
|
|
120
132
|
-----------
|
|
@@ -16,7 +16,7 @@ from .utils import timestamp_from_datetime, timestamp_from_date, Money, DebitedB
|
|
|
16
16
|
CompanyNumberValidation, ReportFilter, PayInIntentExternalData, PayInIntentBuyer, SupportedBank, \
|
|
17
17
|
VerificationOfPayee, PayInIntentRefund, PayInIntentCapture, PayInIntentDispute, CustomFees, MarginsResponse, \
|
|
18
18
|
UserMargin, ConsentScope, AuthenticationResult, FlowDescriptor, SettlementFooterError, SettlementLineError, \
|
|
19
|
-
SettlementLineErrorDetail
|
|
19
|
+
SettlementLineErrorDetail, AccountFunding, AccountFundingSender, KycInformation
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class FieldDescriptor(object):
|
|
@@ -840,6 +840,26 @@ class ScopeBlockedField(Field):
|
|
|
840
840
|
return value
|
|
841
841
|
|
|
842
842
|
|
|
843
|
+
class KycInformationField(Field):
|
|
844
|
+
def python_value(self, value):
|
|
845
|
+
if value is not None:
|
|
846
|
+
return KycInformation(last_kyc_date=value['LastKycDate'],
|
|
847
|
+
kyc_renewal_deadline=value['KycRenewalDeadline'])
|
|
848
|
+
|
|
849
|
+
return value
|
|
850
|
+
|
|
851
|
+
def api_value(self, value):
|
|
852
|
+
value = super(KycInformationField, self).api_value(value)
|
|
853
|
+
|
|
854
|
+
if isinstance(value, KycInformation):
|
|
855
|
+
value = {
|
|
856
|
+
'LastKycDate': value.last_kyc_date,
|
|
857
|
+
'KycRenewalDeadline': value.kyc_renewal_deadline,
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
return value
|
|
861
|
+
|
|
862
|
+
|
|
843
863
|
class ShippingField(Field):
|
|
844
864
|
def python_value(self, value):
|
|
845
865
|
if value is not None:
|
|
@@ -1599,4 +1619,34 @@ class SettlementLinesErrorsField(Field):
|
|
|
1599
1619
|
|
|
1600
1620
|
return value
|
|
1601
1621
|
|
|
1622
|
+
|
|
1623
|
+
class AccountFundingField(Field):
|
|
1624
|
+
def python_value(self, value):
|
|
1625
|
+
if isinstance(value, dict):
|
|
1626
|
+
return AccountFunding(sender=self._to_sender(value.get('Sender', None)),
|
|
1627
|
+
purpose=value.get('Purpose', None),
|
|
1628
|
+
type=value.get('Type', None))
|
|
1629
|
+
|
|
1630
|
+
return value
|
|
1631
|
+
|
|
1632
|
+
@staticmethod
|
|
1633
|
+
def _to_sender(value):
|
|
1634
|
+
if isinstance(value, dict):
|
|
1635
|
+
return AccountFundingSender(first_name=value.get('FirstName', None),
|
|
1636
|
+
last_name=value.get('LastName', None),
|
|
1637
|
+
address=value.get('Address', None),
|
|
1638
|
+
email=value.get('Email', None),
|
|
1639
|
+
birthday=value.get('Birthday', None),
|
|
1640
|
+
nationality=value.get('Nationality', None),
|
|
1641
|
+
occupation=value.get('Occupation', None),
|
|
1642
|
+
birth_country=value.get('BirthCountry', None))
|
|
1643
|
+
|
|
1644
|
+
return value
|
|
1645
|
+
|
|
1646
|
+
def api_value(self, value):
|
|
1647
|
+
value = super(AccountFundingField, self).api_value(value)
|
|
1648
|
+
|
|
1649
|
+
if isinstance(value, AccountFunding):
|
|
1650
|
+
return value.to_api_json()
|
|
1651
|
+
|
|
1602
1652
|
return value
|
|
@@ -22,7 +22,8 @@ from .fields import (PrimaryKeyField, EmailField, CharField,
|
|
|
22
22
|
PayInIntentExternalDataField, PayInIntentBuyerField, SupportedBanksField, VerificationOfPayeeField,
|
|
23
23
|
PayInIntentRefundField, PayInIntentCaptureField, PayInIntentDisputeField, CustomFeesField,
|
|
24
24
|
UserMarginField, MarginsResponseField, ConsentScopeField, AuthenticationResultField,
|
|
25
|
-
FlowDescriptorField, SettlementFooterErrorsField, SettlementLinesErrorsField
|
|
25
|
+
FlowDescriptorField, SettlementFooterErrorsField, SettlementLinesErrorsField,
|
|
26
|
+
AccountFundingField, KycInformationField)
|
|
26
27
|
from .query import InsertQuery, UpdateQuery, SelectQuery, ActionQuery, DeleteQuery
|
|
27
28
|
|
|
28
29
|
|
|
@@ -1341,6 +1342,7 @@ class DirectPayIn(PayIn):
|
|
|
1341
1342
|
preferred_card_network = CharField(api_name='PreferredCardNetwork')
|
|
1342
1343
|
card_info = CardInfoField(api_name='CardInfo')
|
|
1343
1344
|
payment_category = CharField(api_name='PaymentCategory')
|
|
1345
|
+
account_funding = AccountFundingField(api_name='AccountFunding')
|
|
1344
1346
|
|
|
1345
1347
|
class Meta:
|
|
1346
1348
|
verbose_name = 'payin'
|
|
@@ -3036,6 +3038,7 @@ class Ubo(BaseModel):
|
|
|
3036
3038
|
class UserBlockStatus(BaseModel):
|
|
3037
3039
|
scope_blocked = ScopeBlockedField(api_name='ScopeBlocked', required=True)
|
|
3038
3040
|
action_code = CharField(api_name='ActionCode', required=True)
|
|
3041
|
+
kyc_information = KycInformationField(api_name='KycInformation')
|
|
3039
3042
|
|
|
3040
3043
|
class Meta:
|
|
3041
3044
|
verbose_name = 'userblockstatus'
|
|
@@ -570,6 +570,53 @@ class Shipping(object):
|
|
|
570
570
|
(self.first_name, self.last_name, self.address)
|
|
571
571
|
|
|
572
572
|
|
|
573
|
+
@add_camelcase_aliases
|
|
574
|
+
class AccountFundingSender(object):
|
|
575
|
+
def __init__(self, first_name=None, last_name=None, address=None, email=None, birthday=None,
|
|
576
|
+
nationality=None, occupation=None, birth_country=None):
|
|
577
|
+
self.first_name = first_name
|
|
578
|
+
self.last_name = last_name
|
|
579
|
+
self.address = address
|
|
580
|
+
self.email = email
|
|
581
|
+
self.birthday = birthday
|
|
582
|
+
self.nationality = nationality
|
|
583
|
+
self.occupation = occupation
|
|
584
|
+
self.birth_country = birth_country
|
|
585
|
+
|
|
586
|
+
def __str__(self):
|
|
587
|
+
return 'AccountFundingSender: %s %s' % (self.first_name, self.last_name)
|
|
588
|
+
|
|
589
|
+
def to_api_json(self):
|
|
590
|
+
return {
|
|
591
|
+
'FirstName': self.first_name,
|
|
592
|
+
'LastName': self.last_name,
|
|
593
|
+
'Address': self.address,
|
|
594
|
+
'Email': self.email,
|
|
595
|
+
'Birthday': self.birthday,
|
|
596
|
+
'Nationality': self.nationality,
|
|
597
|
+
'Occupation': self.occupation,
|
|
598
|
+
'BirthCountry': self.birth_country
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
@add_camelcase_aliases
|
|
603
|
+
class AccountFunding(object):
|
|
604
|
+
def __init__(self, sender=None, purpose=None, type=None):
|
|
605
|
+
self.sender = sender
|
|
606
|
+
self.purpose = purpose
|
|
607
|
+
self.type = type
|
|
608
|
+
|
|
609
|
+
def __str__(self):
|
|
610
|
+
return 'AccountFunding: %s, %s' % (self.purpose, self.type)
|
|
611
|
+
|
|
612
|
+
def to_api_json(self):
|
|
613
|
+
return {
|
|
614
|
+
'Sender': self.sender,
|
|
615
|
+
'Purpose': self.purpose,
|
|
616
|
+
'Type': self.type
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
|
|
573
620
|
@add_camelcase_aliases
|
|
574
621
|
class CurrentState(object):
|
|
575
622
|
def __init__(self, payins_linked=None, cumulated_debited_amount=None, cumulated_debited_fees=None,
|
|
@@ -607,6 +654,29 @@ class ScopeBlocked(object):
|
|
|
607
654
|
}
|
|
608
655
|
|
|
609
656
|
|
|
657
|
+
@add_camelcase_aliases
|
|
658
|
+
class KycInformation(object):
|
|
659
|
+
def __init__(self, last_kyc_date=None, kyc_renewal_deadline=None):
|
|
660
|
+
self.last_kyc_date = last_kyc_date
|
|
661
|
+
self.kyc_renewal_deadline = kyc_renewal_deadline
|
|
662
|
+
|
|
663
|
+
def __str__(self):
|
|
664
|
+
return 'KycInformation: %s, %s' % (self.last_kyc_date, self.kyc_renewal_deadline)
|
|
665
|
+
|
|
666
|
+
def __eq__(self, other):
|
|
667
|
+
if isinstance(other, KycInformation):
|
|
668
|
+
stat = ((self.last_kyc_date == other.last_kyc_date) and
|
|
669
|
+
(self.kyc_renewal_deadline == other.kyc_renewal_deadline))
|
|
670
|
+
return stat
|
|
671
|
+
return False
|
|
672
|
+
|
|
673
|
+
def to_api_json(self):
|
|
674
|
+
return {
|
|
675
|
+
"LastKycDate": self.last_kyc_date,
|
|
676
|
+
"KycRenewalDeadline": self.kyc_renewal_deadline,
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
|
|
610
680
|
# This code belongs to https://github.com/carljm/django-model-utils
|
|
611
681
|
class Choices(object):
|
|
612
682
|
"""
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mangopay4-python-sdk"
|
|
7
|
+
version = "4.0.0"
|
|
8
|
+
description = "A client library written in python to work with mangopay v2 api"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Mangopay (www.mangopay.com)", email = "support@mangopay.com" },
|
|
13
|
+
]
|
|
14
|
+
requires-python = ">=3.10,<3.15"
|
|
15
|
+
keywords = ["mangopay", "api", "development", "emoney", "sdk"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Topic :: Software Development :: Build Tools",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.14"
|
|
24
|
+
]
|
|
25
|
+
dependencies = [
|
|
26
|
+
"requests>=2.34.2,<3",
|
|
27
|
+
"simplejson>=3.20.2,<4",
|
|
28
|
+
"blinker>=1.9.0,<2",
|
|
29
|
+
"six>=1.17.0,<2",
|
|
30
|
+
"pytz>=2026.2",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
dev = [
|
|
35
|
+
"responses==0.26.0",
|
|
36
|
+
"pynose==1.5.5",
|
|
37
|
+
"coverage==7.14.0",
|
|
38
|
+
"exam==0.10.6",
|
|
39
|
+
"httplib2==0.31.2",
|
|
40
|
+
"pyopenssl==26.1.0",
|
|
41
|
+
"ndg-httpsclient==0.5.1",
|
|
42
|
+
"pyasn1==0.6.3",
|
|
43
|
+
]
|
|
44
|
+
test = [
|
|
45
|
+
"responses==0.26.0",
|
|
46
|
+
"pynose==1.5.5",
|
|
47
|
+
"coverage==7.14.0",
|
|
48
|
+
"exam==0.10.6",
|
|
49
|
+
"httplib2==0.31.2",
|
|
50
|
+
"pyopenssl==26.1.0",
|
|
51
|
+
"ndg-httpsclient==0.5.1",
|
|
52
|
+
"pyasn1==0.6.3",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[tool.poetry]
|
|
56
|
+
packages = [{ include = "mangopay" }]
|
|
57
|
+
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
This SDK is a client library for interacting with the Mangopay API.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mangopay4-python-sdk
|
|
3
|
-
Version: 3.59.0
|
|
4
|
-
Summary: A client library written in python to work with mangopay v2 api
|
|
5
|
-
Home-page: https://github.com/Mangopay/mangopay2-python-sdk
|
|
6
|
-
Author: Mangopay (www.mangopay.com)
|
|
7
|
-
Author-email: support@mangopay.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: mangopay api development emoney sdk
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Topic :: Software Development :: Build Tools
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
License-File: LICENSE
|
|
18
|
-
Requires-Dist: requests
|
|
19
|
-
Requires-Dist: simplejson
|
|
20
|
-
Requires-Dist: blinker
|
|
21
|
-
Requires-Dist: six
|
|
22
|
-
Requires-Dist: pytz
|
|
23
|
-
Provides-Extra: dev
|
|
24
|
-
Requires-Dist: responses; extra == "dev"
|
|
25
|
-
Requires-Dist: nose; extra == "dev"
|
|
26
|
-
Requires-Dist: coverage; extra == "dev"
|
|
27
|
-
Requires-Dist: httplib2; extra == "dev"
|
|
28
|
-
Requires-Dist: pyopenssl; extra == "dev"
|
|
29
|
-
Requires-Dist: ndg-httpsclient; extra == "dev"
|
|
30
|
-
Requires-Dist: pyasn1; extra == "dev"
|
|
31
|
-
Requires-Dist: exam; extra == "dev"
|
|
32
|
-
Provides-Extra: test
|
|
33
|
-
Requires-Dist: responses; extra == "test"
|
|
34
|
-
Requires-Dist: nose; extra == "test"
|
|
35
|
-
Requires-Dist: coverage; extra == "test"
|
|
36
|
-
Requires-Dist: httplib2; extra == "test"
|
|
37
|
-
Requires-Dist: pyopenssl; extra == "test"
|
|
38
|
-
Requires-Dist: ndg-httpsclient; extra == "test"
|
|
39
|
-
Requires-Dist: pyasn1; extra == "test"
|
|
40
|
-
Requires-Dist: exam; extra == "test"
|
|
41
|
-
Dynamic: author
|
|
42
|
-
Dynamic: author-email
|
|
43
|
-
Dynamic: classifier
|
|
44
|
-
Dynamic: description
|
|
45
|
-
Dynamic: home-page
|
|
46
|
-
Dynamic: keywords
|
|
47
|
-
Dynamic: license
|
|
48
|
-
Dynamic: license-file
|
|
49
|
-
Dynamic: provides-extra
|
|
50
|
-
Dynamic: requires-dist
|
|
51
|
-
Dynamic: summary
|
|
52
|
-
|
|
53
|
-
This SDK is a client library for interacting with the Mangopay API.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mangopay4-python-sdk
|
|
3
|
-
Version: 3.59.0
|
|
4
|
-
Summary: A client library written in python to work with mangopay v2 api
|
|
5
|
-
Home-page: https://github.com/Mangopay/mangopay2-python-sdk
|
|
6
|
-
Author: Mangopay (www.mangopay.com)
|
|
7
|
-
Author-email: support@mangopay.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: mangopay api development emoney sdk
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Topic :: Software Development :: Build Tools
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
License-File: LICENSE
|
|
18
|
-
Requires-Dist: requests
|
|
19
|
-
Requires-Dist: simplejson
|
|
20
|
-
Requires-Dist: blinker
|
|
21
|
-
Requires-Dist: six
|
|
22
|
-
Requires-Dist: pytz
|
|
23
|
-
Provides-Extra: dev
|
|
24
|
-
Requires-Dist: responses; extra == "dev"
|
|
25
|
-
Requires-Dist: nose; extra == "dev"
|
|
26
|
-
Requires-Dist: coverage; extra == "dev"
|
|
27
|
-
Requires-Dist: httplib2; extra == "dev"
|
|
28
|
-
Requires-Dist: pyopenssl; extra == "dev"
|
|
29
|
-
Requires-Dist: ndg-httpsclient; extra == "dev"
|
|
30
|
-
Requires-Dist: pyasn1; extra == "dev"
|
|
31
|
-
Requires-Dist: exam; extra == "dev"
|
|
32
|
-
Provides-Extra: test
|
|
33
|
-
Requires-Dist: responses; extra == "test"
|
|
34
|
-
Requires-Dist: nose; extra == "test"
|
|
35
|
-
Requires-Dist: coverage; extra == "test"
|
|
36
|
-
Requires-Dist: httplib2; extra == "test"
|
|
37
|
-
Requires-Dist: pyopenssl; extra == "test"
|
|
38
|
-
Requires-Dist: ndg-httpsclient; extra == "test"
|
|
39
|
-
Requires-Dist: pyasn1; extra == "test"
|
|
40
|
-
Requires-Dist: exam; extra == "test"
|
|
41
|
-
Dynamic: author
|
|
42
|
-
Dynamic: author-email
|
|
43
|
-
Dynamic: classifier
|
|
44
|
-
Dynamic: description
|
|
45
|
-
Dynamic: home-page
|
|
46
|
-
Dynamic: keywords
|
|
47
|
-
Dynamic: license
|
|
48
|
-
Dynamic: license-file
|
|
49
|
-
Dynamic: provides-extra
|
|
50
|
-
Dynamic: requires-dist
|
|
51
|
-
Dynamic: summary
|
|
52
|
-
|
|
53
|
-
This SDK is a client library for interacting with the Mangopay API.
|