crypticorn 2.4.4__py3-none-any.whl → 2.4.6__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.
- crypticorn/client.py +1 -1
- crypticorn/common/errors.py +9 -5
- crypticorn/common/scopes.py +7 -1
- crypticorn/common/sorter.py +2 -2
- crypticorn/metrics/client/models/exchange_mapping.py +4 -2
- crypticorn/metrics/client/models/trading_status.py +1 -0
- crypticorn/pay/client/__init__.py +5 -6
- crypticorn/pay/client/api/payments_api.py +85 -18
- crypticorn/pay/client/api/products_api.py +49 -50
- crypticorn/pay/client/configuration.py +8 -1
- crypticorn/pay/client/models/__init__.py +5 -6
- crypticorn/pay/client/models/payment.py +28 -147
- crypticorn/pay/client/models/product_create.py +120 -0
- crypticorn/pay/client/models/product_read.py +123 -0
- crypticorn/pay/client/models/product_sub_read.py +103 -0
- crypticorn/pay/client/models/product_update.py +142 -0
- crypticorn/pay/client/models/product_update_model.py +6 -6
- crypticorn/pay/client/models/scope.py +2 -2
- crypticorn/pay/client/rest.py +4 -1
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/METADATA +6 -1
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/RECORD +24 -20
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/WHEEL +0 -0
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.4.dist-info → crypticorn-2.4.6.dist-info}/top_level.txt +0 -0
@@ -17,12 +17,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
|
-
from typing import
|
20
|
+
from typing import List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
-
from crypticorn.pay.client.models.
|
23
|
-
|
24
|
-
|
25
|
-
from crypticorn.pay.client.models.product_model import ProductModel
|
22
|
+
from crypticorn.pay.client.models.product_create import ProductCreate
|
23
|
+
from crypticorn.pay.client.models.product_read import ProductRead
|
24
|
+
from crypticorn.pay.client.models.product_update import ProductUpdate
|
26
25
|
|
27
26
|
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
28
27
|
from crypticorn.pay.client.api_response import ApiResponse
|
@@ -44,7 +43,7 @@ class ProductsApi:
|
|
44
43
|
@validate_call
|
45
44
|
async def create_product(
|
46
45
|
self,
|
47
|
-
|
46
|
+
product_create: ProductCreate,
|
48
47
|
_request_timeout: Union[
|
49
48
|
None,
|
50
49
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -56,13 +55,13 @@ class ProductsApi:
|
|
56
55
|
_content_type: Optional[StrictStr] = None,
|
57
56
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
58
57
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
59
|
-
) ->
|
58
|
+
) -> ProductRead:
|
60
59
|
"""Create Product
|
61
60
|
|
62
61
|
Create a new product
|
63
62
|
|
64
|
-
:param
|
65
|
-
:type
|
63
|
+
:param product_create: (required)
|
64
|
+
:type product_create: ProductCreate
|
66
65
|
:param _request_timeout: timeout setting for this request. If one
|
67
66
|
number provided, it will be total request
|
68
67
|
timeout. It can also be a pair (tuple) of
|
@@ -86,7 +85,7 @@ class ProductsApi:
|
|
86
85
|
""" # noqa: E501
|
87
86
|
|
88
87
|
_param = self._create_product_serialize(
|
89
|
-
|
88
|
+
product_create=product_create,
|
90
89
|
_request_auth=_request_auth,
|
91
90
|
_content_type=_content_type,
|
92
91
|
_headers=_headers,
|
@@ -94,7 +93,7 @@ class ProductsApi:
|
|
94
93
|
)
|
95
94
|
|
96
95
|
_response_types_map: Dict[str, Optional[str]] = {
|
97
|
-
"
|
96
|
+
"201": "ProductRead",
|
98
97
|
"422": "HTTPValidationError",
|
99
98
|
}
|
100
99
|
response_data = await self.api_client.call_api(
|
@@ -109,7 +108,7 @@ class ProductsApi:
|
|
109
108
|
@validate_call
|
110
109
|
async def create_product_with_http_info(
|
111
110
|
self,
|
112
|
-
|
111
|
+
product_create: ProductCreate,
|
113
112
|
_request_timeout: Union[
|
114
113
|
None,
|
115
114
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -121,13 +120,13 @@ class ProductsApi:
|
|
121
120
|
_content_type: Optional[StrictStr] = None,
|
122
121
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
123
122
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
124
|
-
) -> ApiResponse[
|
123
|
+
) -> ApiResponse[ProductRead]:
|
125
124
|
"""Create Product
|
126
125
|
|
127
126
|
Create a new product
|
128
127
|
|
129
|
-
:param
|
130
|
-
:type
|
128
|
+
:param product_create: (required)
|
129
|
+
:type product_create: ProductCreate
|
131
130
|
:param _request_timeout: timeout setting for this request. If one
|
132
131
|
number provided, it will be total request
|
133
132
|
timeout. It can also be a pair (tuple) of
|
@@ -151,7 +150,7 @@ class ProductsApi:
|
|
151
150
|
""" # noqa: E501
|
152
151
|
|
153
152
|
_param = self._create_product_serialize(
|
154
|
-
|
153
|
+
product_create=product_create,
|
155
154
|
_request_auth=_request_auth,
|
156
155
|
_content_type=_content_type,
|
157
156
|
_headers=_headers,
|
@@ -159,7 +158,7 @@ class ProductsApi:
|
|
159
158
|
)
|
160
159
|
|
161
160
|
_response_types_map: Dict[str, Optional[str]] = {
|
162
|
-
"
|
161
|
+
"201": "ProductRead",
|
163
162
|
"422": "HTTPValidationError",
|
164
163
|
}
|
165
164
|
response_data = await self.api_client.call_api(
|
@@ -174,7 +173,7 @@ class ProductsApi:
|
|
174
173
|
@validate_call
|
175
174
|
async def create_product_without_preload_content(
|
176
175
|
self,
|
177
|
-
|
176
|
+
product_create: ProductCreate,
|
178
177
|
_request_timeout: Union[
|
179
178
|
None,
|
180
179
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -191,8 +190,8 @@ class ProductsApi:
|
|
191
190
|
|
192
191
|
Create a new product
|
193
192
|
|
194
|
-
:param
|
195
|
-
:type
|
193
|
+
:param product_create: (required)
|
194
|
+
:type product_create: ProductCreate
|
196
195
|
:param _request_timeout: timeout setting for this request. If one
|
197
196
|
number provided, it will be total request
|
198
197
|
timeout. It can also be a pair (tuple) of
|
@@ -216,7 +215,7 @@ class ProductsApi:
|
|
216
215
|
""" # noqa: E501
|
217
216
|
|
218
217
|
_param = self._create_product_serialize(
|
219
|
-
|
218
|
+
product_create=product_create,
|
220
219
|
_request_auth=_request_auth,
|
221
220
|
_content_type=_content_type,
|
222
221
|
_headers=_headers,
|
@@ -224,7 +223,7 @@ class ProductsApi:
|
|
224
223
|
)
|
225
224
|
|
226
225
|
_response_types_map: Dict[str, Optional[str]] = {
|
227
|
-
"
|
226
|
+
"201": "ProductRead",
|
228
227
|
"422": "HTTPValidationError",
|
229
228
|
}
|
230
229
|
response_data = await self.api_client.call_api(
|
@@ -234,7 +233,7 @@ class ProductsApi:
|
|
234
233
|
|
235
234
|
def _create_product_serialize(
|
236
235
|
self,
|
237
|
-
|
236
|
+
product_create,
|
238
237
|
_request_auth,
|
239
238
|
_content_type,
|
240
239
|
_headers,
|
@@ -259,8 +258,8 @@ class ProductsApi:
|
|
259
258
|
# process the header parameters
|
260
259
|
# process the form parameters
|
261
260
|
# process the body parameter
|
262
|
-
if
|
263
|
-
_body_params =
|
261
|
+
if product_create is not None:
|
262
|
+
_body_params = product_create
|
264
263
|
|
265
264
|
# set the HTTP header `Accept`
|
266
265
|
if "Accept" not in _header_params:
|
@@ -322,7 +321,7 @@ class ProductsApi:
|
|
322
321
|
_content_type: Optional[StrictStr] = None,
|
323
322
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
324
323
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
325
|
-
) -> List[
|
324
|
+
) -> List[ProductRead]:
|
326
325
|
"""Get Products
|
327
326
|
|
328
327
|
Get all software products from Crypticorn
|
@@ -363,7 +362,7 @@ class ProductsApi:
|
|
363
362
|
)
|
364
363
|
|
365
364
|
_response_types_map: Dict[str, Optional[str]] = {
|
366
|
-
"200": "List[
|
365
|
+
"200": "List[ProductRead]",
|
367
366
|
"422": "HTTPValidationError",
|
368
367
|
}
|
369
368
|
response_data = await self.api_client.call_api(
|
@@ -401,7 +400,7 @@ class ProductsApi:
|
|
401
400
|
_content_type: Optional[StrictStr] = None,
|
402
401
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
403
402
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
404
|
-
) -> ApiResponse[List[
|
403
|
+
) -> ApiResponse[List[ProductRead]]:
|
405
404
|
"""Get Products
|
406
405
|
|
407
406
|
Get all software products from Crypticorn
|
@@ -442,7 +441,7 @@ class ProductsApi:
|
|
442
441
|
)
|
443
442
|
|
444
443
|
_response_types_map: Dict[str, Optional[str]] = {
|
445
|
-
"200": "List[
|
444
|
+
"200": "List[ProductRead]",
|
446
445
|
"422": "HTTPValidationError",
|
447
446
|
}
|
448
447
|
response_data = await self.api_client.call_api(
|
@@ -521,7 +520,7 @@ class ProductsApi:
|
|
521
520
|
)
|
522
521
|
|
523
522
|
_response_types_map: Dict[str, Optional[str]] = {
|
524
|
-
"200": "List[
|
523
|
+
"200": "List[ProductRead]",
|
525
524
|
"422": "HTTPValidationError",
|
526
525
|
}
|
527
526
|
response_data = await self.api_client.call_api(
|
@@ -594,7 +593,7 @@ class ProductsApi:
|
|
594
593
|
async def update_product(
|
595
594
|
self,
|
596
595
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
597
|
-
|
596
|
+
product_update: ProductUpdate,
|
598
597
|
_request_timeout: Union[
|
599
598
|
None,
|
600
599
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -606,15 +605,15 @@ class ProductsApi:
|
|
606
605
|
_content_type: Optional[StrictStr] = None,
|
607
606
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
608
607
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
609
|
-
) ->
|
608
|
+
) -> ProductRead:
|
610
609
|
"""Update Product
|
611
610
|
|
612
611
|
Update an existing product
|
613
612
|
|
614
613
|
:param id: The ID of the product to update (required)
|
615
614
|
:type id: str
|
616
|
-
:param
|
617
|
-
:type
|
615
|
+
:param product_update: (required)
|
616
|
+
:type product_update: ProductUpdate
|
618
617
|
:param _request_timeout: timeout setting for this request. If one
|
619
618
|
number provided, it will be total request
|
620
619
|
timeout. It can also be a pair (tuple) of
|
@@ -639,7 +638,7 @@ class ProductsApi:
|
|
639
638
|
|
640
639
|
_param = self._update_product_serialize(
|
641
640
|
id=id,
|
642
|
-
|
641
|
+
product_update=product_update,
|
643
642
|
_request_auth=_request_auth,
|
644
643
|
_content_type=_content_type,
|
645
644
|
_headers=_headers,
|
@@ -647,7 +646,7 @@ class ProductsApi:
|
|
647
646
|
)
|
648
647
|
|
649
648
|
_response_types_map: Dict[str, Optional[str]] = {
|
650
|
-
"200": "
|
649
|
+
"200": "ProductRead",
|
651
650
|
"422": "HTTPValidationError",
|
652
651
|
}
|
653
652
|
response_data = await self.api_client.call_api(
|
@@ -663,7 +662,7 @@ class ProductsApi:
|
|
663
662
|
async def update_product_with_http_info(
|
664
663
|
self,
|
665
664
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
666
|
-
|
665
|
+
product_update: ProductUpdate,
|
667
666
|
_request_timeout: Union[
|
668
667
|
None,
|
669
668
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -675,15 +674,15 @@ class ProductsApi:
|
|
675
674
|
_content_type: Optional[StrictStr] = None,
|
676
675
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
677
676
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
678
|
-
) -> ApiResponse[
|
677
|
+
) -> ApiResponse[ProductRead]:
|
679
678
|
"""Update Product
|
680
679
|
|
681
680
|
Update an existing product
|
682
681
|
|
683
682
|
:param id: The ID of the product to update (required)
|
684
683
|
:type id: str
|
685
|
-
:param
|
686
|
-
:type
|
684
|
+
:param product_update: (required)
|
685
|
+
:type product_update: ProductUpdate
|
687
686
|
:param _request_timeout: timeout setting for this request. If one
|
688
687
|
number provided, it will be total request
|
689
688
|
timeout. It can also be a pair (tuple) of
|
@@ -708,7 +707,7 @@ class ProductsApi:
|
|
708
707
|
|
709
708
|
_param = self._update_product_serialize(
|
710
709
|
id=id,
|
711
|
-
|
710
|
+
product_update=product_update,
|
712
711
|
_request_auth=_request_auth,
|
713
712
|
_content_type=_content_type,
|
714
713
|
_headers=_headers,
|
@@ -716,7 +715,7 @@ class ProductsApi:
|
|
716
715
|
)
|
717
716
|
|
718
717
|
_response_types_map: Dict[str, Optional[str]] = {
|
719
|
-
"200": "
|
718
|
+
"200": "ProductRead",
|
720
719
|
"422": "HTTPValidationError",
|
721
720
|
}
|
722
721
|
response_data = await self.api_client.call_api(
|
@@ -732,7 +731,7 @@ class ProductsApi:
|
|
732
731
|
async def update_product_without_preload_content(
|
733
732
|
self,
|
734
733
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
735
|
-
|
734
|
+
product_update: ProductUpdate,
|
736
735
|
_request_timeout: Union[
|
737
736
|
None,
|
738
737
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -751,8 +750,8 @@ class ProductsApi:
|
|
751
750
|
|
752
751
|
:param id: The ID of the product to update (required)
|
753
752
|
:type id: str
|
754
|
-
:param
|
755
|
-
:type
|
753
|
+
:param product_update: (required)
|
754
|
+
:type product_update: ProductUpdate
|
756
755
|
:param _request_timeout: timeout setting for this request. If one
|
757
756
|
number provided, it will be total request
|
758
757
|
timeout. It can also be a pair (tuple) of
|
@@ -777,7 +776,7 @@ class ProductsApi:
|
|
777
776
|
|
778
777
|
_param = self._update_product_serialize(
|
779
778
|
id=id,
|
780
|
-
|
779
|
+
product_update=product_update,
|
781
780
|
_request_auth=_request_auth,
|
782
781
|
_content_type=_content_type,
|
783
782
|
_headers=_headers,
|
@@ -785,7 +784,7 @@ class ProductsApi:
|
|
785
784
|
)
|
786
785
|
|
787
786
|
_response_types_map: Dict[str, Optional[str]] = {
|
788
|
-
"200": "
|
787
|
+
"200": "ProductRead",
|
789
788
|
"422": "HTTPValidationError",
|
790
789
|
}
|
791
790
|
response_data = await self.api_client.call_api(
|
@@ -796,7 +795,7 @@ class ProductsApi:
|
|
796
795
|
def _update_product_serialize(
|
797
796
|
self,
|
798
797
|
id,
|
799
|
-
|
798
|
+
product_update,
|
800
799
|
_request_auth,
|
801
800
|
_content_type,
|
802
801
|
_headers,
|
@@ -823,8 +822,8 @@ class ProductsApi:
|
|
823
822
|
# process the header parameters
|
824
823
|
# process the form parameters
|
825
824
|
# process the body parameter
|
826
|
-
if
|
827
|
-
_body_params =
|
825
|
+
if product_update is not None:
|
826
|
+
_body_params = product_update
|
828
827
|
|
829
828
|
# set the HTTP header `Accept`
|
830
829
|
if "Accept" not in _header_params:
|
@@ -17,7 +17,7 @@ import http.client as httplib
|
|
17
17
|
import logging
|
18
18
|
from logging import FileHandler
|
19
19
|
import sys
|
20
|
-
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
|
20
|
+
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
|
21
21
|
from typing_extensions import NotRequired, Self
|
22
22
|
|
23
23
|
import urllib3
|
@@ -168,6 +168,8 @@ class Configuration:
|
|
168
168
|
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
169
169
|
in PEM format.
|
170
170
|
:param retries: Number of retries for API requests.
|
171
|
+
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
172
|
+
in PEM (str) or DER (bytes) format.
|
171
173
|
|
172
174
|
:Example:
|
173
175
|
|
@@ -208,6 +210,7 @@ class Configuration:
|
|
208
210
|
ignore_operation_servers: bool = False,
|
209
211
|
ssl_ca_cert: Optional[str] = None,
|
210
212
|
retries: Optional[int] = None,
|
213
|
+
ca_cert_data: Optional[Union[str, bytes]] = None,
|
211
214
|
*,
|
212
215
|
debug: Optional[bool] = None,
|
213
216
|
) -> None:
|
@@ -284,6 +287,10 @@ class Configuration:
|
|
284
287
|
self.ssl_ca_cert = ssl_ca_cert
|
285
288
|
"""Set this to customize the certificate file to verify the peer.
|
286
289
|
"""
|
290
|
+
self.ca_cert_data = ca_cert_data
|
291
|
+
"""Set this to verify the peer using PEM (str) or DER (bytes)
|
292
|
+
certificate data.
|
293
|
+
"""
|
287
294
|
self.cert_file = None
|
288
295
|
"""client certificate file
|
289
296
|
"""
|
@@ -21,15 +21,14 @@ from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoice
|
|
21
21
|
from crypticorn.pay.client.models.now_fee_structure import NowFeeStructure
|
22
22
|
from crypticorn.pay.client.models.now_payment_status import NowPaymentStatus
|
23
23
|
from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
|
24
|
-
from crypticorn.pay.client.models.
|
25
|
-
PartialProductUpdateModel,
|
26
|
-
)
|
24
|
+
from crypticorn.pay.client.models.payment import Payment
|
27
25
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
28
|
-
from crypticorn.pay.client.models.
|
29
|
-
from crypticorn.pay.client.models.
|
26
|
+
from crypticorn.pay.client.models.product_create import ProductCreate
|
27
|
+
from crypticorn.pay.client.models.product_read import ProductRead
|
28
|
+
from crypticorn.pay.client.models.product_sub_read import ProductSubRead
|
29
|
+
from crypticorn.pay.client.models.product_update import ProductUpdate
|
30
30
|
from crypticorn.pay.client.models.scope import Scope
|
31
31
|
from crypticorn.pay.client.models.services import Services
|
32
|
-
from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
|
33
32
|
from crypticorn.pay.client.models.validation_error import ValidationError
|
34
33
|
from crypticorn.pay.client.models.validation_error_loc_inner import (
|
35
34
|
ValidationErrorLocInner,
|
@@ -18,67 +18,35 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List,
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
22
|
+
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
23
|
+
from crypticorn.pay.client.models.services import Services
|
22
24
|
from typing import Optional, Set
|
23
25
|
from typing_extensions import Self
|
24
26
|
|
25
27
|
|
26
28
|
class Payment(BaseModel):
|
27
29
|
"""
|
28
|
-
|
30
|
+
Combined payment model across all services
|
29
31
|
""" # noqa: E501
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
)
|
39
|
-
price_currency: StrictStr = Field(description="Original price currency")
|
40
|
-
pay_amount: Union[StrictFloat, StrictInt] = Field(description="Amount to pay")
|
41
|
-
actually_paid: Union[StrictFloat, StrictInt] = Field(
|
42
|
-
description="Actually paid amount"
|
43
|
-
)
|
44
|
-
pay_currency: StrictStr = Field(description="Payment currency")
|
45
|
-
order_id: Optional[StrictStr] = None
|
46
|
-
order_description: Optional[StrictStr] = None
|
47
|
-
purchase_id: Optional[StrictInt] = None
|
48
|
-
outcome_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
49
|
-
outcome_currency: Optional[StrictStr] = None
|
50
|
-
payout_hash: Optional[StrictStr] = None
|
51
|
-
payin_hash: Optional[StrictStr] = None
|
52
|
-
created_at: StrictStr = Field(description="Payment creation timestamp")
|
53
|
-
updated_at: StrictStr = Field(description="Payment last update timestamp")
|
54
|
-
type: StrictStr = Field(description="Type of payment (e.g., crypto2crypto)")
|
55
|
-
payment_extra_ids: Optional[List[StrictInt]] = None
|
56
|
-
parent_payment_id: Optional[StrictInt] = None
|
57
|
-
origin_type: Optional[StrictStr] = None
|
33
|
+
id: StrictStr = Field(description="Payment ID")
|
34
|
+
product_id: StrictStr = Field(description="Product ID")
|
35
|
+
var_date: StrictInt = Field(description="Payment date in seconds", alias="date")
|
36
|
+
amount: Union[StrictFloat, StrictInt] = Field(description="Payment amount")
|
37
|
+
currency: StrictStr = Field(description="Payment currency")
|
38
|
+
status: PaymentStatus
|
39
|
+
service: Services = Field(description="Payment service")
|
40
|
+
market: StrictStr = Field(description="Payment market")
|
58
41
|
__properties: ClassVar[List[str]] = [
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"actually_paid",
|
68
|
-
"pay_currency",
|
69
|
-
"order_id",
|
70
|
-
"order_description",
|
71
|
-
"purchase_id",
|
72
|
-
"outcome_amount",
|
73
|
-
"outcome_currency",
|
74
|
-
"payout_hash",
|
75
|
-
"payin_hash",
|
76
|
-
"created_at",
|
77
|
-
"updated_at",
|
78
|
-
"type",
|
79
|
-
"payment_extra_ids",
|
80
|
-
"parent_payment_id",
|
81
|
-
"origin_type",
|
42
|
+
"id",
|
43
|
+
"product_id",
|
44
|
+
"date",
|
45
|
+
"amount",
|
46
|
+
"currency",
|
47
|
+
"status",
|
48
|
+
"service",
|
49
|
+
"market",
|
82
50
|
]
|
83
51
|
|
84
52
|
model_config = ConfigDict(
|
@@ -118,78 +86,6 @@ class Payment(BaseModel):
|
|
118
86
|
exclude=excluded_fields,
|
119
87
|
exclude_none=True,
|
120
88
|
)
|
121
|
-
# set to None if invoice_id (nullable) is None
|
122
|
-
# and model_fields_set contains the field
|
123
|
-
if self.invoice_id is None and "invoice_id" in self.model_fields_set:
|
124
|
-
_dict["invoice_id"] = None
|
125
|
-
|
126
|
-
# set to None if payin_extra_id (nullable) is None
|
127
|
-
# and model_fields_set contains the field
|
128
|
-
if self.payin_extra_id is None and "payin_extra_id" in self.model_fields_set:
|
129
|
-
_dict["payin_extra_id"] = None
|
130
|
-
|
131
|
-
# set to None if order_id (nullable) is None
|
132
|
-
# and model_fields_set contains the field
|
133
|
-
if self.order_id is None and "order_id" in self.model_fields_set:
|
134
|
-
_dict["order_id"] = None
|
135
|
-
|
136
|
-
# set to None if order_description (nullable) is None
|
137
|
-
# and model_fields_set contains the field
|
138
|
-
if (
|
139
|
-
self.order_description is None
|
140
|
-
and "order_description" in self.model_fields_set
|
141
|
-
):
|
142
|
-
_dict["order_description"] = None
|
143
|
-
|
144
|
-
# set to None if purchase_id (nullable) is None
|
145
|
-
# and model_fields_set contains the field
|
146
|
-
if self.purchase_id is None and "purchase_id" in self.model_fields_set:
|
147
|
-
_dict["purchase_id"] = None
|
148
|
-
|
149
|
-
# set to None if outcome_amount (nullable) is None
|
150
|
-
# and model_fields_set contains the field
|
151
|
-
if self.outcome_amount is None and "outcome_amount" in self.model_fields_set:
|
152
|
-
_dict["outcome_amount"] = None
|
153
|
-
|
154
|
-
# set to None if outcome_currency (nullable) is None
|
155
|
-
# and model_fields_set contains the field
|
156
|
-
if (
|
157
|
-
self.outcome_currency is None
|
158
|
-
and "outcome_currency" in self.model_fields_set
|
159
|
-
):
|
160
|
-
_dict["outcome_currency"] = None
|
161
|
-
|
162
|
-
# set to None if payout_hash (nullable) is None
|
163
|
-
# and model_fields_set contains the field
|
164
|
-
if self.payout_hash is None and "payout_hash" in self.model_fields_set:
|
165
|
-
_dict["payout_hash"] = None
|
166
|
-
|
167
|
-
# set to None if payin_hash (nullable) is None
|
168
|
-
# and model_fields_set contains the field
|
169
|
-
if self.payin_hash is None and "payin_hash" in self.model_fields_set:
|
170
|
-
_dict["payin_hash"] = None
|
171
|
-
|
172
|
-
# set to None if payment_extra_ids (nullable) is None
|
173
|
-
# and model_fields_set contains the field
|
174
|
-
if (
|
175
|
-
self.payment_extra_ids is None
|
176
|
-
and "payment_extra_ids" in self.model_fields_set
|
177
|
-
):
|
178
|
-
_dict["payment_extra_ids"] = None
|
179
|
-
|
180
|
-
# set to None if parent_payment_id (nullable) is None
|
181
|
-
# and model_fields_set contains the field
|
182
|
-
if (
|
183
|
-
self.parent_payment_id is None
|
184
|
-
and "parent_payment_id" in self.model_fields_set
|
185
|
-
):
|
186
|
-
_dict["parent_payment_id"] = None
|
187
|
-
|
188
|
-
# set to None if origin_type (nullable) is None
|
189
|
-
# and model_fields_set contains the field
|
190
|
-
if self.origin_type is None and "origin_type" in self.model_fields_set:
|
191
|
-
_dict["origin_type"] = None
|
192
|
-
|
193
89
|
return _dict
|
194
90
|
|
195
91
|
@classmethod
|
@@ -203,29 +99,14 @@ class Payment(BaseModel):
|
|
203
99
|
|
204
100
|
_obj = cls.model_validate(
|
205
101
|
{
|
206
|
-
"
|
207
|
-
"
|
208
|
-
"
|
209
|
-
"
|
210
|
-
"
|
211
|
-
"
|
212
|
-
"
|
213
|
-
"
|
214
|
-
"actually_paid": obj.get("actually_paid"),
|
215
|
-
"pay_currency": obj.get("pay_currency"),
|
216
|
-
"order_id": obj.get("order_id"),
|
217
|
-
"order_description": obj.get("order_description"),
|
218
|
-
"purchase_id": obj.get("purchase_id"),
|
219
|
-
"outcome_amount": obj.get("outcome_amount"),
|
220
|
-
"outcome_currency": obj.get("outcome_currency"),
|
221
|
-
"payout_hash": obj.get("payout_hash"),
|
222
|
-
"payin_hash": obj.get("payin_hash"),
|
223
|
-
"created_at": obj.get("created_at"),
|
224
|
-
"updated_at": obj.get("updated_at"),
|
225
|
-
"type": obj.get("type"),
|
226
|
-
"payment_extra_ids": obj.get("payment_extra_ids"),
|
227
|
-
"parent_payment_id": obj.get("parent_payment_id"),
|
228
|
-
"origin_type": obj.get("origin_type"),
|
102
|
+
"id": obj.get("id"),
|
103
|
+
"product_id": obj.get("product_id"),
|
104
|
+
"date": obj.get("date"),
|
105
|
+
"amount": obj.get("amount"),
|
106
|
+
"currency": obj.get("currency"),
|
107
|
+
"status": obj.get("status"),
|
108
|
+
"service": obj.get("service"),
|
109
|
+
"market": obj.get("market"),
|
229
110
|
}
|
230
111
|
)
|
231
112
|
return _obj
|