crypticorn 2.4.5__py3-none-any.whl → 2.4.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.
- crypticorn/client.py +1 -1
- crypticorn/common/auth.py +7 -9
- crypticorn/common/errors.py +6 -1
- crypticorn/common/scopes.py +2 -1
- crypticorn/common/utils.py +15 -5
- crypticorn/klines/main.py +10 -5
- crypticorn/metrics/client/models/exchange_mapping.py +4 -2
- crypticorn/metrics/client/models/trading_status.py +1 -0
- crypticorn/metrics/main.py +5 -4
- crypticorn/pay/client/__init__.py +5 -4
- crypticorn/pay/client/api/payments_api.py +17 -17
- crypticorn/pay/client/api/products_api.py +49 -48
- crypticorn/pay/client/models/__init__.py +5 -4
- 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/trade/client/__init__.py +6 -8
- crypticorn/trade/client/api/__init__.py +1 -0
- crypticorn/trade/client/api/api_keys_api.py +273 -167
- crypticorn/trade/client/api/bots_api.py +226 -140
- crypticorn/trade/client/api/exchanges_api.py +51 -31
- crypticorn/trade/client/api/futures_trading_panel_api.py +272 -169
- crypticorn/trade/client/api/notifications_api.py +323 -200
- crypticorn/trade/client/api/orders_api.py +60 -40
- crypticorn/trade/client/api/status_api.py +49 -31
- crypticorn/trade/client/api/strategies_api.py +223 -137
- crypticorn/trade/client/api/trading_actions_api.py +170 -106
- crypticorn/trade/client/api_client.py +153 -111
- crypticorn/trade/client/api_response.py +3 -2
- crypticorn/trade/client/configuration.py +115 -128
- crypticorn/trade/client/exceptions.py +21 -25
- crypticorn/trade/client/models/__init__.py +6 -8
- crypticorn/trade/client/models/action_model.py +54 -108
- crypticorn/trade/client/models/api_error_identifier.py +72 -76
- crypticorn/trade/client/models/api_error_level.py +11 -9
- crypticorn/trade/client/models/api_error_type.py +11 -9
- crypticorn/trade/client/models/bot_model.py +36 -57
- crypticorn/trade/client/models/bot_status.py +11 -9
- crypticorn/trade/client/models/exchange.py +9 -7
- crypticorn/trade/client/models/exchange_key_model.py +34 -44
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +27 -43
- crypticorn/trade/client/models/futures_trading_action.py +50 -102
- crypticorn/trade/client/models/http_validation_error.py +15 -19
- crypticorn/trade/client/models/margin_mode.py +9 -7
- crypticorn/trade/client/models/market_type.py +9 -7
- crypticorn/trade/client/models/notification_model.py +32 -52
- crypticorn/trade/client/models/order_model.py +72 -112
- crypticorn/trade/client/models/order_status.py +12 -10
- crypticorn/trade/client/models/post_futures_action.py +16 -20
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -15
- crypticorn/trade/client/models/strategy_model_input.py +33 -61
- crypticorn/trade/client/models/strategy_model_output.py +33 -61
- crypticorn/trade/client/models/tpsl.py +25 -39
- crypticorn/trade/client/models/trading_action_type.py +11 -9
- crypticorn/trade/client/models/validation_error.py +18 -24
- crypticorn/trade/client/models/validation_error_loc_inner.py +16 -37
- crypticorn/trade/client/rest.py +38 -23
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/METADATA +13 -2
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/RECORD +65 -61
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/WHEEL +0 -0
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/top_level.txt +0 -0
@@ -17,10 +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
|
-
from crypticorn.pay.client.models.
|
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
|
24
25
|
|
25
26
|
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
26
27
|
from crypticorn.pay.client.api_response import ApiResponse
|
@@ -42,7 +43,7 @@ class ProductsApi:
|
|
42
43
|
@validate_call
|
43
44
|
async def create_product(
|
44
45
|
self,
|
45
|
-
|
46
|
+
product_create: ProductCreate,
|
46
47
|
_request_timeout: Union[
|
47
48
|
None,
|
48
49
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -54,13 +55,13 @@ class ProductsApi:
|
|
54
55
|
_content_type: Optional[StrictStr] = None,
|
55
56
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
56
57
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
57
|
-
) ->
|
58
|
+
) -> ProductRead:
|
58
59
|
"""Create Product
|
59
60
|
|
60
61
|
Create a new product
|
61
62
|
|
62
|
-
:param
|
63
|
-
:type
|
63
|
+
:param product_create: (required)
|
64
|
+
:type product_create: ProductCreate
|
64
65
|
:param _request_timeout: timeout setting for this request. If one
|
65
66
|
number provided, it will be total request
|
66
67
|
timeout. It can also be a pair (tuple) of
|
@@ -84,7 +85,7 @@ class ProductsApi:
|
|
84
85
|
""" # noqa: E501
|
85
86
|
|
86
87
|
_param = self._create_product_serialize(
|
87
|
-
|
88
|
+
product_create=product_create,
|
88
89
|
_request_auth=_request_auth,
|
89
90
|
_content_type=_content_type,
|
90
91
|
_headers=_headers,
|
@@ -92,7 +93,7 @@ class ProductsApi:
|
|
92
93
|
)
|
93
94
|
|
94
95
|
_response_types_map: Dict[str, Optional[str]] = {
|
95
|
-
"
|
96
|
+
"201": "ProductRead",
|
96
97
|
"422": "HTTPValidationError",
|
97
98
|
}
|
98
99
|
response_data = await self.api_client.call_api(
|
@@ -107,7 +108,7 @@ class ProductsApi:
|
|
107
108
|
@validate_call
|
108
109
|
async def create_product_with_http_info(
|
109
110
|
self,
|
110
|
-
|
111
|
+
product_create: ProductCreate,
|
111
112
|
_request_timeout: Union[
|
112
113
|
None,
|
113
114
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -119,13 +120,13 @@ class ProductsApi:
|
|
119
120
|
_content_type: Optional[StrictStr] = None,
|
120
121
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
121
122
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
122
|
-
) -> ApiResponse[
|
123
|
+
) -> ApiResponse[ProductRead]:
|
123
124
|
"""Create Product
|
124
125
|
|
125
126
|
Create a new product
|
126
127
|
|
127
|
-
:param
|
128
|
-
:type
|
128
|
+
:param product_create: (required)
|
129
|
+
:type product_create: ProductCreate
|
129
130
|
:param _request_timeout: timeout setting for this request. If one
|
130
131
|
number provided, it will be total request
|
131
132
|
timeout. It can also be a pair (tuple) of
|
@@ -149,7 +150,7 @@ class ProductsApi:
|
|
149
150
|
""" # noqa: E501
|
150
151
|
|
151
152
|
_param = self._create_product_serialize(
|
152
|
-
|
153
|
+
product_create=product_create,
|
153
154
|
_request_auth=_request_auth,
|
154
155
|
_content_type=_content_type,
|
155
156
|
_headers=_headers,
|
@@ -157,7 +158,7 @@ class ProductsApi:
|
|
157
158
|
)
|
158
159
|
|
159
160
|
_response_types_map: Dict[str, Optional[str]] = {
|
160
|
-
"
|
161
|
+
"201": "ProductRead",
|
161
162
|
"422": "HTTPValidationError",
|
162
163
|
}
|
163
164
|
response_data = await self.api_client.call_api(
|
@@ -172,7 +173,7 @@ class ProductsApi:
|
|
172
173
|
@validate_call
|
173
174
|
async def create_product_without_preload_content(
|
174
175
|
self,
|
175
|
-
|
176
|
+
product_create: ProductCreate,
|
176
177
|
_request_timeout: Union[
|
177
178
|
None,
|
178
179
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -189,8 +190,8 @@ class ProductsApi:
|
|
189
190
|
|
190
191
|
Create a new product
|
191
192
|
|
192
|
-
:param
|
193
|
-
:type
|
193
|
+
:param product_create: (required)
|
194
|
+
:type product_create: ProductCreate
|
194
195
|
:param _request_timeout: timeout setting for this request. If one
|
195
196
|
number provided, it will be total request
|
196
197
|
timeout. It can also be a pair (tuple) of
|
@@ -214,7 +215,7 @@ class ProductsApi:
|
|
214
215
|
""" # noqa: E501
|
215
216
|
|
216
217
|
_param = self._create_product_serialize(
|
217
|
-
|
218
|
+
product_create=product_create,
|
218
219
|
_request_auth=_request_auth,
|
219
220
|
_content_type=_content_type,
|
220
221
|
_headers=_headers,
|
@@ -222,7 +223,7 @@ class ProductsApi:
|
|
222
223
|
)
|
223
224
|
|
224
225
|
_response_types_map: Dict[str, Optional[str]] = {
|
225
|
-
"
|
226
|
+
"201": "ProductRead",
|
226
227
|
"422": "HTTPValidationError",
|
227
228
|
}
|
228
229
|
response_data = await self.api_client.call_api(
|
@@ -232,7 +233,7 @@ class ProductsApi:
|
|
232
233
|
|
233
234
|
def _create_product_serialize(
|
234
235
|
self,
|
235
|
-
|
236
|
+
product_create,
|
236
237
|
_request_auth,
|
237
238
|
_content_type,
|
238
239
|
_headers,
|
@@ -257,8 +258,8 @@ class ProductsApi:
|
|
257
258
|
# process the header parameters
|
258
259
|
# process the form parameters
|
259
260
|
# process the body parameter
|
260
|
-
if
|
261
|
-
_body_params =
|
261
|
+
if product_create is not None:
|
262
|
+
_body_params = product_create
|
262
263
|
|
263
264
|
# set the HTTP header `Accept`
|
264
265
|
if "Accept" not in _header_params:
|
@@ -320,7 +321,7 @@ class ProductsApi:
|
|
320
321
|
_content_type: Optional[StrictStr] = None,
|
321
322
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
322
323
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
323
|
-
) -> List[
|
324
|
+
) -> List[ProductRead]:
|
324
325
|
"""Get Products
|
325
326
|
|
326
327
|
Get all software products from Crypticorn
|
@@ -361,7 +362,7 @@ class ProductsApi:
|
|
361
362
|
)
|
362
363
|
|
363
364
|
_response_types_map: Dict[str, Optional[str]] = {
|
364
|
-
"200": "List[
|
365
|
+
"200": "List[ProductRead]",
|
365
366
|
"422": "HTTPValidationError",
|
366
367
|
}
|
367
368
|
response_data = await self.api_client.call_api(
|
@@ -399,7 +400,7 @@ class ProductsApi:
|
|
399
400
|
_content_type: Optional[StrictStr] = None,
|
400
401
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
401
402
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
402
|
-
) -> ApiResponse[List[
|
403
|
+
) -> ApiResponse[List[ProductRead]]:
|
403
404
|
"""Get Products
|
404
405
|
|
405
406
|
Get all software products from Crypticorn
|
@@ -440,7 +441,7 @@ class ProductsApi:
|
|
440
441
|
)
|
441
442
|
|
442
443
|
_response_types_map: Dict[str, Optional[str]] = {
|
443
|
-
"200": "List[
|
444
|
+
"200": "List[ProductRead]",
|
444
445
|
"422": "HTTPValidationError",
|
445
446
|
}
|
446
447
|
response_data = await self.api_client.call_api(
|
@@ -519,7 +520,7 @@ class ProductsApi:
|
|
519
520
|
)
|
520
521
|
|
521
522
|
_response_types_map: Dict[str, Optional[str]] = {
|
522
|
-
"200": "List[
|
523
|
+
"200": "List[ProductRead]",
|
523
524
|
"422": "HTTPValidationError",
|
524
525
|
}
|
525
526
|
response_data = await self.api_client.call_api(
|
@@ -592,7 +593,7 @@ class ProductsApi:
|
|
592
593
|
async def update_product(
|
593
594
|
self,
|
594
595
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
595
|
-
|
596
|
+
product_update: ProductUpdate,
|
596
597
|
_request_timeout: Union[
|
597
598
|
None,
|
598
599
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -604,15 +605,15 @@ class ProductsApi:
|
|
604
605
|
_content_type: Optional[StrictStr] = None,
|
605
606
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
606
607
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
607
|
-
) ->
|
608
|
+
) -> ProductRead:
|
608
609
|
"""Update Product
|
609
610
|
|
610
611
|
Update an existing product
|
611
612
|
|
612
613
|
:param id: The ID of the product to update (required)
|
613
614
|
:type id: str
|
614
|
-
:param
|
615
|
-
:type
|
615
|
+
:param product_update: (required)
|
616
|
+
:type product_update: ProductUpdate
|
616
617
|
:param _request_timeout: timeout setting for this request. If one
|
617
618
|
number provided, it will be total request
|
618
619
|
timeout. It can also be a pair (tuple) of
|
@@ -637,7 +638,7 @@ class ProductsApi:
|
|
637
638
|
|
638
639
|
_param = self._update_product_serialize(
|
639
640
|
id=id,
|
640
|
-
|
641
|
+
product_update=product_update,
|
641
642
|
_request_auth=_request_auth,
|
642
643
|
_content_type=_content_type,
|
643
644
|
_headers=_headers,
|
@@ -645,7 +646,7 @@ class ProductsApi:
|
|
645
646
|
)
|
646
647
|
|
647
648
|
_response_types_map: Dict[str, Optional[str]] = {
|
648
|
-
"200": "
|
649
|
+
"200": "ProductRead",
|
649
650
|
"422": "HTTPValidationError",
|
650
651
|
}
|
651
652
|
response_data = await self.api_client.call_api(
|
@@ -661,7 +662,7 @@ class ProductsApi:
|
|
661
662
|
async def update_product_with_http_info(
|
662
663
|
self,
|
663
664
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
664
|
-
|
665
|
+
product_update: ProductUpdate,
|
665
666
|
_request_timeout: Union[
|
666
667
|
None,
|
667
668
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -673,15 +674,15 @@ class ProductsApi:
|
|
673
674
|
_content_type: Optional[StrictStr] = None,
|
674
675
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
675
676
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
676
|
-
) -> ApiResponse[
|
677
|
+
) -> ApiResponse[ProductRead]:
|
677
678
|
"""Update Product
|
678
679
|
|
679
680
|
Update an existing product
|
680
681
|
|
681
682
|
:param id: The ID of the product to update (required)
|
682
683
|
:type id: str
|
683
|
-
:param
|
684
|
-
:type
|
684
|
+
:param product_update: (required)
|
685
|
+
:type product_update: ProductUpdate
|
685
686
|
:param _request_timeout: timeout setting for this request. If one
|
686
687
|
number provided, it will be total request
|
687
688
|
timeout. It can also be a pair (tuple) of
|
@@ -706,7 +707,7 @@ class ProductsApi:
|
|
706
707
|
|
707
708
|
_param = self._update_product_serialize(
|
708
709
|
id=id,
|
709
|
-
|
710
|
+
product_update=product_update,
|
710
711
|
_request_auth=_request_auth,
|
711
712
|
_content_type=_content_type,
|
712
713
|
_headers=_headers,
|
@@ -714,7 +715,7 @@ class ProductsApi:
|
|
714
715
|
)
|
715
716
|
|
716
717
|
_response_types_map: Dict[str, Optional[str]] = {
|
717
|
-
"200": "
|
718
|
+
"200": "ProductRead",
|
718
719
|
"422": "HTTPValidationError",
|
719
720
|
}
|
720
721
|
response_data = await self.api_client.call_api(
|
@@ -730,7 +731,7 @@ class ProductsApi:
|
|
730
731
|
async def update_product_without_preload_content(
|
731
732
|
self,
|
732
733
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
733
|
-
|
734
|
+
product_update: ProductUpdate,
|
734
735
|
_request_timeout: Union[
|
735
736
|
None,
|
736
737
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -749,8 +750,8 @@ class ProductsApi:
|
|
749
750
|
|
750
751
|
:param id: The ID of the product to update (required)
|
751
752
|
:type id: str
|
752
|
-
:param
|
753
|
-
:type
|
753
|
+
:param product_update: (required)
|
754
|
+
:type product_update: ProductUpdate
|
754
755
|
:param _request_timeout: timeout setting for this request. If one
|
755
756
|
number provided, it will be total request
|
756
757
|
timeout. It can also be a pair (tuple) of
|
@@ -775,7 +776,7 @@ class ProductsApi:
|
|
775
776
|
|
776
777
|
_param = self._update_product_serialize(
|
777
778
|
id=id,
|
778
|
-
|
779
|
+
product_update=product_update,
|
779
780
|
_request_auth=_request_auth,
|
780
781
|
_content_type=_content_type,
|
781
782
|
_headers=_headers,
|
@@ -783,7 +784,7 @@ class ProductsApi:
|
|
783
784
|
)
|
784
785
|
|
785
786
|
_response_types_map: Dict[str, Optional[str]] = {
|
786
|
-
"200": "
|
787
|
+
"200": "ProductRead",
|
787
788
|
"422": "HTTPValidationError",
|
788
789
|
}
|
789
790
|
response_data = await self.api_client.call_api(
|
@@ -794,7 +795,7 @@ class ProductsApi:
|
|
794
795
|
def _update_product_serialize(
|
795
796
|
self,
|
796
797
|
id,
|
797
|
-
|
798
|
+
product_update,
|
798
799
|
_request_auth,
|
799
800
|
_content_type,
|
800
801
|
_headers,
|
@@ -821,8 +822,8 @@ class ProductsApi:
|
|
821
822
|
# process the header parameters
|
822
823
|
# process the form parameters
|
823
824
|
# process the body parameter
|
824
|
-
if
|
825
|
-
_body_params =
|
825
|
+
if product_update is not None:
|
826
|
+
_body_params = product_update
|
826
827
|
|
827
828
|
# set the HTTP header `Accept`
|
828
829
|
if "Accept" not in _header_params:
|
@@ -21,13 +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.payment import Payment
|
24
25
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
25
|
-
from crypticorn.pay.client.models.
|
26
|
-
from crypticorn.pay.client.models.
|
27
|
-
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
|
28
30
|
from crypticorn.pay.client.models.scope import Scope
|
29
31
|
from crypticorn.pay.client.models.services import Services
|
30
|
-
from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
|
31
32
|
from crypticorn.pay.client.models.validation_error import ValidationError
|
32
33
|
from crypticorn.pay.client.models.validation_error_loc_inner import (
|
33
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
|