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,87 +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, StrictFloat, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Union
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class Product(BaseModel):
|
27
|
-
"""
|
28
|
-
Product
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
id: StrictStr
|
32
|
-
name: StrictStr
|
33
|
-
price: Union[StrictFloat, StrictInt]
|
34
|
-
__properties: ClassVar[List[str]] = ["id", "name", "price"]
|
35
|
-
|
36
|
-
model_config = ConfigDict(
|
37
|
-
populate_by_name=True,
|
38
|
-
validate_assignment=True,
|
39
|
-
protected_namespaces=(),
|
40
|
-
)
|
41
|
-
|
42
|
-
def to_str(self) -> str:
|
43
|
-
"""Returns the string representation of the model using alias"""
|
44
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
45
|
-
|
46
|
-
def to_json(self) -> str:
|
47
|
-
"""Returns the JSON representation of the model using alias"""
|
48
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
49
|
-
return json.dumps(self.to_dict())
|
50
|
-
|
51
|
-
@classmethod
|
52
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
-
"""Create an instance of Product from a JSON string"""
|
54
|
-
return cls.from_dict(json.loads(json_str))
|
55
|
-
|
56
|
-
def to_dict(self) -> Dict[str, Any]:
|
57
|
-
"""Return the dictionary representation of the model using alias.
|
58
|
-
|
59
|
-
This has the following differences from calling pydantic's
|
60
|
-
`self.model_dump(by_alias=True)`:
|
61
|
-
|
62
|
-
* `None` is only added to the output dict for nullable fields that
|
63
|
-
were set at model initialization. Other fields with value `None`
|
64
|
-
are ignored.
|
65
|
-
"""
|
66
|
-
excluded_fields: Set[str] = set([])
|
67
|
-
|
68
|
-
_dict = self.model_dump(
|
69
|
-
by_alias=True,
|
70
|
-
exclude=excluded_fields,
|
71
|
-
exclude_none=True,
|
72
|
-
)
|
73
|
-
return _dict
|
74
|
-
|
75
|
-
@classmethod
|
76
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
-
"""Create an instance of Product from a dict"""
|
78
|
-
if obj is None:
|
79
|
-
return None
|
80
|
-
|
81
|
-
if not isinstance(obj, dict):
|
82
|
-
return cls.model_validate(obj)
|
83
|
-
|
84
|
-
_obj = cls.model_validate(
|
85
|
-
{"id": obj.get("id"), "name": obj.get("name"), "price": obj.get("price")}
|
86
|
-
)
|
87
|
-
return _obj
|
@@ -1,128 +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 (
|
21
|
-
BaseModel,
|
22
|
-
ConfigDict,
|
23
|
-
Field,
|
24
|
-
StrictBool,
|
25
|
-
StrictFloat,
|
26
|
-
StrictInt,
|
27
|
-
StrictStr,
|
28
|
-
)
|
29
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
30
|
-
from crypticorn.pay.client.models.scope import Scope
|
31
|
-
from typing import Optional, Set
|
32
|
-
from typing_extensions import Self
|
33
|
-
|
34
|
-
|
35
|
-
class ProductModel(BaseModel):
|
36
|
-
"""
|
37
|
-
ProductModel
|
38
|
-
""" # noqa: E501
|
39
|
-
|
40
|
-
id: Optional[StrictStr] = None
|
41
|
-
name: StrictStr = Field(description="Product name")
|
42
|
-
price: Union[StrictFloat, StrictInt] = Field(description="Product price")
|
43
|
-
scopes: Optional[List[Scope]] = None
|
44
|
-
duration: StrictInt = Field(
|
45
|
-
description="Product duration in days. 0 means unlimited."
|
46
|
-
)
|
47
|
-
description: StrictStr = Field(description="Product description")
|
48
|
-
is_active: StrictBool = Field(description="Product is active")
|
49
|
-
__properties: ClassVar[List[str]] = [
|
50
|
-
"id",
|
51
|
-
"name",
|
52
|
-
"price",
|
53
|
-
"scopes",
|
54
|
-
"duration",
|
55
|
-
"description",
|
56
|
-
"is_active",
|
57
|
-
]
|
58
|
-
|
59
|
-
model_config = ConfigDict(
|
60
|
-
populate_by_name=True,
|
61
|
-
validate_assignment=True,
|
62
|
-
protected_namespaces=(),
|
63
|
-
)
|
64
|
-
|
65
|
-
def to_str(self) -> str:
|
66
|
-
"""Returns the string representation of the model using alias"""
|
67
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
68
|
-
|
69
|
-
def to_json(self) -> str:
|
70
|
-
"""Returns the JSON representation of the model using alias"""
|
71
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
72
|
-
return json.dumps(self.to_dict())
|
73
|
-
|
74
|
-
@classmethod
|
75
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
76
|
-
"""Create an instance of ProductModel from a JSON string"""
|
77
|
-
return cls.from_dict(json.loads(json_str))
|
78
|
-
|
79
|
-
def to_dict(self) -> Dict[str, Any]:
|
80
|
-
"""Return the dictionary representation of the model using alias.
|
81
|
-
|
82
|
-
This has the following differences from calling pydantic's
|
83
|
-
`self.model_dump(by_alias=True)`:
|
84
|
-
|
85
|
-
* `None` is only added to the output dict for nullable fields that
|
86
|
-
were set at model initialization. Other fields with value `None`
|
87
|
-
are ignored.
|
88
|
-
"""
|
89
|
-
excluded_fields: Set[str] = set([])
|
90
|
-
|
91
|
-
_dict = self.model_dump(
|
92
|
-
by_alias=True,
|
93
|
-
exclude=excluded_fields,
|
94
|
-
exclude_none=True,
|
95
|
-
)
|
96
|
-
# set to None if id (nullable) is None
|
97
|
-
# and model_fields_set contains the field
|
98
|
-
if self.id is None and "id" in self.model_fields_set:
|
99
|
-
_dict["id"] = None
|
100
|
-
|
101
|
-
# set to None if scopes (nullable) is None
|
102
|
-
# and model_fields_set contains the field
|
103
|
-
if self.scopes is None and "scopes" in self.model_fields_set:
|
104
|
-
_dict["scopes"] = None
|
105
|
-
|
106
|
-
return _dict
|
107
|
-
|
108
|
-
@classmethod
|
109
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
110
|
-
"""Create an instance of ProductModel from a dict"""
|
111
|
-
if obj is None:
|
112
|
-
return None
|
113
|
-
|
114
|
-
if not isinstance(obj, dict):
|
115
|
-
return cls.model_validate(obj)
|
116
|
-
|
117
|
-
_obj = cls.model_validate(
|
118
|
-
{
|
119
|
-
"id": obj.get("id"),
|
120
|
-
"name": obj.get("name"),
|
121
|
-
"price": obj.get("price"),
|
122
|
-
"scopes": obj.get("scopes"),
|
123
|
-
"duration": obj.get("duration"),
|
124
|
-
"description": obj.get("description"),
|
125
|
-
"is_active": obj.get("is_active"),
|
126
|
-
}
|
127
|
-
)
|
128
|
-
return _obj
|
@@ -1,108 +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, 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 ProductSubsModel(BaseModel):
|
27
|
-
"""
|
28
|
-
ProductSubsModel
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
id: Optional[StrictStr] = None
|
32
|
-
user_id: StrictStr = Field(description="User ID")
|
33
|
-
product_id: StrictStr = Field(description="Product ID")
|
34
|
-
access_from: StrictInt = Field(description="Access from timestamp in milliseconds")
|
35
|
-
access_until: StrictInt = Field(
|
36
|
-
description="Access until timestamp in milliseconds. 0 means unlimited."
|
37
|
-
)
|
38
|
-
__properties: ClassVar[List[str]] = [
|
39
|
-
"id",
|
40
|
-
"user_id",
|
41
|
-
"product_id",
|
42
|
-
"access_from",
|
43
|
-
"access_until",
|
44
|
-
]
|
45
|
-
|
46
|
-
model_config = ConfigDict(
|
47
|
-
populate_by_name=True,
|
48
|
-
validate_assignment=True,
|
49
|
-
protected_namespaces=(),
|
50
|
-
)
|
51
|
-
|
52
|
-
def to_str(self) -> str:
|
53
|
-
"""Returns the string representation of the model using alias"""
|
54
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
55
|
-
|
56
|
-
def to_json(self) -> str:
|
57
|
-
"""Returns the JSON representation of the model using alias"""
|
58
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
59
|
-
return json.dumps(self.to_dict())
|
60
|
-
|
61
|
-
@classmethod
|
62
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
63
|
-
"""Create an instance of ProductSubsModel from a JSON string"""
|
64
|
-
return cls.from_dict(json.loads(json_str))
|
65
|
-
|
66
|
-
def to_dict(self) -> Dict[str, Any]:
|
67
|
-
"""Return the dictionary representation of the model using alias.
|
68
|
-
|
69
|
-
This has the following differences from calling pydantic's
|
70
|
-
`self.model_dump(by_alias=True)`:
|
71
|
-
|
72
|
-
* `None` is only added to the output dict for nullable fields that
|
73
|
-
were set at model initialization. Other fields with value `None`
|
74
|
-
are ignored.
|
75
|
-
"""
|
76
|
-
excluded_fields: Set[str] = set([])
|
77
|
-
|
78
|
-
_dict = self.model_dump(
|
79
|
-
by_alias=True,
|
80
|
-
exclude=excluded_fields,
|
81
|
-
exclude_none=True,
|
82
|
-
)
|
83
|
-
# set to None if id (nullable) is None
|
84
|
-
# and model_fields_set contains the field
|
85
|
-
if self.id is None and "id" in self.model_fields_set:
|
86
|
-
_dict["id"] = None
|
87
|
-
|
88
|
-
return _dict
|
89
|
-
|
90
|
-
@classmethod
|
91
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
92
|
-
"""Create an instance of ProductSubsModel from a dict"""
|
93
|
-
if obj is None:
|
94
|
-
return None
|
95
|
-
|
96
|
-
if not isinstance(obj, dict):
|
97
|
-
return cls.model_validate(obj)
|
98
|
-
|
99
|
-
_obj = cls.model_validate(
|
100
|
-
{
|
101
|
-
"id": obj.get("id"),
|
102
|
-
"user_id": obj.get("user_id"),
|
103
|
-
"product_id": obj.get("product_id"),
|
104
|
-
"access_from": obj.get("access_from"),
|
105
|
-
"access_until": obj.get("access_until"),
|
106
|
-
}
|
107
|
-
)
|
108
|
-
return _obj
|
@@ -1,150 +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 (
|
21
|
-
BaseModel,
|
22
|
-
ConfigDict,
|
23
|
-
StrictBool,
|
24
|
-
StrictFloat,
|
25
|
-
StrictInt,
|
26
|
-
StrictStr,
|
27
|
-
)
|
28
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
29
|
-
from crypticorn.pay.client.models.scope import Scope
|
30
|
-
from typing import Optional, Set
|
31
|
-
from typing_extensions import Self
|
32
|
-
|
33
|
-
|
34
|
-
class ProductUpdateModel(BaseModel):
|
35
|
-
"""
|
36
|
-
ProductUpdateModel
|
37
|
-
""" # noqa: E501
|
38
|
-
|
39
|
-
id: Optional[StrictStr] = None
|
40
|
-
name: Optional[StrictStr] = None
|
41
|
-
price: Optional[Union[StrictFloat, StrictInt]] = None
|
42
|
-
scopes: Optional[List[Scope]] = None
|
43
|
-
duration: Optional[StrictInt] = None
|
44
|
-
description: Optional[StrictStr] = None
|
45
|
-
is_active: Optional[StrictBool] = None
|
46
|
-
__properties: ClassVar[List[str]] = [
|
47
|
-
"id",
|
48
|
-
"name",
|
49
|
-
"price",
|
50
|
-
"scopes",
|
51
|
-
"duration",
|
52
|
-
"description",
|
53
|
-
"is_active",
|
54
|
-
]
|
55
|
-
|
56
|
-
model_config = ConfigDict(
|
57
|
-
populate_by_name=True,
|
58
|
-
validate_assignment=True,
|
59
|
-
protected_namespaces=(),
|
60
|
-
)
|
61
|
-
|
62
|
-
def to_str(self) -> str:
|
63
|
-
"""Returns the string representation of the model using alias"""
|
64
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
65
|
-
|
66
|
-
def to_json(self) -> str:
|
67
|
-
"""Returns the JSON representation of the model using alias"""
|
68
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
69
|
-
return json.dumps(self.to_dict())
|
70
|
-
|
71
|
-
@classmethod
|
72
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
73
|
-
"""Create an instance of ProductUpdateModel from a JSON string"""
|
74
|
-
return cls.from_dict(json.loads(json_str))
|
75
|
-
|
76
|
-
def to_dict(self) -> Dict[str, Any]:
|
77
|
-
"""Return the dictionary representation of the model using alias.
|
78
|
-
|
79
|
-
This has the following differences from calling pydantic's
|
80
|
-
`self.model_dump(by_alias=True)`:
|
81
|
-
|
82
|
-
* `None` is only added to the output dict for nullable fields that
|
83
|
-
were set at model initialization. Other fields with value `None`
|
84
|
-
are ignored.
|
85
|
-
"""
|
86
|
-
excluded_fields: Set[str] = set([])
|
87
|
-
|
88
|
-
_dict = self.model_dump(
|
89
|
-
by_alias=True,
|
90
|
-
exclude=excluded_fields,
|
91
|
-
exclude_none=True,
|
92
|
-
)
|
93
|
-
# set to None if id (nullable) is None
|
94
|
-
# and model_fields_set contains the field
|
95
|
-
if self.id is None and "id" in self.model_fields_set:
|
96
|
-
_dict["id"] = None
|
97
|
-
|
98
|
-
# set to None if name (nullable) is None
|
99
|
-
# and model_fields_set contains the field
|
100
|
-
if self.name is None and "name" in self.model_fields_set:
|
101
|
-
_dict["name"] = None
|
102
|
-
|
103
|
-
# set to None if price (nullable) is None
|
104
|
-
# and model_fields_set contains the field
|
105
|
-
if self.price is None and "price" in self.model_fields_set:
|
106
|
-
_dict["price"] = None
|
107
|
-
|
108
|
-
# set to None if scopes (nullable) is None
|
109
|
-
# and model_fields_set contains the field
|
110
|
-
if self.scopes is None and "scopes" in self.model_fields_set:
|
111
|
-
_dict["scopes"] = None
|
112
|
-
|
113
|
-
# set to None if duration (nullable) is None
|
114
|
-
# and model_fields_set contains the field
|
115
|
-
if self.duration is None and "duration" in self.model_fields_set:
|
116
|
-
_dict["duration"] = None
|
117
|
-
|
118
|
-
# set to None if description (nullable) is None
|
119
|
-
# and model_fields_set contains the field
|
120
|
-
if self.description is None and "description" in self.model_fields_set:
|
121
|
-
_dict["description"] = None
|
122
|
-
|
123
|
-
# set to None if is_active (nullable) is None
|
124
|
-
# and model_fields_set contains the field
|
125
|
-
if self.is_active is None and "is_active" in self.model_fields_set:
|
126
|
-
_dict["is_active"] = None
|
127
|
-
|
128
|
-
return _dict
|
129
|
-
|
130
|
-
@classmethod
|
131
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
132
|
-
"""Create an instance of ProductUpdateModel from a dict"""
|
133
|
-
if obj is None:
|
134
|
-
return None
|
135
|
-
|
136
|
-
if not isinstance(obj, dict):
|
137
|
-
return cls.model_validate(obj)
|
138
|
-
|
139
|
-
_obj = cls.model_validate(
|
140
|
-
{
|
141
|
-
"id": obj.get("id"),
|
142
|
-
"name": obj.get("name"),
|
143
|
-
"price": obj.get("price"),
|
144
|
-
"scopes": obj.get("scopes"),
|
145
|
-
"duration": obj.get("duration"),
|
146
|
-
"description": obj.get("description"),
|
147
|
-
"is_active": obj.get("is_active"),
|
148
|
-
}
|
149
|
-
)
|
150
|
-
return _obj
|
@@ -1,112 +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, Union
|
22
|
-
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
23
|
-
from crypticorn.pay.client.models.services import Services
|
24
|
-
from typing import Optional, Set
|
25
|
-
from typing_extensions import Self
|
26
|
-
|
27
|
-
|
28
|
-
class UnifiedPaymentModel(BaseModel):
|
29
|
-
"""
|
30
|
-
Combined payment model across all services
|
31
|
-
""" # noqa: E501
|
32
|
-
|
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")
|
41
|
-
__properties: ClassVar[List[str]] = [
|
42
|
-
"id",
|
43
|
-
"product_id",
|
44
|
-
"date",
|
45
|
-
"amount",
|
46
|
-
"currency",
|
47
|
-
"status",
|
48
|
-
"service",
|
49
|
-
"market",
|
50
|
-
]
|
51
|
-
|
52
|
-
model_config = ConfigDict(
|
53
|
-
populate_by_name=True,
|
54
|
-
validate_assignment=True,
|
55
|
-
protected_namespaces=(),
|
56
|
-
)
|
57
|
-
|
58
|
-
def to_str(self) -> str:
|
59
|
-
"""Returns the string representation of the model using alias"""
|
60
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
61
|
-
|
62
|
-
def to_json(self) -> str:
|
63
|
-
"""Returns the JSON representation of the model using alias"""
|
64
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
65
|
-
return json.dumps(self.to_dict())
|
66
|
-
|
67
|
-
@classmethod
|
68
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
69
|
-
"""Create an instance of UnifiedPaymentModel from a JSON string"""
|
70
|
-
return cls.from_dict(json.loads(json_str))
|
71
|
-
|
72
|
-
def to_dict(self) -> Dict[str, Any]:
|
73
|
-
"""Return the dictionary representation of the model using alias.
|
74
|
-
|
75
|
-
This has the following differences from calling pydantic's
|
76
|
-
`self.model_dump(by_alias=True)`:
|
77
|
-
|
78
|
-
* `None` is only added to the output dict for nullable fields that
|
79
|
-
were set at model initialization. Other fields with value `None`
|
80
|
-
are ignored.
|
81
|
-
"""
|
82
|
-
excluded_fields: Set[str] = set([])
|
83
|
-
|
84
|
-
_dict = self.model_dump(
|
85
|
-
by_alias=True,
|
86
|
-
exclude=excluded_fields,
|
87
|
-
exclude_none=True,
|
88
|
-
)
|
89
|
-
return _dict
|
90
|
-
|
91
|
-
@classmethod
|
92
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
93
|
-
"""Create an instance of UnifiedPaymentModel from a dict"""
|
94
|
-
if obj is None:
|
95
|
-
return None
|
96
|
-
|
97
|
-
if not isinstance(obj, dict):
|
98
|
-
return cls.model_validate(obj)
|
99
|
-
|
100
|
-
_obj = cls.model_validate(
|
101
|
-
{
|
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"),
|
110
|
-
}
|
111
|
-
)
|
112
|
-
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, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
22
|
-
from crypticorn.pay.client.models.validation_error_loc_inner import (
|
23
|
-
ValidationErrorLocInner,
|
24
|
-
)
|
25
|
-
from typing import Optional, Set
|
26
|
-
from typing_extensions import Self
|
27
|
-
|
28
|
-
|
29
|
-
class ValidationError(BaseModel):
|
30
|
-
"""
|
31
|
-
ValidationError
|
32
|
-
""" # noqa: E501
|
33
|
-
|
34
|
-
loc: List[ValidationErrorLocInner]
|
35
|
-
msg: StrictStr
|
36
|
-
type: StrictStr
|
37
|
-
__properties: ClassVar[List[str]] = ["loc", "msg", "type"]
|
38
|
-
|
39
|
-
model_config = ConfigDict(
|
40
|
-
populate_by_name=True,
|
41
|
-
validate_assignment=True,
|
42
|
-
protected_namespaces=(),
|
43
|
-
)
|
44
|
-
|
45
|
-
def to_str(self) -> str:
|
46
|
-
"""Returns the string representation of the model using alias"""
|
47
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
48
|
-
|
49
|
-
def to_json(self) -> str:
|
50
|
-
"""Returns the JSON representation of the model using alias"""
|
51
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
52
|
-
return json.dumps(self.to_dict())
|
53
|
-
|
54
|
-
@classmethod
|
55
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
56
|
-
"""Create an instance of ValidationError from a JSON string"""
|
57
|
-
return cls.from_dict(json.loads(json_str))
|
58
|
-
|
59
|
-
def to_dict(self) -> Dict[str, Any]:
|
60
|
-
"""Return the dictionary representation of the model using alias.
|
61
|
-
|
62
|
-
This has the following differences from calling pydantic's
|
63
|
-
`self.model_dump(by_alias=True)`:
|
64
|
-
|
65
|
-
* `None` is only added to the output dict for nullable fields that
|
66
|
-
were set at model initialization. Other fields with value `None`
|
67
|
-
are ignored.
|
68
|
-
"""
|
69
|
-
excluded_fields: Set[str] = set([])
|
70
|
-
|
71
|
-
_dict = self.model_dump(
|
72
|
-
by_alias=True,
|
73
|
-
exclude=excluded_fields,
|
74
|
-
exclude_none=True,
|
75
|
-
)
|
76
|
-
# override the default output from pydantic by calling `to_dict()` of each item in loc (list)
|
77
|
-
_items = []
|
78
|
-
if self.loc:
|
79
|
-
for _item_loc in self.loc:
|
80
|
-
if _item_loc:
|
81
|
-
_items.append(_item_loc.to_dict())
|
82
|
-
_dict["loc"] = _items
|
83
|
-
return _dict
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
-
"""Create an instance of ValidationError from a dict"""
|
88
|
-
if obj is None:
|
89
|
-
return None
|
90
|
-
|
91
|
-
if not isinstance(obj, dict):
|
92
|
-
return cls.model_validate(obj)
|
93
|
-
|
94
|
-
_obj = cls.model_validate(
|
95
|
-
{
|
96
|
-
"loc": (
|
97
|
-
[ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]]
|
98
|
-
if obj.get("loc") is not None
|
99
|
-
else None
|
100
|
-
),
|
101
|
-
"msg": obj.get("msg"),
|
102
|
-
"type": obj.get("type"),
|
103
|
-
}
|
104
|
-
)
|
105
|
-
return _obj
|