paymentsgate 1.5.6__py3-none-any.whl → 1.5.7__py3-none-any.whl
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.
Potentially problematic release.
This version of paymentsgate might be problematic. Click here for more details.
- paymentsgate/client.py +18 -0
- paymentsgate/enums.py +2 -0
- paymentsgate/models.py +10 -0
- {paymentsgate-1.5.6.dist-info → paymentsgate-1.5.7.dist-info}/METADATA +1 -1
- {paymentsgate-1.5.6.dist-info → paymentsgate-1.5.7.dist-info}/RECORD +7 -7
- {paymentsgate-1.5.6.dist-info → paymentsgate-1.5.7.dist-info}/LICENSE +0 -0
- {paymentsgate-1.5.6.dist-info → paymentsgate-1.5.7.dist-info}/WHEEL +0 -0
paymentsgate/client.py
CHANGED
|
@@ -12,6 +12,7 @@ from .models import (
|
|
|
12
12
|
Credentials,
|
|
13
13
|
GetQuoteModel,
|
|
14
14
|
GetQuoteResponseModel,
|
|
15
|
+
InvoiceListModelWithMeta,
|
|
15
16
|
PayInModel,
|
|
16
17
|
PayInResponseModel,
|
|
17
18
|
PayOutModel,
|
|
@@ -143,6 +144,23 @@ class ApiAsyncClient(BaseClient):
|
|
|
143
144
|
if not response.success:
|
|
144
145
|
raise APIResponseError(response)
|
|
145
146
|
return response.cast(InvoiceModel, APIResponseError)
|
|
147
|
+
|
|
148
|
+
async def List(self, page: int | int = 0) -> InvoiceListModelWithMeta:
|
|
149
|
+
# Prepare request
|
|
150
|
+
request = Request(
|
|
151
|
+
method="get",
|
|
152
|
+
path=ApiPaths.invoices_list.replace('$1', page | 10),
|
|
153
|
+
content_type='application/json',
|
|
154
|
+
noAuth=False,
|
|
155
|
+
signature=False,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
# Handle response
|
|
159
|
+
response = await self._send_request(request)
|
|
160
|
+
if not response.success:
|
|
161
|
+
raise APIResponseError(response)
|
|
162
|
+
return response.cast(InvoiceListModelWithMeta, APIResponseError)
|
|
163
|
+
|
|
146
164
|
|
|
147
165
|
async def get_token(self) -> AccessToken | None:
|
|
148
166
|
# First check if valid token is cached
|
paymentsgate/enums.py
CHANGED
|
@@ -16,6 +16,7 @@ class ApiPaths(StrEnum):
|
|
|
16
16
|
invoices_payout_tlv = "/deals/tlv"
|
|
17
17
|
invoices_info = "/deals/:id"
|
|
18
18
|
invoices_credentials = "/deals/:id/credentials"
|
|
19
|
+
invoices_list = "/deals/list?page=$1"
|
|
19
20
|
assets_list = "/wallet"
|
|
20
21
|
assets_deposit = "/wallet/deposit"
|
|
21
22
|
banks_list = "/banks/find"
|
|
@@ -244,6 +245,7 @@ class InvoiceTypes(StrEnum):
|
|
|
244
245
|
banktransferdop = ("banktransferdop",)
|
|
245
246
|
sinpemovil = ("sinpemovil",)
|
|
246
247
|
tryqr = ("tryqr",)
|
|
248
|
+
inrqr = ("inrqr",)
|
|
247
249
|
bsb = ("bsb",)
|
|
248
250
|
banktransfermnt = ("banktransfermnt",)
|
|
249
251
|
stcpay = ("stcpay",)
|
paymentsgate/models.py
CHANGED
|
@@ -289,6 +289,7 @@ class QuoteTlvResponse(BaseResponseModel):
|
|
|
289
289
|
qrVersion: int # qr code version, 1 - nspk, 2 - tlv encoded, 3 - tlv plain
|
|
290
290
|
rate: float # exchange rate
|
|
291
291
|
tlv: TLVExtended | None = None
|
|
292
|
+
isStatic: bool | None = None
|
|
292
293
|
# merchant: Optional[str] = Field(default=None) # merchant title
|
|
293
294
|
# logo: Optional[str] = Field(default=None) # merchant logo
|
|
294
295
|
|
|
@@ -299,3 +300,12 @@ class PayOutTlvRequest(BaseRequestModel):
|
|
|
299
300
|
clientId: Optional[str] = Field(default=None)
|
|
300
301
|
src_amount: Optional[float] = Field(default=None)
|
|
301
302
|
sender_personal: Optional[PayOutSenderModel] = Field(default=None)
|
|
303
|
+
|
|
304
|
+
class ListMetadata(BaseResponseModel):
|
|
305
|
+
page: int
|
|
306
|
+
limit: int
|
|
307
|
+
total: int
|
|
308
|
+
|
|
309
|
+
class InvoiceListModelWithMeta(BaseResponseModel):
|
|
310
|
+
metadata: ListMetadata
|
|
311
|
+
rows: List[InvoiceModel]
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
paymentsgate/__init__.py,sha256=ZEvXcrfobIRRPO6szTwvaNWxx5t9MLGT7KCkB5dJun4,364
|
|
2
2
|
paymentsgate/cache.py,sha256=gkx5Bu_Z8nEr_qDB4_O2tVbCdLmePztaz7iJRZWWn14,1007
|
|
3
|
-
paymentsgate/client.py,sha256=
|
|
4
|
-
paymentsgate/enums.py,sha256=
|
|
3
|
+
paymentsgate/client.py,sha256=hzjBgAwLM84o_Ii_s9Hf-fHFRj2iSslE4Y-YVUCUepo,15807
|
|
4
|
+
paymentsgate/enums.py,sha256=rdwjIPys5eFXdRwrvli9El3-YIyMhHfi24wQ5d14w_k,6631
|
|
5
5
|
paymentsgate/exceptions.py,sha256=HtQf0aRF5aKlXUh9uJyxHciJzXYC2zRxz9-HUIl2wDA,1525
|
|
6
6
|
paymentsgate/logger.py,sha256=4Xs2R18au88LRUvF3Ll6xf8ziz4xyq65UU3pcgXPg8g,220
|
|
7
7
|
paymentsgate/mappers.py,sha256=Rr4LM7lAPI1sQgaVirgm2LREvO-7vV4yEUsu6W_ARIw,162
|
|
8
|
-
paymentsgate/models.py,sha256=
|
|
8
|
+
paymentsgate/models.py,sha256=oS38CNUT1PNwQP0XXwp5E0yG9rDO39gspQ8bKBeciWM,9584
|
|
9
9
|
paymentsgate/signature.py,sha256=FCF9GKvVyXQAEpUylt3i3vJKhCWjEHgqfVqyA5l7WPY,2996
|
|
10
10
|
paymentsgate/tokens.py,sha256=ZK_xKj8GWTlXjl-8ZlU216dZdxjFFEKsRp41XR1cUQA,914
|
|
11
11
|
paymentsgate/transport.py,sha256=KA4Ro48s_6PzJ5ZRLf-eygYKjNUJ8OReiBWAVi8rHM8,852
|
|
12
12
|
paymentsgate/types.py,sha256=AoMJ4eFpTAAZ_n4ZeUIJY4hUD_E9tFgoBUqKy18FJ44,130
|
|
13
|
-
paymentsgate-1.5.
|
|
14
|
-
paymentsgate-1.5.
|
|
15
|
-
paymentsgate-1.5.
|
|
16
|
-
paymentsgate-1.5.
|
|
13
|
+
paymentsgate-1.5.7.dist-info/LICENSE,sha256=4xWMZLmqNJ6602DZLEg0A9v03uT4xMq_-XSIxvXvfYM,1075
|
|
14
|
+
paymentsgate-1.5.7.dist-info/WHEEL,sha256=bbU3AyvhQ312rVm7zzRQjs6axI1UYWC3nmFA2E6FFSI,88
|
|
15
|
+
paymentsgate-1.5.7.dist-info/METADATA,sha256=ODMy1O4nRRL3Kaxir9zPjP3kCcpU6Km_kl2BKfDTbMU,4055
|
|
16
|
+
paymentsgate-1.5.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|