crypticorn 2.5.1__py3-none-any.whl → 2.5.3__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/cli/init.py +3 -0
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/enums.py +3 -1
- crypticorn/common/errors.py +42 -21
- crypticorn/common/mixins.py +20 -0
- crypticorn/common/scopes.py +4 -20
- crypticorn/common/status_router.py +44 -0
- crypticorn/common/utils.py +13 -14
- crypticorn/hive/client/__init__.py +1 -5
- crypticorn/hive/client/api/data_api.py +1 -33
- crypticorn/hive/client/api/models_api.py +8 -104
- crypticorn/hive/client/api/status_api.py +481 -9
- crypticorn/hive/client/configuration.py +12 -4
- crypticorn/hive/client/models/__init__.py +1 -5
- crypticorn/hive/client/models/coins.py +0 -1
- crypticorn/hive/client/models/data_version.py +0 -1
- crypticorn/{metrics/client/models/error_response.py → hive/client/models/exception_detail.py} +26 -21
- crypticorn/hive/client/rest.py +4 -1
- crypticorn/klines/client/__init__.py +0 -5
- crypticorn/klines/client/api/change_in_timeframe_api.py +8 -9
- crypticorn/klines/client/api/ohlcv_data_api.py +7 -8
- crypticorn/klines/client/api/status_api.py +481 -6
- crypticorn/klines/client/api/symbols_api.py +7 -8
- crypticorn/klines/client/api/udf_api.py +0 -227
- crypticorn/klines/client/models/__init__.py +0 -5
- crypticorn/klines/client/models/exception_detail.py +3 -6
- crypticorn/klines/client/models/search_symbol.py +4 -3
- crypticorn/klines/client/models/udf_config.py +1 -2
- crypticorn/metrics/client/__init__.py +1 -6
- crypticorn/metrics/client/api/exchanges_api.py +29 -31
- crypticorn/metrics/client/api/indicators_api.py +15 -16
- crypticorn/metrics/client/api/logs_api.py +1 -1
- crypticorn/metrics/client/api/marketcap_api.py +15 -16
- crypticorn/metrics/client/api/markets_api.py +15 -16
- crypticorn/metrics/client/api/status_api.py +477 -2
- crypticorn/metrics/client/api/tokens_api.py +1 -1
- crypticorn/metrics/client/api_client.py +1 -1
- crypticorn/metrics/client/configuration.py +3 -5
- crypticorn/metrics/client/exceptions.py +1 -1
- crypticorn/metrics/client/models/__init__.py +1 -6
- crypticorn/metrics/client/models/exception_detail.py +4 -7
- crypticorn/metrics/client/models/severity.py +1 -1
- crypticorn/metrics/client/models/time_interval.py +1 -1
- crypticorn/metrics/client/models/trading_status.py +1 -1
- crypticorn/metrics/client/rest.py +1 -1
- crypticorn/pay/client/__init__.py +3 -8
- crypticorn/pay/client/api/now_payments_api.py +14 -17
- crypticorn/pay/client/api/payments_api.py +2 -11
- crypticorn/pay/client/api/products_api.py +2 -11
- crypticorn/pay/client/api/status_api.py +483 -8
- crypticorn/pay/client/api_client.py +2 -2
- crypticorn/pay/client/configuration.py +3 -3
- crypticorn/pay/client/exceptions.py +2 -2
- crypticorn/pay/client/models/__init__.py +3 -8
- crypticorn/{metrics/client/models/base_response_dict.py → pay/client/models/exception_detail.py} +28 -20
- crypticorn/pay/client/models/now_create_invoice_req.py +2 -2
- crypticorn/pay/client/models/now_create_invoice_res.py +2 -2
- crypticorn/pay/client/models/payment.py +2 -2
- crypticorn/pay/client/models/payment_status.py +2 -2
- crypticorn/pay/client/models/product_create.py +2 -2
- crypticorn/pay/client/models/product_read.py +2 -2
- crypticorn/pay/client/models/product_sub_read.py +2 -2
- crypticorn/pay/client/models/product_update.py +2 -2
- crypticorn/pay/client/models/scope.py +2 -2
- crypticorn/pay/client/models/services.py +2 -2
- crypticorn/pay/client/rest.py +2 -2
- crypticorn/trade/client/__init__.py +4 -9
- crypticorn/trade/client/api/api_keys_api.py +5 -20
- crypticorn/trade/client/api/bots_api.py +7 -19
- crypticorn/trade/client/api/exchanges_api.py +8 -8
- crypticorn/trade/client/api/futures_trading_panel_api.py +10 -22
- crypticorn/trade/client/api/notifications_api.py +10 -25
- crypticorn/trade/client/api/orders_api.py +2 -5
- crypticorn/trade/client/api/status_api.py +483 -8
- crypticorn/trade/client/api/strategies_api.py +5 -17
- crypticorn/trade/client/api/trading_actions_api.py +18 -26
- crypticorn/trade/client/api_client.py +2 -2
- crypticorn/trade/client/configuration.py +5 -5
- crypticorn/trade/client/exceptions.py +2 -2
- crypticorn/trade/client/models/__init__.py +4 -9
- crypticorn/trade/client/models/action_model.py +3 -4
- crypticorn/trade/client/models/bot_model.py +2 -2
- crypticorn/trade/client/models/bot_status.py +2 -2
- crypticorn/{klines/client/models/error_response.py → trade/client/models/exception_detail.py} +26 -21
- crypticorn/trade/client/models/exchange_key_model.py +4 -13
- crypticorn/trade/client/models/execution_ids.py +2 -2
- crypticorn/trade/client/models/futures_balance.py +2 -2
- crypticorn/trade/client/models/futures_trading_action.py +3 -4
- crypticorn/trade/client/models/margin_mode.py +2 -2
- crypticorn/trade/client/models/notification_model.py +2 -2
- crypticorn/trade/client/models/order_model.py +6 -16
- crypticorn/trade/client/models/order_status.py +2 -2
- crypticorn/trade/client/models/post_futures_action.py +2 -2
- crypticorn/trade/client/models/spot_trading_action.py +3 -4
- crypticorn/trade/client/models/strategy_exchange_info.py +4 -5
- crypticorn/trade/client/models/strategy_model_input.py +3 -4
- crypticorn/trade/client/models/strategy_model_output.py +3 -4
- crypticorn/trade/client/models/tpsl.py +5 -3
- crypticorn/trade/client/models/trading_action_type.py +2 -2
- crypticorn/trade/client/rest.py +2 -2
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/METADATA +1 -1
- crypticorn-2.5.3.dist-info/RECORD +223 -0
- crypticorn/hive/client/models/http_validation_error.py +0 -99
- crypticorn/hive/client/models/validation_error.py +0 -105
- crypticorn/hive/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/klines/client/api/health_check_api.py +0 -265
- crypticorn/klines/client/models/api_error_identifier.py +0 -108
- crypticorn/klines/client/models/api_error_level.py +0 -37
- crypticorn/klines/client/models/api_error_type.py +0 -37
- crypticorn/klines/client/models/base_response_health_check_response.py +0 -114
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +0 -123
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -118
- crypticorn/klines/client/models/base_response_list_str.py +0 -106
- crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -114
- crypticorn/klines/client/models/change_in_timeframe_response.py +0 -86
- crypticorn/klines/client/models/exchange.py +0 -91
- crypticorn/klines/client/models/funding_rate_response.py +0 -92
- crypticorn/klines/client/models/health_check_response.py +0 -91
- crypticorn/klines/client/models/history_error_response.py +0 -89
- crypticorn/klines/client/models/history_no_data_response.py +0 -99
- crypticorn/klines/client/models/history_success_response.py +0 -99
- crypticorn/klines/client/models/http_validation_error.py +0 -99
- crypticorn/klines/client/models/internal_exchange.py +0 -39
- crypticorn/klines/client/models/market.py +0 -35
- crypticorn/klines/client/models/market_type.py +0 -35
- crypticorn/klines/client/models/ohlcv_response.py +0 -105
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -198
- crypticorn/klines/client/models/response_get_udf_history.py +0 -198
- crypticorn/klines/client/models/search_symbol_response.py +0 -104
- crypticorn/klines/client/models/symbol_group_response.py +0 -83
- crypticorn/klines/client/models/symbol_info_response.py +0 -131
- crypticorn/klines/client/models/udf_config_response.py +0 -160
- crypticorn/klines/client/models/validation_error.py +0 -105
- crypticorn/klines/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/metrics/client/api/health_check_api.py +0 -265
- crypticorn/metrics/client/models/api_error_identifier.py +0 -108
- crypticorn/metrics/client/models/api_error_level.py +0 -37
- crypticorn/metrics/client/models/api_error_type.py +0 -37
- crypticorn/metrics/client/models/base_response_health_check_response.py +0 -114
- crypticorn/metrics/client/models/base_response_list_dict.py +0 -106
- crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +0 -118
- crypticorn/metrics/client/models/base_response_list_str.py +0 -106
- crypticorn/metrics/client/models/exchange_mapping.py +0 -134
- crypticorn/metrics/client/models/health_check_response.py +0 -91
- crypticorn/metrics/client/models/http_validation_error.py +0 -99
- crypticorn/metrics/client/models/internal_exchange.py +0 -39
- crypticorn/metrics/client/models/market.py +0 -35
- crypticorn/metrics/client/models/market_type.py +0 -35
- crypticorn/metrics/client/models/validation_error.py +0 -105
- crypticorn/metrics/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/pay/client/models/api_status_res.py +0 -83
- crypticorn/pay/client/models/body_create_now_invoice.py +0 -98
- crypticorn/pay/client/models/body_create_product.py +0 -98
- crypticorn/pay/client/models/body_get_products.py +0 -87
- crypticorn/pay/client/models/body_handle_now_webhook.py +0 -98
- crypticorn/pay/client/models/body_update_product.py +0 -98
- crypticorn/pay/client/models/combined_payment_history.py +0 -101
- crypticorn/pay/client/models/create_invoice_req.py +0 -188
- crypticorn/pay/client/models/create_invoice_res.py +0 -188
- crypticorn/pay/client/models/currency.py +0 -165
- crypticorn/pay/client/models/estimate_price_req.py +0 -91
- crypticorn/pay/client/models/estimate_price_res.py +0 -102
- crypticorn/pay/client/models/get_currencies_res.py +0 -99
- crypticorn/pay/client/models/get_payment_status_res.py +0 -222
- crypticorn/pay/client/models/get_payments_list_res.py +0 -109
- crypticorn/pay/client/models/http_validation_error.py +0 -99
- crypticorn/pay/client/models/min_amount_req.py +0 -124
- crypticorn/pay/client/models/min_amount_res.py +0 -105
- crypticorn/pay/client/models/now_api_status_res.py +0 -83
- crypticorn/pay/client/models/now_fee_structure.py +0 -104
- crypticorn/pay/client/models/now_payment_model.py +0 -124
- crypticorn/pay/client/models/now_payment_status.py +0 -42
- crypticorn/pay/client/models/now_webhook_payload.py +0 -181
- crypticorn/pay/client/models/partial_product_update_model.py +0 -150
- crypticorn/pay/client/models/product.py +0 -87
- crypticorn/pay/client/models/product_model.py +0 -128
- crypticorn/pay/client/models/product_subs_model.py +0 -108
- crypticorn/pay/client/models/product_update_model.py +0 -150
- crypticorn/pay/client/models/unified_payment_model.py +0 -112
- crypticorn/pay/client/models/validation_error.py +0 -105
- crypticorn/pay/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/trade/client/models/api_key_model.py +0 -156
- crypticorn/trade/client/models/exchange.py +0 -35
- crypticorn/trade/client/models/http_validation_error.py +0 -99
- crypticorn/trade/client/models/market_type.py +0 -35
- crypticorn/trade/client/models/validation_error.py +0 -105
- crypticorn/trade/client/models/validation_error_loc_inner.py +0 -159
- crypticorn-2.5.1.dist-info/RECORD +0 -307
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/WHEEL +0 -0
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/top_level.txt +0 -0
@@ -1,222 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class GetPaymentStatusRes(BaseModel):
|
27
|
-
"""
|
28
|
-
Response model for the payment status.
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
payment_id: StrictInt = Field(description="Unique payment identifier")
|
32
|
-
invoice_id: Optional[StrictInt] = None
|
33
|
-
payment_status: StrictStr = Field(
|
34
|
-
description="Current payment status (waiting, confirming, confirmed, sending, partially_paid, finished, failed, refunded, expired)"
|
35
|
-
)
|
36
|
-
pay_address: StrictStr = Field(description="Payment destination address")
|
37
|
-
payin_extra_id: Optional[StrictStr] = None
|
38
|
-
price_amount: Union[StrictFloat, StrictInt] = Field(
|
39
|
-
description="Original price amount"
|
40
|
-
)
|
41
|
-
price_currency: StrictStr = Field(description="Original price currency")
|
42
|
-
pay_amount: Union[StrictFloat, StrictInt] = Field(description="Amount to pay")
|
43
|
-
actually_paid: Union[StrictFloat, StrictInt] = Field(
|
44
|
-
description="Actually paid amount"
|
45
|
-
)
|
46
|
-
pay_currency: StrictStr = Field(description="Payment currency")
|
47
|
-
order_id: Optional[StrictStr] = None
|
48
|
-
order_description: Optional[StrictStr] = None
|
49
|
-
purchase_id: Optional[StrictInt] = None
|
50
|
-
outcome_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
51
|
-
outcome_currency: Optional[StrictStr] = None
|
52
|
-
payout_hash: Optional[StrictStr] = None
|
53
|
-
payin_hash: Optional[StrictStr] = None
|
54
|
-
created_at: StrictStr = Field(description="Payment creation timestamp")
|
55
|
-
updated_at: StrictStr = Field(description="Payment last update timestamp")
|
56
|
-
burning_percent: Optional[StrictStr] = None
|
57
|
-
type: StrictStr = Field(description="Type of payment (e.g., crypto2crypto)")
|
58
|
-
payment_extra_ids: Optional[List[StrictInt]] = None
|
59
|
-
__properties: ClassVar[List[str]] = [
|
60
|
-
"payment_id",
|
61
|
-
"invoice_id",
|
62
|
-
"payment_status",
|
63
|
-
"pay_address",
|
64
|
-
"payin_extra_id",
|
65
|
-
"price_amount",
|
66
|
-
"price_currency",
|
67
|
-
"pay_amount",
|
68
|
-
"actually_paid",
|
69
|
-
"pay_currency",
|
70
|
-
"order_id",
|
71
|
-
"order_description",
|
72
|
-
"purchase_id",
|
73
|
-
"outcome_amount",
|
74
|
-
"outcome_currency",
|
75
|
-
"payout_hash",
|
76
|
-
"payin_hash",
|
77
|
-
"created_at",
|
78
|
-
"updated_at",
|
79
|
-
"burning_percent",
|
80
|
-
"type",
|
81
|
-
"payment_extra_ids",
|
82
|
-
]
|
83
|
-
|
84
|
-
model_config = ConfigDict(
|
85
|
-
populate_by_name=True,
|
86
|
-
validate_assignment=True,
|
87
|
-
protected_namespaces=(),
|
88
|
-
)
|
89
|
-
|
90
|
-
def to_str(self) -> str:
|
91
|
-
"""Returns the string representation of the model using alias"""
|
92
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
93
|
-
|
94
|
-
def to_json(self) -> str:
|
95
|
-
"""Returns the JSON representation of the model using alias"""
|
96
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
97
|
-
return json.dumps(self.to_dict())
|
98
|
-
|
99
|
-
@classmethod
|
100
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
101
|
-
"""Create an instance of GetPaymentStatusRes from a JSON string"""
|
102
|
-
return cls.from_dict(json.loads(json_str))
|
103
|
-
|
104
|
-
def to_dict(self) -> Dict[str, Any]:
|
105
|
-
"""Return the dictionary representation of the model using alias.
|
106
|
-
|
107
|
-
This has the following differences from calling pydantic's
|
108
|
-
`self.model_dump(by_alias=True)`:
|
109
|
-
|
110
|
-
* `None` is only added to the output dict for nullable fields that
|
111
|
-
were set at model initialization. Other fields with value `None`
|
112
|
-
are ignored.
|
113
|
-
"""
|
114
|
-
excluded_fields: Set[str] = set([])
|
115
|
-
|
116
|
-
_dict = self.model_dump(
|
117
|
-
by_alias=True,
|
118
|
-
exclude=excluded_fields,
|
119
|
-
exclude_none=True,
|
120
|
-
)
|
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 burning_percent (nullable) is None
|
173
|
-
# and model_fields_set contains the field
|
174
|
-
if self.burning_percent is None and "burning_percent" in self.model_fields_set:
|
175
|
-
_dict["burning_percent"] = None
|
176
|
-
|
177
|
-
# set to None if payment_extra_ids (nullable) is None
|
178
|
-
# and model_fields_set contains the field
|
179
|
-
if (
|
180
|
-
self.payment_extra_ids is None
|
181
|
-
and "payment_extra_ids" in self.model_fields_set
|
182
|
-
):
|
183
|
-
_dict["payment_extra_ids"] = None
|
184
|
-
|
185
|
-
return _dict
|
186
|
-
|
187
|
-
@classmethod
|
188
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
189
|
-
"""Create an instance of GetPaymentStatusRes from a dict"""
|
190
|
-
if obj is None:
|
191
|
-
return None
|
192
|
-
|
193
|
-
if not isinstance(obj, dict):
|
194
|
-
return cls.model_validate(obj)
|
195
|
-
|
196
|
-
_obj = cls.model_validate(
|
197
|
-
{
|
198
|
-
"payment_id": obj.get("payment_id"),
|
199
|
-
"invoice_id": obj.get("invoice_id"),
|
200
|
-
"payment_status": obj.get("payment_status"),
|
201
|
-
"pay_address": obj.get("pay_address"),
|
202
|
-
"payin_extra_id": obj.get("payin_extra_id"),
|
203
|
-
"price_amount": obj.get("price_amount"),
|
204
|
-
"price_currency": obj.get("price_currency"),
|
205
|
-
"pay_amount": obj.get("pay_amount"),
|
206
|
-
"actually_paid": obj.get("actually_paid"),
|
207
|
-
"pay_currency": obj.get("pay_currency"),
|
208
|
-
"order_id": obj.get("order_id"),
|
209
|
-
"order_description": obj.get("order_description"),
|
210
|
-
"purchase_id": obj.get("purchase_id"),
|
211
|
-
"outcome_amount": obj.get("outcome_amount"),
|
212
|
-
"outcome_currency": obj.get("outcome_currency"),
|
213
|
-
"payout_hash": obj.get("payout_hash"),
|
214
|
-
"payin_hash": obj.get("payin_hash"),
|
215
|
-
"created_at": obj.get("created_at"),
|
216
|
-
"updated_at": obj.get("updated_at"),
|
217
|
-
"burning_percent": obj.get("burning_percent"),
|
218
|
-
"type": obj.get("type"),
|
219
|
-
"payment_extra_ids": obj.get("payment_extra_ids"),
|
220
|
-
}
|
221
|
-
)
|
222
|
-
return _obj
|
@@ -1,109 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
22
|
-
from crypticorn.pay.client.models.payment import Payment
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
|
27
|
-
class GetPaymentsListRes(BaseModel):
|
28
|
-
"""
|
29
|
-
Response model for the list of payments. https://documenter.getpostman.com/view/7907941/2s93JusNJt#c38d2410-1523-4313-8764-0043ba1cb24f
|
30
|
-
""" # noqa: E501
|
31
|
-
|
32
|
-
data: List[Payment] = Field(description="List of payments")
|
33
|
-
limit: StrictInt = Field(description="Number of records per page")
|
34
|
-
page: StrictInt = Field(description="Current page number")
|
35
|
-
pages_count: StrictInt = Field(
|
36
|
-
description="Total number of pages", alias="pagesCount"
|
37
|
-
)
|
38
|
-
total: StrictInt = Field(description="Total number of records")
|
39
|
-
__properties: ClassVar[List[str]] = ["data", "limit", "page", "pagesCount", "total"]
|
40
|
-
|
41
|
-
model_config = ConfigDict(
|
42
|
-
populate_by_name=True,
|
43
|
-
validate_assignment=True,
|
44
|
-
protected_namespaces=(),
|
45
|
-
)
|
46
|
-
|
47
|
-
def to_str(self) -> str:
|
48
|
-
"""Returns the string representation of the model using alias"""
|
49
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
-
|
51
|
-
def to_json(self) -> str:
|
52
|
-
"""Returns the JSON representation of the model using alias"""
|
53
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
-
return json.dumps(self.to_dict())
|
55
|
-
|
56
|
-
@classmethod
|
57
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
-
"""Create an instance of GetPaymentsListRes from a JSON string"""
|
59
|
-
return cls.from_dict(json.loads(json_str))
|
60
|
-
|
61
|
-
def to_dict(self) -> Dict[str, Any]:
|
62
|
-
"""Return the dictionary representation of the model using alias.
|
63
|
-
|
64
|
-
This has the following differences from calling pydantic's
|
65
|
-
`self.model_dump(by_alias=True)`:
|
66
|
-
|
67
|
-
* `None` is only added to the output dict for nullable fields that
|
68
|
-
were set at model initialization. Other fields with value `None`
|
69
|
-
are ignored.
|
70
|
-
"""
|
71
|
-
excluded_fields: Set[str] = set([])
|
72
|
-
|
73
|
-
_dict = self.model_dump(
|
74
|
-
by_alias=True,
|
75
|
-
exclude=excluded_fields,
|
76
|
-
exclude_none=True,
|
77
|
-
)
|
78
|
-
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
79
|
-
_items = []
|
80
|
-
if self.data:
|
81
|
-
for _item_data in self.data:
|
82
|
-
if _item_data:
|
83
|
-
_items.append(_item_data.to_dict())
|
84
|
-
_dict["data"] = _items
|
85
|
-
return _dict
|
86
|
-
|
87
|
-
@classmethod
|
88
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
89
|
-
"""Create an instance of GetPaymentsListRes from a dict"""
|
90
|
-
if obj is None:
|
91
|
-
return None
|
92
|
-
|
93
|
-
if not isinstance(obj, dict):
|
94
|
-
return cls.model_validate(obj)
|
95
|
-
|
96
|
-
_obj = cls.model_validate(
|
97
|
-
{
|
98
|
-
"data": (
|
99
|
-
[Payment.from_dict(_item) for _item in obj["data"]]
|
100
|
-
if obj.get("data") is not None
|
101
|
-
else None
|
102
|
-
),
|
103
|
-
"limit": obj.get("limit"),
|
104
|
-
"page": obj.get("page"),
|
105
|
-
"pagesCount": obj.get("pagesCount"),
|
106
|
-
"total": obj.get("total"),
|
107
|
-
}
|
108
|
-
)
|
109
|
-
return _obj
|
@@ -1,99 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from crypticorn.pay.client.models.validation_error import ValidationError
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
|
27
|
-
class HTTPValidationError(BaseModel):
|
28
|
-
"""
|
29
|
-
HTTPValidationError
|
30
|
-
""" # noqa: E501
|
31
|
-
|
32
|
-
detail: Optional[List[ValidationError]] = None
|
33
|
-
__properties: ClassVar[List[str]] = ["detail"]
|
34
|
-
|
35
|
-
model_config = ConfigDict(
|
36
|
-
populate_by_name=True,
|
37
|
-
validate_assignment=True,
|
38
|
-
protected_namespaces=(),
|
39
|
-
)
|
40
|
-
|
41
|
-
def to_str(self) -> str:
|
42
|
-
"""Returns the string representation of the model using alias"""
|
43
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
-
|
45
|
-
def to_json(self) -> str:
|
46
|
-
"""Returns the JSON representation of the model using alias"""
|
47
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
-
return json.dumps(self.to_dict())
|
49
|
-
|
50
|
-
@classmethod
|
51
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
-
"""Create an instance of HTTPValidationError from a JSON string"""
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
54
|
-
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
57
|
-
|
58
|
-
This has the following differences from calling pydantic's
|
59
|
-
`self.model_dump(by_alias=True)`:
|
60
|
-
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
62
|
-
were set at model initialization. Other fields with value `None`
|
63
|
-
are ignored.
|
64
|
-
"""
|
65
|
-
excluded_fields: Set[str] = set([])
|
66
|
-
|
67
|
-
_dict = self.model_dump(
|
68
|
-
by_alias=True,
|
69
|
-
exclude=excluded_fields,
|
70
|
-
exclude_none=True,
|
71
|
-
)
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of each item in detail (list)
|
73
|
-
_items = []
|
74
|
-
if self.detail:
|
75
|
-
for _item_detail in self.detail:
|
76
|
-
if _item_detail:
|
77
|
-
_items.append(_item_detail.to_dict())
|
78
|
-
_dict["detail"] = _items
|
79
|
-
return _dict
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of HTTPValidationError from a dict"""
|
84
|
-
if obj is None:
|
85
|
-
return None
|
86
|
-
|
87
|
-
if not isinstance(obj, dict):
|
88
|
-
return cls.model_validate(obj)
|
89
|
-
|
90
|
-
_obj = cls.model_validate(
|
91
|
-
{
|
92
|
-
"detail": (
|
93
|
-
[ValidationError.from_dict(_item) for _item in obj["detail"]]
|
94
|
-
if obj.get("detail") is not None
|
95
|
-
else None
|
96
|
-
)
|
97
|
-
}
|
98
|
-
)
|
99
|
-
return _obj
|
@@ -1,124 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class MinAmountReq(BaseModel):
|
27
|
-
"""
|
28
|
-
Get the minimum payment amount for a specific currency pair. https://documenter.getpostman.com/view/7907941/2s93JusNJt#ce3fe3a3-00cd-4df2-bfba-641fde741da7 You can provide both currencies in the pair or just currency_from. If only currency_from is provided, the minimum payment amount will be calculated for currency_from and the default currency specified in Payment Settings. You can specify a fiat currency in currency_from to calculate the minimum payment in that fiat currency. The fiat_equivalent field can be added to get the fiat equivalent of the minimum amount. The is_fixed_rate and is_fee_paid_by_user parameters allow you to see current minimal amounts for corresponding flows, which may differ from the standard flow. For multiple outcome wallets, the minimum amount is calculated based on the payment routing logic.
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
currency_from: StrictStr = Field(description="Payin currency")
|
32
|
-
currency_to: Optional[StrictStr] = None
|
33
|
-
fiat_equivalent: Optional[StrictStr] = None
|
34
|
-
is_fixed_rate: Optional[StrictBool] = None
|
35
|
-
is_fee_paid_by_user: Optional[StrictBool] = None
|
36
|
-
__properties: ClassVar[List[str]] = [
|
37
|
-
"currency_from",
|
38
|
-
"currency_to",
|
39
|
-
"fiat_equivalent",
|
40
|
-
"is_fixed_rate",
|
41
|
-
"is_fee_paid_by_user",
|
42
|
-
]
|
43
|
-
|
44
|
-
model_config = ConfigDict(
|
45
|
-
populate_by_name=True,
|
46
|
-
validate_assignment=True,
|
47
|
-
protected_namespaces=(),
|
48
|
-
)
|
49
|
-
|
50
|
-
def to_str(self) -> str:
|
51
|
-
"""Returns the string representation of the model using alias"""
|
52
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
-
|
54
|
-
def to_json(self) -> str:
|
55
|
-
"""Returns the JSON representation of the model using alias"""
|
56
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
-
return json.dumps(self.to_dict())
|
58
|
-
|
59
|
-
@classmethod
|
60
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
-
"""Create an instance of MinAmountReq from a JSON string"""
|
62
|
-
return cls.from_dict(json.loads(json_str))
|
63
|
-
|
64
|
-
def to_dict(self) -> Dict[str, Any]:
|
65
|
-
"""Return the dictionary representation of the model using alias.
|
66
|
-
|
67
|
-
This has the following differences from calling pydantic's
|
68
|
-
`self.model_dump(by_alias=True)`:
|
69
|
-
|
70
|
-
* `None` is only added to the output dict for nullable fields that
|
71
|
-
were set at model initialization. Other fields with value `None`
|
72
|
-
are ignored.
|
73
|
-
"""
|
74
|
-
excluded_fields: Set[str] = set([])
|
75
|
-
|
76
|
-
_dict = self.model_dump(
|
77
|
-
by_alias=True,
|
78
|
-
exclude=excluded_fields,
|
79
|
-
exclude_none=True,
|
80
|
-
)
|
81
|
-
# set to None if currency_to (nullable) is None
|
82
|
-
# and model_fields_set contains the field
|
83
|
-
if self.currency_to is None and "currency_to" in self.model_fields_set:
|
84
|
-
_dict["currency_to"] = None
|
85
|
-
|
86
|
-
# set to None if fiat_equivalent (nullable) is None
|
87
|
-
# and model_fields_set contains the field
|
88
|
-
if self.fiat_equivalent is None and "fiat_equivalent" in self.model_fields_set:
|
89
|
-
_dict["fiat_equivalent"] = None
|
90
|
-
|
91
|
-
# set to None if is_fixed_rate (nullable) is None
|
92
|
-
# and model_fields_set contains the field
|
93
|
-
if self.is_fixed_rate is None and "is_fixed_rate" in self.model_fields_set:
|
94
|
-
_dict["is_fixed_rate"] = None
|
95
|
-
|
96
|
-
# set to None if is_fee_paid_by_user (nullable) is None
|
97
|
-
# and model_fields_set contains the field
|
98
|
-
if (
|
99
|
-
self.is_fee_paid_by_user is None
|
100
|
-
and "is_fee_paid_by_user" in self.model_fields_set
|
101
|
-
):
|
102
|
-
_dict["is_fee_paid_by_user"] = None
|
103
|
-
|
104
|
-
return _dict
|
105
|
-
|
106
|
-
@classmethod
|
107
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
108
|
-
"""Create an instance of MinAmountReq from a dict"""
|
109
|
-
if obj is None:
|
110
|
-
return None
|
111
|
-
|
112
|
-
if not isinstance(obj, dict):
|
113
|
-
return cls.model_validate(obj)
|
114
|
-
|
115
|
-
_obj = cls.model_validate(
|
116
|
-
{
|
117
|
-
"currency_from": obj.get("currency_from"),
|
118
|
-
"currency_to": obj.get("currency_to"),
|
119
|
-
"fiat_equivalent": obj.get("fiat_equivalent"),
|
120
|
-
"is_fixed_rate": obj.get("is_fixed_rate"),
|
121
|
-
"is_fee_paid_by_user": obj.get("is_fee_paid_by_user"),
|
122
|
-
}
|
123
|
-
)
|
124
|
-
return _obj
|
@@ -1,105 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class MinAmountRes(BaseModel):
|
27
|
-
"""
|
28
|
-
Response for the minimum payment amount for a specific currency pair. https://documenter.getpostman.com/view/7907941/2s93JusNJt#ce3fe3a3-00cd-4df2-bfba-641fde741da7
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
currency_from: StrictStr = Field(description="Payin currency")
|
32
|
-
currency_to: StrictStr = Field(description="Outcome currency")
|
33
|
-
min_amount: Union[StrictFloat, StrictInt] = Field(
|
34
|
-
description="Minimal amount for payment using mentioned currencies"
|
35
|
-
)
|
36
|
-
fiat_equivalent: Optional[Union[StrictFloat, StrictInt]] = None
|
37
|
-
__properties: ClassVar[List[str]] = [
|
38
|
-
"currency_from",
|
39
|
-
"currency_to",
|
40
|
-
"min_amount",
|
41
|
-
"fiat_equivalent",
|
42
|
-
]
|
43
|
-
|
44
|
-
model_config = ConfigDict(
|
45
|
-
populate_by_name=True,
|
46
|
-
validate_assignment=True,
|
47
|
-
protected_namespaces=(),
|
48
|
-
)
|
49
|
-
|
50
|
-
def to_str(self) -> str:
|
51
|
-
"""Returns the string representation of the model using alias"""
|
52
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
-
|
54
|
-
def to_json(self) -> str:
|
55
|
-
"""Returns the JSON representation of the model using alias"""
|
56
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
-
return json.dumps(self.to_dict())
|
58
|
-
|
59
|
-
@classmethod
|
60
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
-
"""Create an instance of MinAmountRes from a JSON string"""
|
62
|
-
return cls.from_dict(json.loads(json_str))
|
63
|
-
|
64
|
-
def to_dict(self) -> Dict[str, Any]:
|
65
|
-
"""Return the dictionary representation of the model using alias.
|
66
|
-
|
67
|
-
This has the following differences from calling pydantic's
|
68
|
-
`self.model_dump(by_alias=True)`:
|
69
|
-
|
70
|
-
* `None` is only added to the output dict for nullable fields that
|
71
|
-
were set at model initialization. Other fields with value `None`
|
72
|
-
are ignored.
|
73
|
-
"""
|
74
|
-
excluded_fields: Set[str] = set([])
|
75
|
-
|
76
|
-
_dict = self.model_dump(
|
77
|
-
by_alias=True,
|
78
|
-
exclude=excluded_fields,
|
79
|
-
exclude_none=True,
|
80
|
-
)
|
81
|
-
# set to None if fiat_equivalent (nullable) is None
|
82
|
-
# and model_fields_set contains the field
|
83
|
-
if self.fiat_equivalent is None and "fiat_equivalent" in self.model_fields_set:
|
84
|
-
_dict["fiat_equivalent"] = None
|
85
|
-
|
86
|
-
return _dict
|
87
|
-
|
88
|
-
@classmethod
|
89
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
90
|
-
"""Create an instance of MinAmountRes from a dict"""
|
91
|
-
if obj is None:
|
92
|
-
return None
|
93
|
-
|
94
|
-
if not isinstance(obj, dict):
|
95
|
-
return cls.model_validate(obj)
|
96
|
-
|
97
|
-
_obj = cls.model_validate(
|
98
|
-
{
|
99
|
-
"currency_from": obj.get("currency_from"),
|
100
|
-
"currency_to": obj.get("currency_to"),
|
101
|
-
"min_amount": obj.get("min_amount"),
|
102
|
-
"fiat_equivalent": obj.get("fiat_equivalent"),
|
103
|
-
}
|
104
|
-
)
|
105
|
-
return _obj
|