crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.0__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/__init__.py +3 -3
- crypticorn/auth/__init__.py +2 -0
- crypticorn/auth/client/__init__.py +112 -0
- crypticorn/auth/client/api/__init__.py +8 -0
- crypticorn/auth/client/api/admin_api.py +522 -0
- crypticorn/auth/client/api/auth_api.py +2089 -0
- crypticorn/auth/client/api/service_api.py +309 -0
- crypticorn/auth/client/api/user_api.py +2540 -0
- crypticorn/auth/client/api/wallet_api.py +1698 -0
- crypticorn/auth/client/api_client.py +758 -0
- crypticorn/auth/client/api_response.py +20 -0
- crypticorn/auth/client/configuration.py +584 -0
- crypticorn/auth/client/exceptions.py +220 -0
- crypticorn/auth/client/models/__init__.py +91 -0
- crypticorn/auth/client/models/add_wallet200_response.py +86 -0
- crypticorn/auth/client/models/add_wallet_request.py +107 -0
- crypticorn/auth/client/models/authorize_user200_response.py +107 -0
- crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
- crypticorn/auth/client/models/authorize_user_request.py +96 -0
- crypticorn/auth/client/models/create_user_request.py +114 -0
- crypticorn/auth/client/models/list_wallets200_response.py +137 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
- crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
- crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
- crypticorn/auth/client/models/logout_default_response.py +108 -0
- crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
- crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
- crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
- crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
- crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
- crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
- crypticorn/auth/client/models/token_info200_response.py +97 -0
- crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
- crypticorn/auth/client/models/update_user_request.py +93 -0
- crypticorn/auth/client/models/user_reset_password_request.py +87 -0
- crypticorn/auth/client/models/user_set_password_request.py +89 -0
- crypticorn/auth/client/models/verify200_response.py +110 -0
- crypticorn/auth/client/models/verify_email200_response.py +107 -0
- crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
- crypticorn/auth/client/models/verify_email_request.py +83 -0
- crypticorn/auth/client/models/verify_wallet_request.py +91 -0
- crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
- crypticorn/auth/client/models/whoami200_response.py +104 -0
- crypticorn/auth/client/rest.py +195 -0
- crypticorn/auth/main.py +45 -0
- crypticorn/client.py +46 -8
- crypticorn/common/__init__.py +5 -0
- crypticorn/common/auth.py +43 -0
- crypticorn/common/auth_client.py +163 -0
- crypticorn/common/errors.py +432 -0
- crypticorn/common/scopes.py +29 -0
- crypticorn/common/urls.py +25 -0
- crypticorn/hive/__init__.py +2 -1
- crypticorn/hive/client/__init__.py +57 -0
- crypticorn/hive/client/api/__init__.py +6 -0
- crypticorn/hive/client/api/data_api.py +594 -0
- crypticorn/hive/client/api/models_api.py +1680 -0
- crypticorn/hive/client/api/status_api.py +263 -0
- crypticorn/hive/client/api_client.py +758 -0
- crypticorn/hive/client/api_response.py +20 -0
- crypticorn/hive/client/configuration.py +612 -0
- crypticorn/hive/client/exceptions.py +220 -0
- crypticorn/hive/client/models/__init__.py +38 -0
- crypticorn/hive/client/models/coins.py +44 -0
- crypticorn/hive/client/models/data_download_response.py +113 -0
- crypticorn/hive/client/models/data_info.py +115 -0
- crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
- crypticorn/hive/client/models/data_version.py +35 -0
- crypticorn/hive/client/models/download_links.py +91 -0
- crypticorn/hive/client/models/evaluation.py +86 -0
- crypticorn/hive/client/models/evaluation_response.py +85 -0
- crypticorn/hive/client/models/feature_size.py +36 -0
- crypticorn/hive/client/models/http_validation_error.py +99 -0
- crypticorn/hive/client/models/model.py +133 -0
- crypticorn/hive/client/models/model_create.py +93 -0
- crypticorn/hive/client/models/model_status.py +35 -0
- crypticorn/hive/client/models/model_update.py +83 -0
- crypticorn/hive/client/models/target.py +36 -0
- crypticorn/hive/client/models/target_type.py +35 -0
- crypticorn/hive/client/models/validation_error.py +105 -0
- crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/hive/client/py.typed +0 -0
- crypticorn/hive/client/rest.py +195 -0
- crypticorn/hive/main.py +27 -100
- crypticorn/klines/client/__init__.py +21 -7
- crypticorn/klines/client/api/__init__.py +0 -1
- crypticorn/klines/client/api/funding_rates_api.py +90 -79
- crypticorn/klines/client/api/health_check_api.py +29 -45
- crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
- crypticorn/klines/client/api/symbols_api.py +36 -54
- crypticorn/klines/client/api/udf_api.py +228 -352
- crypticorn/klines/client/api_client.py +106 -148
- crypticorn/klines/client/api_response.py +2 -3
- crypticorn/klines/client/configuration.py +64 -50
- crypticorn/klines/client/exceptions.py +20 -16
- crypticorn/klines/client/models/__init__.py +21 -7
- crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
- crypticorn/klines/client/models/base_response_list_str.py +16 -14
- crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
- crypticorn/klines/client/models/error_response.py +23 -15
- crypticorn/klines/client/models/exchange.py +11 -11
- crypticorn/klines/client/models/funding_rate_response.py +11 -11
- crypticorn/klines/client/models/health_check_response.py +14 -12
- crypticorn/klines/client/models/history_error_response.py +11 -11
- crypticorn/klines/client/models/history_no_data_response.py +16 -16
- crypticorn/klines/client/models/history_success_response.py +16 -16
- crypticorn/klines/client/models/http_validation_error.py +14 -10
- crypticorn/klines/client/models/market.py +2 -4
- crypticorn/klines/client/models/ohlcv_response.py +22 -15
- crypticorn/klines/client/models/resolution.py +5 -7
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
- crypticorn/klines/client/models/search_symbol_response.py +22 -15
- crypticorn/klines/client/models/sort_direction.py +2 -4
- crypticorn/klines/client/models/symbol_group_response.py +5 -9
- crypticorn/klines/client/models/symbol_info_response.py +40 -24
- crypticorn/klines/client/models/symbol_type.py +5 -10
- crypticorn/klines/client/models/timeframe.py +5 -7
- crypticorn/klines/client/models/udf_config_response.py +60 -21
- crypticorn/klines/client/models/validation_error.py +19 -13
- crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
- crypticorn/klines/client/rest.py +30 -41
- crypticorn/klines/main.py +52 -15
- crypticorn/pay/__init__.py +2 -0
- crypticorn/pay/client/__init__.py +52 -0
- crypticorn/pay/client/api/__init__.py +7 -0
- crypticorn/pay/client/api/now_payments_api.py +813 -0
- crypticorn/pay/client/api/payments_api.py +799 -0
- crypticorn/pay/client/api/products_api.py +891 -0
- crypticorn/pay/client/api/status_api.py +260 -0
- crypticorn/pay/client/api_client.py +758 -0
- crypticorn/pay/client/api_response.py +20 -0
- crypticorn/pay/client/configuration.py +612 -0
- crypticorn/pay/client/exceptions.py +220 -0
- crypticorn/pay/client/models/__init__.py +32 -0
- crypticorn/pay/client/models/api_status_res.py +83 -0
- crypticorn/pay/client/models/combined_payment_history.py +101 -0
- crypticorn/pay/client/models/create_invoice_req.py +188 -0
- crypticorn/pay/client/models/create_invoice_res.py +188 -0
- crypticorn/pay/client/models/currency.py +165 -0
- crypticorn/pay/client/models/estimate_price_req.py +91 -0
- crypticorn/pay/client/models/estimate_price_res.py +102 -0
- crypticorn/pay/client/models/get_currencies_res.py +99 -0
- crypticorn/pay/client/models/get_payment_status_res.py +222 -0
- crypticorn/pay/client/models/get_payments_list_res.py +109 -0
- crypticorn/pay/client/models/http_validation_error.py +99 -0
- crypticorn/pay/client/models/min_amount_req.py +124 -0
- crypticorn/pay/client/models/min_amount_res.py +105 -0
- crypticorn/pay/client/models/now_api_status_res.py +83 -0
- crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
- crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
- crypticorn/pay/client/models/now_fee_structure.py +104 -0
- crypticorn/pay/client/models/now_payment_model.py +124 -0
- crypticorn/pay/client/models/now_payment_status.py +42 -0
- crypticorn/pay/client/models/now_webhook_payload.py +181 -0
- crypticorn/pay/client/models/payment.py +231 -0
- crypticorn/pay/client/models/payment_status.py +40 -0
- crypticorn/pay/client/models/product.py +87 -0
- crypticorn/pay/client/models/product_model.py +119 -0
- crypticorn/pay/client/models/product_subs_model.py +108 -0
- crypticorn/pay/client/models/services.py +34 -0
- crypticorn/pay/client/models/unified_payment_model.py +112 -0
- crypticorn/pay/client/models/validation_error.py +105 -0
- crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/pay/client/py.typed +0 -0
- crypticorn/pay/client/rest.py +195 -0
- crypticorn/pay/main.py +35 -0
- crypticorn/trade/client/__init__.py +9 -4
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +203 -304
- crypticorn/trade/client/api/bots_api.py +177 -250
- crypticorn/trade/client/api/exchanges_api.py +38 -57
- crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
- crypticorn/trade/client/api/notifications_api.py +247 -364
- crypticorn/trade/client/api/orders_api.py +44 -63
- crypticorn/trade/client/api/status_api.py +35 -53
- crypticorn/trade/client/api/strategies_api.py +852 -64
- crypticorn/trade/client/api/trading_actions_api.py +126 -203
- crypticorn/trade/client/api_client.py +115 -154
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -90
- crypticorn/trade/client/exceptions.py +21 -17
- crypticorn/trade/client/models/__init__.py +9 -4
- crypticorn/trade/client/models/action_model.py +114 -50
- crypticorn/trade/client/models/api_error_identifier.py +60 -51
- crypticorn/trade/client/models/api_error_level.py +37 -0
- crypticorn/trade/client/models/api_error_type.py +37 -0
- crypticorn/trade/client/models/api_key_model.py +49 -28
- crypticorn/trade/client/models/bot_model.py +76 -31
- crypticorn/trade/client/models/bot_status.py +37 -0
- crypticorn/trade/client/models/exchange.py +3 -5
- crypticorn/trade/client/models/execution_ids.py +14 -14
- crypticorn/trade/client/models/futures_balance.py +39 -23
- crypticorn/trade/client/models/futures_trading_action.py +98 -46
- crypticorn/trade/client/models/http_validation_error.py +15 -11
- crypticorn/trade/client/models/margin_mode.py +3 -5
- crypticorn/trade/client/models/market_type.py +3 -5
- crypticorn/trade/client/models/notification_model.py +60 -27
- crypticorn/trade/client/models/notification_type.py +4 -6
- crypticorn/trade/client/models/order_model.py +125 -65
- crypticorn/trade/client/models/order_status.py +6 -8
- crypticorn/trade/client/models/post_futures_action.py +16 -12
- crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
- crypticorn/trade/client/models/strategy_model.py +66 -27
- crypticorn/trade/client/models/strategy_model_input.py +160 -0
- crypticorn/trade/client/models/strategy_model_output.py +160 -0
- crypticorn/trade/client/models/tpsl.py +35 -21
- crypticorn/trade/client/models/trading_action_type.py +5 -7
- crypticorn/trade/client/models/update_notification.py +17 -13
- crypticorn/trade/client/models/validation_error.py +20 -14
- crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
- crypticorn/trade/client/rest.py +108 -170
- crypticorn/trade/main.py +26 -19
- crypticorn-2.0.0.dist-info/METADATA +74 -0
- crypticorn-2.0.0.dist-info/RECORD +226 -0
- {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
- crypticorn/hive/requirements.txt +0 -4
- crypticorn/hive/utils.py +0 -109
- crypticorn/klines/requirements.txt +0 -4
- crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
- crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
- crypticorn/klines/test/test_base_response_list_str.py +0 -56
- crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
- crypticorn/klines/test/test_error_response.py +0 -57
- crypticorn/klines/test/test_exchange.py +0 -56
- crypticorn/klines/test/test_funding_rate_response.py +0 -56
- crypticorn/klines/test/test_funding_rates_api.py +0 -38
- crypticorn/klines/test/test_health_check_api.py +0 -38
- crypticorn/klines/test/test_health_check_response.py +0 -52
- crypticorn/klines/test/test_history_error_response.py +0 -53
- crypticorn/klines/test/test_history_no_data_response.py +0 -69
- crypticorn/klines/test/test_history_success_response.py +0 -87
- crypticorn/klines/test/test_http_validation_error.py +0 -58
- crypticorn/klines/test/test_market.py +0 -33
- crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
- crypticorn/klines/test/test_ohlcv_response.py +0 -86
- crypticorn/klines/test/test_resolution.py +0 -33
- crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
- crypticorn/klines/test/test_search_symbol_response.py +0 -62
- crypticorn/klines/test/test_sort_direction.py +0 -33
- crypticorn/klines/test/test_symbol_group_response.py +0 -53
- crypticorn/klines/test/test_symbol_info_response.py +0 -84
- crypticorn/klines/test/test_symbol_type.py +0 -54
- crypticorn/klines/test/test_symbols_api.py +0 -38
- crypticorn/klines/test/test_timeframe.py +0 -33
- crypticorn/klines/test/test_udf_api.py +0 -80
- crypticorn/klines/test/test_udf_config_response.py +0 -95
- crypticorn/klines/test/test_validation_error.py +0 -60
- crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
- crypticorn/trade/requirements.txt +0 -4
- crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
- crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
- crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
- /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
- {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,799 @@
|
|
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
|
+
import warnings
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
+
from typing_extensions import Annotated
|
18
|
+
|
19
|
+
from pydantic import StrictStr
|
20
|
+
from typing import List, Optional
|
21
|
+
from crypticorn.pay.client.models.product_subs_model import ProductSubsModel
|
22
|
+
from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
|
23
|
+
|
24
|
+
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
25
|
+
from crypticorn.pay.client.api_response import ApiResponse
|
26
|
+
from crypticorn.pay.client.rest import RESTResponseType
|
27
|
+
|
28
|
+
|
29
|
+
class PaymentsApi:
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
31
|
+
Ref: https://openapi-generator.tech
|
32
|
+
|
33
|
+
Do not edit the class manually.
|
34
|
+
"""
|
35
|
+
|
36
|
+
def __init__(self, api_client=None) -> None:
|
37
|
+
if api_client is None:
|
38
|
+
api_client = ApiClient.get_default()
|
39
|
+
self.api_client = api_client
|
40
|
+
|
41
|
+
@validate_call
|
42
|
+
async def get_latest_payment_from_invoice(
|
43
|
+
self,
|
44
|
+
invoice_id: StrictStr,
|
45
|
+
access_token: Optional[StrictStr] = None,
|
46
|
+
_request_timeout: Union[
|
47
|
+
None,
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
49
|
+
Tuple[
|
50
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
51
|
+
],
|
52
|
+
] = None,
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
57
|
+
) -> UnifiedPaymentModel:
|
58
|
+
"""Get Latest Payment From Invoice
|
59
|
+
|
60
|
+
Get the latest payment from an invoice
|
61
|
+
|
62
|
+
:param invoice_id: (required)
|
63
|
+
:type invoice_id: str
|
64
|
+
:param access_token:
|
65
|
+
:type access_token: str
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
67
|
+
number provided, it will be total request
|
68
|
+
timeout. It can also be a pair (tuple) of
|
69
|
+
(connection, read) timeouts.
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
72
|
+
request; this effectively ignores the
|
73
|
+
authentication in the spec for a single request.
|
74
|
+
:type _request_auth: dict, optional
|
75
|
+
:param _content_type: force content-type for the request.
|
76
|
+
:type _content_type: str, Optional
|
77
|
+
:param _headers: set to override the headers for a single
|
78
|
+
request; this effectively ignores the headers
|
79
|
+
in the spec for a single request.
|
80
|
+
:type _headers: dict, optional
|
81
|
+
:param _host_index: set to override the host_index for a single
|
82
|
+
request; this effectively ignores the host_index
|
83
|
+
in the spec for a single request.
|
84
|
+
:type _host_index: int, optional
|
85
|
+
:return: Returns the result object.
|
86
|
+
""" # noqa: E501
|
87
|
+
|
88
|
+
_param = self._get_latest_payment_from_invoice_serialize(
|
89
|
+
invoice_id=invoice_id,
|
90
|
+
access_token=access_token,
|
91
|
+
_request_auth=_request_auth,
|
92
|
+
_content_type=_content_type,
|
93
|
+
_headers=_headers,
|
94
|
+
_host_index=_host_index,
|
95
|
+
)
|
96
|
+
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
98
|
+
"200": "UnifiedPaymentModel",
|
99
|
+
"422": "HTTPValidationError",
|
100
|
+
}
|
101
|
+
response_data = await self.api_client.call_api(
|
102
|
+
*_param, _request_timeout=_request_timeout
|
103
|
+
)
|
104
|
+
await response_data.read()
|
105
|
+
return self.api_client.response_deserialize(
|
106
|
+
response_data=response_data,
|
107
|
+
response_types_map=_response_types_map,
|
108
|
+
).data
|
109
|
+
|
110
|
+
@validate_call
|
111
|
+
async def get_latest_payment_from_invoice_with_http_info(
|
112
|
+
self,
|
113
|
+
invoice_id: StrictStr,
|
114
|
+
access_token: Optional[StrictStr] = None,
|
115
|
+
_request_timeout: Union[
|
116
|
+
None,
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
118
|
+
Tuple[
|
119
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
120
|
+
],
|
121
|
+
] = None,
|
122
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
123
|
+
_content_type: Optional[StrictStr] = None,
|
124
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
125
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
126
|
+
) -> ApiResponse[UnifiedPaymentModel]:
|
127
|
+
"""Get Latest Payment From Invoice
|
128
|
+
|
129
|
+
Get the latest payment from an invoice
|
130
|
+
|
131
|
+
:param invoice_id: (required)
|
132
|
+
:type invoice_id: str
|
133
|
+
:param access_token:
|
134
|
+
:type access_token: str
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
136
|
+
number provided, it will be total request
|
137
|
+
timeout. It can also be a pair (tuple) of
|
138
|
+
(connection, read) timeouts.
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
141
|
+
request; this effectively ignores the
|
142
|
+
authentication in the spec for a single request.
|
143
|
+
:type _request_auth: dict, optional
|
144
|
+
:param _content_type: force content-type for the request.
|
145
|
+
:type _content_type: str, Optional
|
146
|
+
:param _headers: set to override the headers for a single
|
147
|
+
request; this effectively ignores the headers
|
148
|
+
in the spec for a single request.
|
149
|
+
:type _headers: dict, optional
|
150
|
+
:param _host_index: set to override the host_index for a single
|
151
|
+
request; this effectively ignores the host_index
|
152
|
+
in the spec for a single request.
|
153
|
+
:type _host_index: int, optional
|
154
|
+
:return: Returns the result object.
|
155
|
+
""" # noqa: E501
|
156
|
+
|
157
|
+
_param = self._get_latest_payment_from_invoice_serialize(
|
158
|
+
invoice_id=invoice_id,
|
159
|
+
access_token=access_token,
|
160
|
+
_request_auth=_request_auth,
|
161
|
+
_content_type=_content_type,
|
162
|
+
_headers=_headers,
|
163
|
+
_host_index=_host_index,
|
164
|
+
)
|
165
|
+
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
167
|
+
"200": "UnifiedPaymentModel",
|
168
|
+
"422": "HTTPValidationError",
|
169
|
+
}
|
170
|
+
response_data = await self.api_client.call_api(
|
171
|
+
*_param, _request_timeout=_request_timeout
|
172
|
+
)
|
173
|
+
await response_data.read()
|
174
|
+
return self.api_client.response_deserialize(
|
175
|
+
response_data=response_data,
|
176
|
+
response_types_map=_response_types_map,
|
177
|
+
)
|
178
|
+
|
179
|
+
@validate_call
|
180
|
+
async def get_latest_payment_from_invoice_without_preload_content(
|
181
|
+
self,
|
182
|
+
invoice_id: StrictStr,
|
183
|
+
access_token: Optional[StrictStr] = None,
|
184
|
+
_request_timeout: Union[
|
185
|
+
None,
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
187
|
+
Tuple[
|
188
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
189
|
+
],
|
190
|
+
] = None,
|
191
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
192
|
+
_content_type: Optional[StrictStr] = None,
|
193
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
194
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
195
|
+
) -> RESTResponseType:
|
196
|
+
"""Get Latest Payment From Invoice
|
197
|
+
|
198
|
+
Get the latest payment from an invoice
|
199
|
+
|
200
|
+
:param invoice_id: (required)
|
201
|
+
:type invoice_id: str
|
202
|
+
:param access_token:
|
203
|
+
:type access_token: str
|
204
|
+
:param _request_timeout: timeout setting for this request. If one
|
205
|
+
number provided, it will be total request
|
206
|
+
timeout. It can also be a pair (tuple) of
|
207
|
+
(connection, read) timeouts.
|
208
|
+
:type _request_timeout: int, tuple(int, int), optional
|
209
|
+
:param _request_auth: set to override the auth_settings for an a single
|
210
|
+
request; this effectively ignores the
|
211
|
+
authentication in the spec for a single request.
|
212
|
+
:type _request_auth: dict, optional
|
213
|
+
:param _content_type: force content-type for the request.
|
214
|
+
:type _content_type: str, Optional
|
215
|
+
:param _headers: set to override the headers for a single
|
216
|
+
request; this effectively ignores the headers
|
217
|
+
in the spec for a single request.
|
218
|
+
:type _headers: dict, optional
|
219
|
+
:param _host_index: set to override the host_index for a single
|
220
|
+
request; this effectively ignores the host_index
|
221
|
+
in the spec for a single request.
|
222
|
+
:type _host_index: int, optional
|
223
|
+
:return: Returns the result object.
|
224
|
+
""" # noqa: E501
|
225
|
+
|
226
|
+
_param = self._get_latest_payment_from_invoice_serialize(
|
227
|
+
invoice_id=invoice_id,
|
228
|
+
access_token=access_token,
|
229
|
+
_request_auth=_request_auth,
|
230
|
+
_content_type=_content_type,
|
231
|
+
_headers=_headers,
|
232
|
+
_host_index=_host_index,
|
233
|
+
)
|
234
|
+
|
235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
236
|
+
"200": "UnifiedPaymentModel",
|
237
|
+
"422": "HTTPValidationError",
|
238
|
+
}
|
239
|
+
response_data = await self.api_client.call_api(
|
240
|
+
*_param, _request_timeout=_request_timeout
|
241
|
+
)
|
242
|
+
return response_data.response
|
243
|
+
|
244
|
+
def _get_latest_payment_from_invoice_serialize(
|
245
|
+
self,
|
246
|
+
invoice_id,
|
247
|
+
access_token,
|
248
|
+
_request_auth,
|
249
|
+
_content_type,
|
250
|
+
_headers,
|
251
|
+
_host_index,
|
252
|
+
) -> RequestSerialized:
|
253
|
+
|
254
|
+
_host = None
|
255
|
+
|
256
|
+
_collection_formats: Dict[str, str] = {}
|
257
|
+
|
258
|
+
_path_params: Dict[str, str] = {}
|
259
|
+
_query_params: List[Tuple[str, str]] = []
|
260
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
261
|
+
_form_params: List[Tuple[str, str]] = []
|
262
|
+
_files: Dict[
|
263
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
264
|
+
] = {}
|
265
|
+
_body_params: Optional[bytes] = None
|
266
|
+
|
267
|
+
# process the path parameters
|
268
|
+
# process the query parameters
|
269
|
+
if invoice_id is not None:
|
270
|
+
|
271
|
+
_query_params.append(("invoice_id", invoice_id))
|
272
|
+
|
273
|
+
# process the header parameters
|
274
|
+
# process the form parameters
|
275
|
+
# process the body parameter
|
276
|
+
|
277
|
+
# set the HTTP header `Accept`
|
278
|
+
if "Accept" not in _header_params:
|
279
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
280
|
+
["application/json"]
|
281
|
+
)
|
282
|
+
|
283
|
+
# authentication setting
|
284
|
+
_auth_settings: List[str] = ["HTTPBearer"]
|
285
|
+
|
286
|
+
return self.api_client.param_serialize(
|
287
|
+
method="GET",
|
288
|
+
resource_path="/payments",
|
289
|
+
path_params=_path_params,
|
290
|
+
query_params=_query_params,
|
291
|
+
header_params=_header_params,
|
292
|
+
body=_body_params,
|
293
|
+
post_params=_form_params,
|
294
|
+
files=_files,
|
295
|
+
auth_settings=_auth_settings,
|
296
|
+
collection_formats=_collection_formats,
|
297
|
+
_host=_host,
|
298
|
+
_request_auth=_request_auth,
|
299
|
+
)
|
300
|
+
|
301
|
+
@validate_call
|
302
|
+
async def get_payment_history(
|
303
|
+
self,
|
304
|
+
access_token: Optional[StrictStr] = None,
|
305
|
+
_request_timeout: Union[
|
306
|
+
None,
|
307
|
+
Annotated[StrictFloat, Field(gt=0)],
|
308
|
+
Tuple[
|
309
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
310
|
+
],
|
311
|
+
] = None,
|
312
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
313
|
+
_content_type: Optional[StrictStr] = None,
|
314
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
315
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
316
|
+
) -> List[UnifiedPaymentModel]:
|
317
|
+
"""Get Payments
|
318
|
+
|
319
|
+
Get combined payment history for a user across all payment services.
|
320
|
+
|
321
|
+
:param access_token:
|
322
|
+
:type access_token: str
|
323
|
+
:param _request_timeout: timeout setting for this request. If one
|
324
|
+
number provided, it will be total request
|
325
|
+
timeout. It can also be a pair (tuple) of
|
326
|
+
(connection, read) timeouts.
|
327
|
+
:type _request_timeout: int, tuple(int, int), optional
|
328
|
+
:param _request_auth: set to override the auth_settings for an a single
|
329
|
+
request; this effectively ignores the
|
330
|
+
authentication in the spec for a single request.
|
331
|
+
:type _request_auth: dict, optional
|
332
|
+
:param _content_type: force content-type for the request.
|
333
|
+
:type _content_type: str, Optional
|
334
|
+
:param _headers: set to override the headers for a single
|
335
|
+
request; this effectively ignores the headers
|
336
|
+
in the spec for a single request.
|
337
|
+
:type _headers: dict, optional
|
338
|
+
:param _host_index: set to override the host_index for a single
|
339
|
+
request; this effectively ignores the host_index
|
340
|
+
in the spec for a single request.
|
341
|
+
:type _host_index: int, optional
|
342
|
+
:return: Returns the result object.
|
343
|
+
""" # noqa: E501
|
344
|
+
|
345
|
+
_param = self._get_payment_history_serialize(
|
346
|
+
access_token=access_token,
|
347
|
+
_request_auth=_request_auth,
|
348
|
+
_content_type=_content_type,
|
349
|
+
_headers=_headers,
|
350
|
+
_host_index=_host_index,
|
351
|
+
)
|
352
|
+
|
353
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
354
|
+
"200": "List[UnifiedPaymentModel]",
|
355
|
+
"422": "HTTPValidationError",
|
356
|
+
}
|
357
|
+
response_data = await self.api_client.call_api(
|
358
|
+
*_param, _request_timeout=_request_timeout
|
359
|
+
)
|
360
|
+
await response_data.read()
|
361
|
+
return self.api_client.response_deserialize(
|
362
|
+
response_data=response_data,
|
363
|
+
response_types_map=_response_types_map,
|
364
|
+
).data
|
365
|
+
|
366
|
+
@validate_call
|
367
|
+
async def get_payment_history_with_http_info(
|
368
|
+
self,
|
369
|
+
access_token: Optional[StrictStr] = None,
|
370
|
+
_request_timeout: Union[
|
371
|
+
None,
|
372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
373
|
+
Tuple[
|
374
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
375
|
+
],
|
376
|
+
] = None,
|
377
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
378
|
+
_content_type: Optional[StrictStr] = None,
|
379
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
380
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
381
|
+
) -> ApiResponse[List[UnifiedPaymentModel]]:
|
382
|
+
"""Get Payments
|
383
|
+
|
384
|
+
Get combined payment history for a user across all payment services.
|
385
|
+
|
386
|
+
:param access_token:
|
387
|
+
:type access_token: str
|
388
|
+
:param _request_timeout: timeout setting for this request. If one
|
389
|
+
number provided, it will be total request
|
390
|
+
timeout. It can also be a pair (tuple) of
|
391
|
+
(connection, read) timeouts.
|
392
|
+
:type _request_timeout: int, tuple(int, int), optional
|
393
|
+
:param _request_auth: set to override the auth_settings for an a single
|
394
|
+
request; this effectively ignores the
|
395
|
+
authentication in the spec for a single request.
|
396
|
+
:type _request_auth: dict, optional
|
397
|
+
:param _content_type: force content-type for the request.
|
398
|
+
:type _content_type: str, Optional
|
399
|
+
:param _headers: set to override the headers for a single
|
400
|
+
request; this effectively ignores the headers
|
401
|
+
in the spec for a single request.
|
402
|
+
:type _headers: dict, optional
|
403
|
+
:param _host_index: set to override the host_index for a single
|
404
|
+
request; this effectively ignores the host_index
|
405
|
+
in the spec for a single request.
|
406
|
+
:type _host_index: int, optional
|
407
|
+
:return: Returns the result object.
|
408
|
+
""" # noqa: E501
|
409
|
+
|
410
|
+
_param = self._get_payment_history_serialize(
|
411
|
+
access_token=access_token,
|
412
|
+
_request_auth=_request_auth,
|
413
|
+
_content_type=_content_type,
|
414
|
+
_headers=_headers,
|
415
|
+
_host_index=_host_index,
|
416
|
+
)
|
417
|
+
|
418
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
419
|
+
"200": "List[UnifiedPaymentModel]",
|
420
|
+
"422": "HTTPValidationError",
|
421
|
+
}
|
422
|
+
response_data = await self.api_client.call_api(
|
423
|
+
*_param, _request_timeout=_request_timeout
|
424
|
+
)
|
425
|
+
await response_data.read()
|
426
|
+
return self.api_client.response_deserialize(
|
427
|
+
response_data=response_data,
|
428
|
+
response_types_map=_response_types_map,
|
429
|
+
)
|
430
|
+
|
431
|
+
@validate_call
|
432
|
+
async def get_payment_history_without_preload_content(
|
433
|
+
self,
|
434
|
+
access_token: Optional[StrictStr] = None,
|
435
|
+
_request_timeout: Union[
|
436
|
+
None,
|
437
|
+
Annotated[StrictFloat, Field(gt=0)],
|
438
|
+
Tuple[
|
439
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
440
|
+
],
|
441
|
+
] = None,
|
442
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
443
|
+
_content_type: Optional[StrictStr] = None,
|
444
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
445
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
446
|
+
) -> RESTResponseType:
|
447
|
+
"""Get Payments
|
448
|
+
|
449
|
+
Get combined payment history for a user across all payment services.
|
450
|
+
|
451
|
+
:param access_token:
|
452
|
+
:type access_token: str
|
453
|
+
:param _request_timeout: timeout setting for this request. If one
|
454
|
+
number provided, it will be total request
|
455
|
+
timeout. It can also be a pair (tuple) of
|
456
|
+
(connection, read) timeouts.
|
457
|
+
:type _request_timeout: int, tuple(int, int), optional
|
458
|
+
:param _request_auth: set to override the auth_settings for an a single
|
459
|
+
request; this effectively ignores the
|
460
|
+
authentication in the spec for a single request.
|
461
|
+
:type _request_auth: dict, optional
|
462
|
+
:param _content_type: force content-type for the request.
|
463
|
+
:type _content_type: str, Optional
|
464
|
+
:param _headers: set to override the headers for a single
|
465
|
+
request; this effectively ignores the headers
|
466
|
+
in the spec for a single request.
|
467
|
+
:type _headers: dict, optional
|
468
|
+
:param _host_index: set to override the host_index for a single
|
469
|
+
request; this effectively ignores the host_index
|
470
|
+
in the spec for a single request.
|
471
|
+
:type _host_index: int, optional
|
472
|
+
:return: Returns the result object.
|
473
|
+
""" # noqa: E501
|
474
|
+
|
475
|
+
_param = self._get_payment_history_serialize(
|
476
|
+
access_token=access_token,
|
477
|
+
_request_auth=_request_auth,
|
478
|
+
_content_type=_content_type,
|
479
|
+
_headers=_headers,
|
480
|
+
_host_index=_host_index,
|
481
|
+
)
|
482
|
+
|
483
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
484
|
+
"200": "List[UnifiedPaymentModel]",
|
485
|
+
"422": "HTTPValidationError",
|
486
|
+
}
|
487
|
+
response_data = await self.api_client.call_api(
|
488
|
+
*_param, _request_timeout=_request_timeout
|
489
|
+
)
|
490
|
+
return response_data.response
|
491
|
+
|
492
|
+
def _get_payment_history_serialize(
|
493
|
+
self,
|
494
|
+
access_token,
|
495
|
+
_request_auth,
|
496
|
+
_content_type,
|
497
|
+
_headers,
|
498
|
+
_host_index,
|
499
|
+
) -> RequestSerialized:
|
500
|
+
|
501
|
+
_host = None
|
502
|
+
|
503
|
+
_collection_formats: Dict[str, str] = {}
|
504
|
+
|
505
|
+
_path_params: Dict[str, str] = {}
|
506
|
+
_query_params: List[Tuple[str, str]] = []
|
507
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
508
|
+
_form_params: List[Tuple[str, str]] = []
|
509
|
+
_files: Dict[
|
510
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
511
|
+
] = {}
|
512
|
+
_body_params: Optional[bytes] = None
|
513
|
+
|
514
|
+
# process the path parameters
|
515
|
+
# process the query parameters
|
516
|
+
# process the header parameters
|
517
|
+
# process the form parameters
|
518
|
+
# process the body parameter
|
519
|
+
|
520
|
+
# set the HTTP header `Accept`
|
521
|
+
if "Accept" not in _header_params:
|
522
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
523
|
+
["application/json"]
|
524
|
+
)
|
525
|
+
|
526
|
+
# authentication setting
|
527
|
+
_auth_settings: List[str] = ["HTTPBearer"]
|
528
|
+
|
529
|
+
return self.api_client.param_serialize(
|
530
|
+
method="GET",
|
531
|
+
resource_path="/payments/history",
|
532
|
+
path_params=_path_params,
|
533
|
+
query_params=_query_params,
|
534
|
+
header_params=_header_params,
|
535
|
+
body=_body_params,
|
536
|
+
post_params=_form_params,
|
537
|
+
files=_files,
|
538
|
+
auth_settings=_auth_settings,
|
539
|
+
collection_formats=_collection_formats,
|
540
|
+
_host=_host,
|
541
|
+
_request_auth=_request_auth,
|
542
|
+
)
|
543
|
+
|
544
|
+
@validate_call
|
545
|
+
async def get_subscriptions(
|
546
|
+
self,
|
547
|
+
user_id: Optional[StrictStr] = None,
|
548
|
+
access_token: Optional[StrictStr] = None,
|
549
|
+
_request_timeout: Union[
|
550
|
+
None,
|
551
|
+
Annotated[StrictFloat, Field(gt=0)],
|
552
|
+
Tuple[
|
553
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
554
|
+
],
|
555
|
+
] = None,
|
556
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
557
|
+
_content_type: Optional[StrictStr] = None,
|
558
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
559
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
560
|
+
) -> List[ProductSubsModel]:
|
561
|
+
"""Get Subscriptions
|
562
|
+
|
563
|
+
|
564
|
+
:param user_id:
|
565
|
+
:type user_id: str
|
566
|
+
:param access_token:
|
567
|
+
:type access_token: str
|
568
|
+
:param _request_timeout: timeout setting for this request. If one
|
569
|
+
number provided, it will be total request
|
570
|
+
timeout. It can also be a pair (tuple) of
|
571
|
+
(connection, read) timeouts.
|
572
|
+
:type _request_timeout: int, tuple(int, int), optional
|
573
|
+
:param _request_auth: set to override the auth_settings for an a single
|
574
|
+
request; this effectively ignores the
|
575
|
+
authentication in the spec for a single request.
|
576
|
+
:type _request_auth: dict, optional
|
577
|
+
:param _content_type: force content-type for the request.
|
578
|
+
:type _content_type: str, Optional
|
579
|
+
:param _headers: set to override the headers for a single
|
580
|
+
request; this effectively ignores the headers
|
581
|
+
in the spec for a single request.
|
582
|
+
:type _headers: dict, optional
|
583
|
+
:param _host_index: set to override the host_index for a single
|
584
|
+
request; this effectively ignores the host_index
|
585
|
+
in the spec for a single request.
|
586
|
+
:type _host_index: int, optional
|
587
|
+
:return: Returns the result object.
|
588
|
+
""" # noqa: E501
|
589
|
+
|
590
|
+
_param = self._get_subscriptions_serialize(
|
591
|
+
user_id=user_id,
|
592
|
+
access_token=access_token,
|
593
|
+
_request_auth=_request_auth,
|
594
|
+
_content_type=_content_type,
|
595
|
+
_headers=_headers,
|
596
|
+
_host_index=_host_index,
|
597
|
+
)
|
598
|
+
|
599
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
600
|
+
"200": "List[ProductSubsModel]",
|
601
|
+
"422": "HTTPValidationError",
|
602
|
+
}
|
603
|
+
response_data = await self.api_client.call_api(
|
604
|
+
*_param, _request_timeout=_request_timeout
|
605
|
+
)
|
606
|
+
await response_data.read()
|
607
|
+
return self.api_client.response_deserialize(
|
608
|
+
response_data=response_data,
|
609
|
+
response_types_map=_response_types_map,
|
610
|
+
).data
|
611
|
+
|
612
|
+
@validate_call
|
613
|
+
async def get_subscriptions_with_http_info(
|
614
|
+
self,
|
615
|
+
user_id: Optional[StrictStr] = None,
|
616
|
+
access_token: Optional[StrictStr] = None,
|
617
|
+
_request_timeout: Union[
|
618
|
+
None,
|
619
|
+
Annotated[StrictFloat, Field(gt=0)],
|
620
|
+
Tuple[
|
621
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
622
|
+
],
|
623
|
+
] = None,
|
624
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
625
|
+
_content_type: Optional[StrictStr] = None,
|
626
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
627
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
628
|
+
) -> ApiResponse[List[ProductSubsModel]]:
|
629
|
+
"""Get Subscriptions
|
630
|
+
|
631
|
+
|
632
|
+
:param user_id:
|
633
|
+
:type user_id: str
|
634
|
+
:param access_token:
|
635
|
+
:type access_token: str
|
636
|
+
:param _request_timeout: timeout setting for this request. If one
|
637
|
+
number provided, it will be total request
|
638
|
+
timeout. It can also be a pair (tuple) of
|
639
|
+
(connection, read) timeouts.
|
640
|
+
:type _request_timeout: int, tuple(int, int), optional
|
641
|
+
:param _request_auth: set to override the auth_settings for an a single
|
642
|
+
request; this effectively ignores the
|
643
|
+
authentication in the spec for a single request.
|
644
|
+
:type _request_auth: dict, optional
|
645
|
+
:param _content_type: force content-type for the request.
|
646
|
+
:type _content_type: str, Optional
|
647
|
+
:param _headers: set to override the headers for a single
|
648
|
+
request; this effectively ignores the headers
|
649
|
+
in the spec for a single request.
|
650
|
+
:type _headers: dict, optional
|
651
|
+
:param _host_index: set to override the host_index for a single
|
652
|
+
request; this effectively ignores the host_index
|
653
|
+
in the spec for a single request.
|
654
|
+
:type _host_index: int, optional
|
655
|
+
:return: Returns the result object.
|
656
|
+
""" # noqa: E501
|
657
|
+
|
658
|
+
_param = self._get_subscriptions_serialize(
|
659
|
+
user_id=user_id,
|
660
|
+
access_token=access_token,
|
661
|
+
_request_auth=_request_auth,
|
662
|
+
_content_type=_content_type,
|
663
|
+
_headers=_headers,
|
664
|
+
_host_index=_host_index,
|
665
|
+
)
|
666
|
+
|
667
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
668
|
+
"200": "List[ProductSubsModel]",
|
669
|
+
"422": "HTTPValidationError",
|
670
|
+
}
|
671
|
+
response_data = await self.api_client.call_api(
|
672
|
+
*_param, _request_timeout=_request_timeout
|
673
|
+
)
|
674
|
+
await response_data.read()
|
675
|
+
return self.api_client.response_deserialize(
|
676
|
+
response_data=response_data,
|
677
|
+
response_types_map=_response_types_map,
|
678
|
+
)
|
679
|
+
|
680
|
+
@validate_call
|
681
|
+
async def get_subscriptions_without_preload_content(
|
682
|
+
self,
|
683
|
+
user_id: Optional[StrictStr] = None,
|
684
|
+
access_token: Optional[StrictStr] = None,
|
685
|
+
_request_timeout: Union[
|
686
|
+
None,
|
687
|
+
Annotated[StrictFloat, Field(gt=0)],
|
688
|
+
Tuple[
|
689
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
690
|
+
],
|
691
|
+
] = None,
|
692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
693
|
+
_content_type: Optional[StrictStr] = None,
|
694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
696
|
+
) -> RESTResponseType:
|
697
|
+
"""Get Subscriptions
|
698
|
+
|
699
|
+
|
700
|
+
:param user_id:
|
701
|
+
:type user_id: str
|
702
|
+
:param access_token:
|
703
|
+
:type access_token: str
|
704
|
+
:param _request_timeout: timeout setting for this request. If one
|
705
|
+
number provided, it will be total request
|
706
|
+
timeout. It can also be a pair (tuple) of
|
707
|
+
(connection, read) timeouts.
|
708
|
+
:type _request_timeout: int, tuple(int, int), optional
|
709
|
+
:param _request_auth: set to override the auth_settings for an a single
|
710
|
+
request; this effectively ignores the
|
711
|
+
authentication in the spec for a single request.
|
712
|
+
:type _request_auth: dict, optional
|
713
|
+
:param _content_type: force content-type for the request.
|
714
|
+
:type _content_type: str, Optional
|
715
|
+
:param _headers: set to override the headers for a single
|
716
|
+
request; this effectively ignores the headers
|
717
|
+
in the spec for a single request.
|
718
|
+
:type _headers: dict, optional
|
719
|
+
:param _host_index: set to override the host_index for a single
|
720
|
+
request; this effectively ignores the host_index
|
721
|
+
in the spec for a single request.
|
722
|
+
:type _host_index: int, optional
|
723
|
+
:return: Returns the result object.
|
724
|
+
""" # noqa: E501
|
725
|
+
|
726
|
+
_param = self._get_subscriptions_serialize(
|
727
|
+
user_id=user_id,
|
728
|
+
access_token=access_token,
|
729
|
+
_request_auth=_request_auth,
|
730
|
+
_content_type=_content_type,
|
731
|
+
_headers=_headers,
|
732
|
+
_host_index=_host_index,
|
733
|
+
)
|
734
|
+
|
735
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
736
|
+
"200": "List[ProductSubsModel]",
|
737
|
+
"422": "HTTPValidationError",
|
738
|
+
}
|
739
|
+
response_data = await self.api_client.call_api(
|
740
|
+
*_param, _request_timeout=_request_timeout
|
741
|
+
)
|
742
|
+
return response_data.response
|
743
|
+
|
744
|
+
def _get_subscriptions_serialize(
|
745
|
+
self,
|
746
|
+
user_id,
|
747
|
+
access_token,
|
748
|
+
_request_auth,
|
749
|
+
_content_type,
|
750
|
+
_headers,
|
751
|
+
_host_index,
|
752
|
+
) -> RequestSerialized:
|
753
|
+
|
754
|
+
_host = None
|
755
|
+
|
756
|
+
_collection_formats: Dict[str, str] = {}
|
757
|
+
|
758
|
+
_path_params: Dict[str, str] = {}
|
759
|
+
_query_params: List[Tuple[str, str]] = []
|
760
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
761
|
+
_form_params: List[Tuple[str, str]] = []
|
762
|
+
_files: Dict[
|
763
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
764
|
+
] = {}
|
765
|
+
_body_params: Optional[bytes] = None
|
766
|
+
|
767
|
+
# process the path parameters
|
768
|
+
# process the query parameters
|
769
|
+
if user_id is not None:
|
770
|
+
|
771
|
+
_query_params.append(("user_id", user_id))
|
772
|
+
|
773
|
+
# process the header parameters
|
774
|
+
# process the form parameters
|
775
|
+
# process the body parameter
|
776
|
+
|
777
|
+
# set the HTTP header `Accept`
|
778
|
+
if "Accept" not in _header_params:
|
779
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
780
|
+
["application/json"]
|
781
|
+
)
|
782
|
+
|
783
|
+
# authentication setting
|
784
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
785
|
+
|
786
|
+
return self.api_client.param_serialize(
|
787
|
+
method="GET",
|
788
|
+
resource_path="/payments/subscriptions",
|
789
|
+
path_params=_path_params,
|
790
|
+
query_params=_query_params,
|
791
|
+
header_params=_header_params,
|
792
|
+
body=_body_params,
|
793
|
+
post_params=_form_params,
|
794
|
+
files=_files,
|
795
|
+
auth_settings=_auth_settings,
|
796
|
+
collection_formats=_collection_formats,
|
797
|
+
_host=_host,
|
798
|
+
_request_auth=_request_auth,
|
799
|
+
)
|