paymentsgate 1.4.7__py3-none-any.whl → 1.4.8__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.
- paymentsgate/client.py +21 -2
- paymentsgate/models.py +5 -0
- {paymentsgate-1.4.7.dist-info → paymentsgate-1.4.8.dist-info}/METADATA +1 -1
- {paymentsgate-1.4.7.dist-info → paymentsgate-1.4.8.dist-info}/RECORD +6 -6
- {paymentsgate-1.4.7.dist-info → paymentsgate-1.4.8.dist-info}/LICENSE +0 -0
- {paymentsgate-1.4.7.dist-info → paymentsgate-1.4.8.dist-info}/WHEEL +0 -0
paymentsgate/client.py
CHANGED
|
@@ -19,7 +19,8 @@ from paymentsgate.models import (
|
|
|
19
19
|
PayInModel,
|
|
20
20
|
PayInResponseModel,
|
|
21
21
|
PayOutModel,
|
|
22
|
-
PayOutResponseModel
|
|
22
|
+
PayOutResponseModel,
|
|
23
|
+
InvoiceModel
|
|
23
24
|
)
|
|
24
25
|
from paymentsgate.enums import ApiPaths
|
|
25
26
|
from paymentsgate.transport import (
|
|
@@ -34,7 +35,6 @@ from paymentsgate.cache import (
|
|
|
34
35
|
|
|
35
36
|
import requests
|
|
36
37
|
|
|
37
|
-
|
|
38
38
|
@dataclass
|
|
39
39
|
class ApiClient:
|
|
40
40
|
baseUrl: str = field(default="", init=False)
|
|
@@ -108,6 +108,25 @@ class ApiClient:
|
|
|
108
108
|
raise APIResponseError(response)
|
|
109
109
|
|
|
110
110
|
return response.cast(GetQuoteResponseModel, APIResponseError)
|
|
111
|
+
|
|
112
|
+
def Status(self, query: str) -> InvoiceModel:
|
|
113
|
+
# Prepare request
|
|
114
|
+
request = Request(
|
|
115
|
+
method="get",
|
|
116
|
+
path=ApiPaths.invoices_info,
|
|
117
|
+
content_type='application/json',
|
|
118
|
+
noAuth=False,
|
|
119
|
+
signature=False,
|
|
120
|
+
body=request
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Handle response
|
|
124
|
+
response = self._send_request(request)
|
|
125
|
+
self.logger(request, response)
|
|
126
|
+
if not response.success:
|
|
127
|
+
raise APIResponseError(response)
|
|
128
|
+
|
|
129
|
+
return response.cast(InvoiceModel, APIResponseError)
|
|
111
130
|
|
|
112
131
|
@property
|
|
113
132
|
def token(self) -> AccessToken | None:
|
paymentsgate/models.py
CHANGED
|
@@ -200,9 +200,11 @@ class InvoiceAmountModel:
|
|
|
200
200
|
class InvoiceMetadataModel:
|
|
201
201
|
invoiceId: Optional[str]
|
|
202
202
|
clientId: Optional[str]
|
|
203
|
+
fiatAmount: Optional[float]
|
|
203
204
|
|
|
204
205
|
@dataclass
|
|
205
206
|
class InvoiceModel:
|
|
207
|
+
_id: str
|
|
206
208
|
orderId: str
|
|
207
209
|
projectId: str
|
|
208
210
|
currencyFrom: CurrencyModel
|
|
@@ -212,6 +214,8 @@ class InvoiceModel:
|
|
|
212
214
|
status: InvoiceStatusModel
|
|
213
215
|
amounts: InvoiceAmountModel
|
|
214
216
|
metadata: InvoiceMetadataModel
|
|
217
|
+
receiptUrls: List[str]
|
|
218
|
+
isExpired: bool
|
|
215
219
|
createdAt: datetime
|
|
216
220
|
updatedAt: datetime
|
|
217
221
|
expiredAt: datetime
|
|
@@ -226,3 +230,4 @@ class AssetsAccountModel:
|
|
|
226
230
|
@dataclass
|
|
227
231
|
class AssetsResponseModel:
|
|
228
232
|
assets: List[AssetsAccountModel]
|
|
233
|
+
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
paymentsgate/__init__.py,sha256=53DrE7IRD2NFQshE2EGYQ28jLr-ro45iFei28ZMOezI,336
|
|
2
2
|
paymentsgate/cache.py,sha256=w3xB3iaYPxVEZbeWxpWM1PQT-JctspoI5qC9bv6Xmts,1002
|
|
3
|
-
paymentsgate/client.py,sha256=
|
|
3
|
+
paymentsgate/client.py,sha256=OM-kNkSKARc4_Nub9Vy0HEswQfaaYVvK7P3bbxh0Lag,7577
|
|
4
4
|
paymentsgate/enums.py,sha256=wvDeVQvSO5WPPSWd1XKOh-8vgI1gsK2wyfMi7P8vay0,3311
|
|
5
5
|
paymentsgate/exceptions.py,sha256=fQniUSQp8XkWXPCITHDUbVNcDwSPA8rJpwbbhJ8wfNQ,1306
|
|
6
6
|
paymentsgate/logger.py,sha256=QY6upavgb2y9dRQG05NwF_OTxP7bPspZR5QdpCjJULI,221
|
|
7
|
-
paymentsgate/models.py,sha256=
|
|
7
|
+
paymentsgate/models.py,sha256=LEwaoy2rkdA-2BLJoV85aKBlDMDu4NETZ0thCrBIV1g,5017
|
|
8
8
|
paymentsgate/tokens.py,sha256=qdvCQJ9jYIRKSxlmm5gip-nMAQWH8_EHys9zwel4oaU,916
|
|
9
9
|
paymentsgate/transport.py,sha256=pOmvDZh06uIGIUWTFi0vgf8pAgQT1f96ArcJNycU2Ks,785
|
|
10
|
-
paymentsgate-1.4.
|
|
11
|
-
paymentsgate-1.4.
|
|
12
|
-
paymentsgate-1.4.
|
|
13
|
-
paymentsgate-1.4.
|
|
10
|
+
paymentsgate-1.4.8.dist-info/LICENSE,sha256=4xWMZLmqNJ6602DZLEg0A9v03uT4xMq_-XSIxvXvfYM,1075
|
|
11
|
+
paymentsgate-1.4.8.dist-info/WHEEL,sha256=bbU3AyvhQ312rVm7zzRQjs6axI1UYWC3nmFA2E6FFSI,88
|
|
12
|
+
paymentsgate-1.4.8.dist-info/METADATA,sha256=iQOvqOiCD_fnXJhEGnS3lOJId4rZJkAM1S9Tqh7qkWA,4020
|
|
13
|
+
paymentsgate-1.4.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|