ha-sdk-python 1.0.10__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.
- ha_sdk_python/__init__.py +490 -0
- ha_sdk_python/api/__init__.py +15 -0
- ha_sdk_python/api/backups_api.py +2434 -0
- ha_sdk_python/api/console_access_api.py +334 -0
- ha_sdk_python/api/dns_api.py +896 -0
- ha_sdk_python/api/firewall_api.py +1534 -0
- ha_sdk_python/api/monitoring_api.py +1234 -0
- ha_sdk_python/api/power_management_api.py +2434 -0
- ha_sdk_python/api/security_api.py +1243 -0
- ha_sdk_python/api/service_management_api.py +1797 -0
- ha_sdk_python/api/snapshots_api.py +1534 -0
- ha_sdk_python/api/user_management_api.py +331 -0
- ha_sdk_python/api/vps_management_api.py +2399 -0
- ha_sdk_python/api_client.py +805 -0
- ha_sdk_python/api_response.py +21 -0
- ha_sdk_python/configuration.py +593 -0
- ha_sdk_python/exceptions.py +218 -0
- ha_sdk_python/models/__init__.py +227 -0
- ha_sdk_python/models/backup_create_response_data.py +97 -0
- ha_sdk_python/models/backup_creation_info.py +95 -0
- ha_sdk_python/models/backup_item.py +95 -0
- ha_sdk_python/models/backup_mode.py +89 -0
- ha_sdk_python/models/backup_mode_type.py +38 -0
- ha_sdk_python/models/backup_schedule.py +98 -0
- ha_sdk_python/models/backup_schedule_list_response_data.py +97 -0
- ha_sdk_python/models/bad_request_error_response_content.py +89 -0
- ha_sdk_python/models/billing_cycle.py +37 -0
- ha_sdk_python/models/cancel_vps_request_content.py +90 -0
- ha_sdk_python/models/cancel_vps_response_content.py +94 -0
- ha_sdk_python/models/catalogue_config_option.py +105 -0
- ha_sdk_python/models/catalogue_config_suboption.py +96 -0
- ha_sdk_python/models/catalogue_currency.py +91 -0
- ha_sdk_python/models/catalogue_data.py +107 -0
- ha_sdk_python/models/catalogue_group.py +99 -0
- ha_sdk_python/models/catalogue_plan.py +108 -0
- ha_sdk_python/models/catalogue_product.py +131 -0
- ha_sdk_python/models/change_password_request_content.py +90 -0
- ha_sdk_python/models/change_password_response_content.py +94 -0
- ha_sdk_python/models/compression_method.py +89 -0
- ha_sdk_python/models/compression_type.py +39 -0
- ha_sdk_python/models/create_backup_request_content.py +93 -0
- ha_sdk_python/models/create_backup_response_content.py +94 -0
- ha_sdk_python/models/create_backup_schedule_request_content.py +108 -0
- ha_sdk_python/models/create_backup_schedule_response_content.py +94 -0
- ha_sdk_python/models/create_firewall_rule_request_content.py +115 -0
- ha_sdk_python/models/create_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/create_notification_request_content.py +111 -0
- ha_sdk_python/models/create_notification_response_content.py +94 -0
- ha_sdk_python/models/create_order_domain_item.py +101 -0
- ha_sdk_python/models/create_order_items.py +105 -0
- ha_sdk_python/models/create_order_product.py +108 -0
- ha_sdk_python/models/create_order_product_item.py +101 -0
- ha_sdk_python/models/create_order_request_content.py +97 -0
- ha_sdk_python/models/create_order_response_content.py +94 -0
- ha_sdk_python/models/create_order_response_data.py +126 -0
- ha_sdk_python/models/create_order_total.py +91 -0
- ha_sdk_python/models/create_power_task_request_content.py +160 -0
- ha_sdk_python/models/create_power_task_response_content.py +94 -0
- ha_sdk_python/models/create_rdns_record_request_content.py +96 -0
- ha_sdk_python/models/create_rdns_record_response_content.py +94 -0
- ha_sdk_python/models/create_rdns_record_response_data.py +91 -0
- ha_sdk_python/models/create_snapshot_request_content.py +91 -0
- ha_sdk_python/models/create_snapshot_response_content.py +94 -0
- ha_sdk_python/models/day_of_week.py +42 -0
- ha_sdk_python/models/delete_backup_request_content.py +89 -0
- ha_sdk_python/models/delete_backup_response_content.py +94 -0
- ha_sdk_python/models/delete_backup_schedule_request_content.py +89 -0
- ha_sdk_python/models/delete_backup_schedule_response_content.py +94 -0
- ha_sdk_python/models/delete_firewall_rule_request_content.py +89 -0
- ha_sdk_python/models/delete_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/delete_notification_request_content.py +89 -0
- ha_sdk_python/models/delete_notification_response_content.py +94 -0
- ha_sdk_python/models/delete_power_task_request_content.py +89 -0
- ha_sdk_python/models/delete_power_task_response_content.py +94 -0
- ha_sdk_python/models/delete_rdns_record_request_content.py +88 -0
- ha_sdk_python/models/delete_rdns_record_response_content.py +94 -0
- ha_sdk_python/models/delete_snapshot_request_content.py +89 -0
- ha_sdk_python/models/delete_snapshot_response_content.py +94 -0
- ha_sdk_python/models/edit_backup_schedule_request_content.py +110 -0
- ha_sdk_python/models/edit_backup_schedule_response_content.py +94 -0
- ha_sdk_python/models/firewall_list_response_data.py +125 -0
- ha_sdk_python/models/firewall_move_direction.py +39 -0
- ha_sdk_python/models/firewall_move_response_data.py +91 -0
- ha_sdk_python/models/firewall_option.py +89 -0
- ha_sdk_python/models/firewall_rule.py +113 -0
- ha_sdk_python/models/firewall_rule_action.py +38 -0
- ha_sdk_python/models/firewall_rule_type.py +38 -0
- ha_sdk_python/models/forbidden_error_response_content.py +89 -0
- ha_sdk_python/models/get_catalogue_request_content.py +89 -0
- ha_sdk_python/models/get_catalogue_response_content.py +94 -0
- ha_sdk_python/models/get_no_vnc_console_request_content.py +87 -0
- ha_sdk_python/models/get_no_vnc_console_response_content.py +94 -0
- ha_sdk_python/models/get_private_ssh_key_request_content.py +87 -0
- ha_sdk_python/models/get_private_ssh_key_response_content.py +94 -0
- ha_sdk_python/models/get_public_ssh_key_request_content.py +87 -0
- ha_sdk_python/models/get_public_ssh_key_response_content.py +94 -0
- ha_sdk_python/models/get_vps_config_request_content.py +87 -0
- ha_sdk_python/models/get_vps_config_response_content.py +94 -0
- ha_sdk_python/models/get_vps_details_request_content.py +87 -0
- ha_sdk_python/models/get_vps_details_response_content.py +94 -0
- ha_sdk_python/models/internal_service_error_response_content.py +89 -0
- ha_sdk_python/models/invalid_state_error_response_content.py +89 -0
- ha_sdk_python/models/list_backup_schedules_request_content.py +87 -0
- ha_sdk_python/models/list_backup_schedules_response_content.py +94 -0
- ha_sdk_python/models/list_backups_request_content.py +87 -0
- ha_sdk_python/models/list_backups_response_content.py +94 -0
- ha_sdk_python/models/list_firewall_rules_request_content.py +87 -0
- ha_sdk_python/models/list_firewall_rules_response_content.py +94 -0
- ha_sdk_python/models/list_isos_request_content.py +87 -0
- ha_sdk_python/models/list_isos_response_content.py +94 -0
- ha_sdk_python/models/list_isos_response_data.py +89 -0
- ha_sdk_python/models/list_notifications_request_content.py +87 -0
- ha_sdk_python/models/list_notifications_response_content.py +94 -0
- ha_sdk_python/models/list_orders_response_content.py +94 -0
- ha_sdk_python/models/list_orders_response_data.py +95 -0
- ha_sdk_python/models/list_power_tasks_request_content.py +87 -0
- ha_sdk_python/models/list_power_tasks_response_content.py +94 -0
- ha_sdk_python/models/list_rdns_records_response_content.py +94 -0
- ha_sdk_python/models/list_rdns_response_data.py +115 -0
- ha_sdk_python/models/list_reinstall_os_request_content.py +87 -0
- ha_sdk_python/models/list_reinstall_os_response_content.py +94 -0
- ha_sdk_python/models/list_reinstall_os_response_data.py +89 -0
- ha_sdk_python/models/list_snapshots_request_content.py +87 -0
- ha_sdk_python/models/list_snapshots_response_content.py +94 -0
- ha_sdk_python/models/list_vps_services_data.py +95 -0
- ha_sdk_python/models/list_vps_services_response_content.py +94 -0
- ha_sdk_python/models/mount_iso_request_content.py +91 -0
- ha_sdk_python/models/mount_iso_response_content.py +94 -0
- ha_sdk_python/models/move_firewall_rule_request_content.py +94 -0
- ha_sdk_python/models/move_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/no_vnc_console_details.py +95 -0
- ha_sdk_python/models/no_vnc_console_response_data.py +93 -0
- ha_sdk_python/models/notification.py +105 -0
- ha_sdk_python/models/notification_create_response_data.py +93 -0
- ha_sdk_python/models/notification_dialog_rules.py +95 -0
- ha_sdk_python/models/notification_list_response_data.py +103 -0
- ha_sdk_python/models/notification_status.py +43 -0
- ha_sdk_python/models/operation_status.py +37 -0
- ha_sdk_python/models/order.py +109 -0
- ha_sdk_python/models/order_last_attempt.py +93 -0
- ha_sdk_python/models/order_warning.py +89 -0
- ha_sdk_python/models/payment_error.py +89 -0
- ha_sdk_python/models/payment_status.py +38 -0
- ha_sdk_python/models/power_task.py +105 -0
- ha_sdk_python/models/power_task_action.py +38 -0
- ha_sdk_python/models/power_task_create_response_data.py +93 -0
- ha_sdk_python/models/power_task_dialog_rules.py +95 -0
- ha_sdk_python/models/power_task_job_type.py +38 -0
- ha_sdk_python/models/power_task_list_response_data.py +107 -0
- ha_sdk_python/models/public_ssh_key_response_data.py +93 -0
- ha_sdk_python/models/rdns_available_item.py +111 -0
- ha_sdk_python/models/rdns_pool.py +89 -0
- ha_sdk_python/models/rdns_record.py +109 -0
- ha_sdk_python/models/reboot_vps_request_content.py +87 -0
- ha_sdk_python/models/reboot_vps_response_content.py +94 -0
- ha_sdk_python/models/resource_not_found_error_response_content.py +89 -0
- ha_sdk_python/models/restore_backup_request_content.py +89 -0
- ha_sdk_python/models/restore_backup_response_content.py +94 -0
- ha_sdk_python/models/retry_payment_request_content.py +89 -0
- ha_sdk_python/models/retry_payment_response_content.py +94 -0
- ha_sdk_python/models/retry_payment_response_data.py +98 -0
- ha_sdk_python/models/retry_payment_total.py +91 -0
- ha_sdk_python/models/rollback_snapshot_request_content.py +89 -0
- ha_sdk_python/models/rollback_snapshot_response_content.py +94 -0
- ha_sdk_python/models/service_backups_response_data.py +131 -0
- ha_sdk_python/models/service_snapshots_response_data.py +101 -0
- ha_sdk_python/models/service_unavailable_error_response_content.py +89 -0
- ha_sdk_python/models/shutdown_vps_request_content.py +87 -0
- ha_sdk_python/models/shutdown_vps_response_content.py +94 -0
- ha_sdk_python/models/snapshot_create_response_data.py +89 -0
- ha_sdk_python/models/snapshot_item.py +95 -0
- ha_sdk_python/models/ssh_key_details.py +89 -0
- ha_sdk_python/models/start_vps_request_content.py +87 -0
- ha_sdk_python/models/start_vps_response_content.py +94 -0
- ha_sdk_python/models/stop_vps_request_content.py +87 -0
- ha_sdk_python/models/stop_vps_response_content.py +94 -0
- ha_sdk_python/models/too_many_requests_error_response_content.py +89 -0
- ha_sdk_python/models/trigger_reinstall_request_content.py +89 -0
- ha_sdk_python/models/trigger_reinstall_response_content.py +94 -0
- ha_sdk_python/models/trigger_reinstall_response_data.py +89 -0
- ha_sdk_python/models/unauthorized_error_response_content.py +89 -0
- ha_sdk_python/models/update_firewall_rule_request_content.py +94 -0
- ha_sdk_python/models/update_firewall_rule_response_content.py +94 -0
- ha_sdk_python/models/update_notification_request_content.py +113 -0
- ha_sdk_python/models/update_notification_response_content.py +94 -0
- ha_sdk_python/models/update_power_task_request_content.py +164 -0
- ha_sdk_python/models/update_power_task_response_content.py +94 -0
- ha_sdk_python/models/update_snapshot_request_content.py +91 -0
- ha_sdk_python/models/update_snapshot_response_content.py +94 -0
- ha_sdk_python/models/update_ssh_keys_request_content.py +97 -0
- ha_sdk_python/models/update_ssh_keys_response_content.py +94 -0
- ha_sdk_python/models/update_vps_config_request_content.py +99 -0
- ha_sdk_python/models/update_vps_config_response_content.py +94 -0
- ha_sdk_python/models/user_change_password_details.py +91 -0
- ha_sdk_python/models/user_change_password_request_content.py +92 -0
- ha_sdk_python/models/user_change_password_response_content.py +94 -0
- ha_sdk_python/models/user_change_password_response_data.py +95 -0
- ha_sdk_python/models/validate_pricing_base.py +89 -0
- ha_sdk_python/models/validate_pricing_breakdown.py +103 -0
- ha_sdk_python/models/validate_pricing_config_item.py +116 -0
- ha_sdk_python/models/validate_pricing_currency.py +93 -0
- ha_sdk_python/models/validate_pricing_discount.py +97 -0
- ha_sdk_python/models/validate_pricing_plan_config.py +97 -0
- ha_sdk_python/models/validate_pricing_plan_pricing.py +89 -0
- ha_sdk_python/models/validate_pricing_price_range.py +91 -0
- ha_sdk_python/models/validate_pricing_product.py +101 -0
- ha_sdk_python/models/validate_pricing_product_result.py +121 -0
- ha_sdk_python/models/validate_pricing_prorata.py +95 -0
- ha_sdk_python/models/validate_pricing_request_content.py +97 -0
- ha_sdk_python/models/validate_pricing_response_content.py +94 -0
- ha_sdk_python/models/validate_pricing_response_data.py +109 -0
- ha_sdk_python/models/validate_pricing_summary.py +101 -0
- ha_sdk_python/models/validate_pricing_summary_recurring.py +91 -0
- ha_sdk_python/models/validation_error_response_content.py +89 -0
- ha_sdk_python/models/vps_available_features.py +115 -0
- ha_sdk_python/models/vps_bandwidth_info.py +94 -0
- ha_sdk_python/models/vps_cancel_response_data.py +93 -0
- ha_sdk_python/models/vps_cancel_type.py +37 -0
- ha_sdk_python/models/vps_config_response_data.py +108 -0
- ha_sdk_python/models/vps_cpu_info.py +92 -0
- ha_sdk_python/models/vps_credentials.py +89 -0
- ha_sdk_python/models/vps_details_response.py +143 -0
- ha_sdk_python/models/vps_disk_info.py +96 -0
- ha_sdk_python/models/vps_memory_info.py +96 -0
- ha_sdk_python/models/vps_network_rate.py +92 -0
- ha_sdk_python/models/vps_os_info.py +89 -0
- ha_sdk_python/models/vps_service_info.py +97 -0
- ha_sdk_python/models/vps_simple_action_response_data.py +87 -0
- ha_sdk_python/models/vps_vm_info.py +102 -0
- ha_sdk_python/py.typed +0 -0
- ha_sdk_python/rest.py +263 -0
- ha_sdk_python/retryable_paths.py +26 -0
- ha_sdk_python-1.0.10.dist-info/METADATA +131 -0
- ha_sdk_python-1.0.10.dist-info/RECORD +237 -0
- ha_sdk_python-1.0.10.dist-info/WHEEL +5 -0
- ha_sdk_python-1.0.10.dist-info/licenses/LICENSE +21 -0
- ha_sdk_python-1.0.10.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1797 @@
|
|
|
1
|
+
"""
|
|
2
|
+
HostAfricaApi
|
|
3
|
+
|
|
4
|
+
HostAfrica API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-01-01
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
from ha_sdk_python.models.cancel_vps_request_content import CancelVpsRequestContent
|
|
20
|
+
from ha_sdk_python.models.cancel_vps_response_content import CancelVpsResponseContent
|
|
21
|
+
from ha_sdk_python.models.create_order_request_content import CreateOrderRequestContent
|
|
22
|
+
from ha_sdk_python.models.create_order_response_content import CreateOrderResponseContent
|
|
23
|
+
from ha_sdk_python.models.get_catalogue_request_content import GetCatalogueRequestContent
|
|
24
|
+
from ha_sdk_python.models.get_catalogue_response_content import GetCatalogueResponseContent
|
|
25
|
+
from ha_sdk_python.models.list_orders_response_content import ListOrdersResponseContent
|
|
26
|
+
from ha_sdk_python.models.retry_payment_request_content import RetryPaymentRequestContent
|
|
27
|
+
from ha_sdk_python.models.retry_payment_response_content import RetryPaymentResponseContent
|
|
28
|
+
from ha_sdk_python.models.validate_pricing_request_content import ValidatePricingRequestContent
|
|
29
|
+
from ha_sdk_python.models.validate_pricing_response_content import ValidatePricingResponseContent
|
|
30
|
+
|
|
31
|
+
from ha_sdk_python.api_client import ApiClient, RequestSerialized
|
|
32
|
+
from ha_sdk_python.api_response import ApiResponse
|
|
33
|
+
from ha_sdk_python.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class ServiceManagementApi:
|
|
37
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
38
|
+
Ref: https://openapi-generator.tech
|
|
39
|
+
|
|
40
|
+
Do not edit the class manually.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, api_client=None) -> None:
|
|
44
|
+
if api_client is None:
|
|
45
|
+
api_client = ApiClient.get_default()
|
|
46
|
+
self.api_client = api_client
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def cancel_vps(
|
|
51
|
+
self,
|
|
52
|
+
cancel_vps_request_content: CancelVpsRequestContent,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> CancelVpsResponseContent:
|
|
66
|
+
"""cancel_vps
|
|
67
|
+
|
|
68
|
+
Cancels a VPS service through WHMCS. This action is irreversible
|
|
69
|
+
|
|
70
|
+
:param cancel_vps_request_content: (required)
|
|
71
|
+
:type cancel_vps_request_content: CancelVpsRequestContent
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._cancel_vps_serialize(
|
|
95
|
+
cancel_vps_request_content=cancel_vps_request_content,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'200': "CancelVpsResponseContent",
|
|
104
|
+
'400': "BadRequestErrorResponseContent",
|
|
105
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
106
|
+
'403': "ForbiddenErrorResponseContent",
|
|
107
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
108
|
+
'409': "InvalidStateErrorResponseContent",
|
|
109
|
+
'422': "ValidationErrorResponseContent",
|
|
110
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
111
|
+
'500': "InternalServiceErrorResponseContent",
|
|
112
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
113
|
+
}
|
|
114
|
+
response_data = self.api_client.call_api(
|
|
115
|
+
*_param,
|
|
116
|
+
_request_timeout=_request_timeout
|
|
117
|
+
)
|
|
118
|
+
response_data.read()
|
|
119
|
+
return self.api_client.response_deserialize(
|
|
120
|
+
response_data=response_data,
|
|
121
|
+
response_types_map=_response_types_map,
|
|
122
|
+
).data
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@validate_call
|
|
126
|
+
def cancel_vps_with_http_info(
|
|
127
|
+
self,
|
|
128
|
+
cancel_vps_request_content: CancelVpsRequestContent,
|
|
129
|
+
_request_timeout: Union[
|
|
130
|
+
None,
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Tuple[
|
|
133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
135
|
+
]
|
|
136
|
+
] = None,
|
|
137
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_content_type: Optional[StrictStr] = None,
|
|
139
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
140
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
141
|
+
) -> ApiResponse[CancelVpsResponseContent]:
|
|
142
|
+
"""cancel_vps
|
|
143
|
+
|
|
144
|
+
Cancels a VPS service through WHMCS. This action is irreversible
|
|
145
|
+
|
|
146
|
+
:param cancel_vps_request_content: (required)
|
|
147
|
+
:type cancel_vps_request_content: CancelVpsRequestContent
|
|
148
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
149
|
+
number provided, it will be total request
|
|
150
|
+
timeout. It can also be a pair (tuple) of
|
|
151
|
+
(connection, read) timeouts.
|
|
152
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
153
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
154
|
+
request; this effectively ignores the
|
|
155
|
+
authentication in the spec for a single request.
|
|
156
|
+
:type _request_auth: dict, optional
|
|
157
|
+
:param _content_type: force content-type for the request.
|
|
158
|
+
:type _content_type: str, Optional
|
|
159
|
+
:param _headers: set to override the headers for a single
|
|
160
|
+
request; this effectively ignores the headers
|
|
161
|
+
in the spec for a single request.
|
|
162
|
+
:type _headers: dict, optional
|
|
163
|
+
:param _host_index: set to override the host_index for a single
|
|
164
|
+
request; this effectively ignores the host_index
|
|
165
|
+
in the spec for a single request.
|
|
166
|
+
:type _host_index: int, optional
|
|
167
|
+
:return: Returns the result object.
|
|
168
|
+
""" # noqa: E501
|
|
169
|
+
|
|
170
|
+
_param = self._cancel_vps_serialize(
|
|
171
|
+
cancel_vps_request_content=cancel_vps_request_content,
|
|
172
|
+
_request_auth=_request_auth,
|
|
173
|
+
_content_type=_content_type,
|
|
174
|
+
_headers=_headers,
|
|
175
|
+
_host_index=_host_index
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
179
|
+
'200': "CancelVpsResponseContent",
|
|
180
|
+
'400': "BadRequestErrorResponseContent",
|
|
181
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
182
|
+
'403': "ForbiddenErrorResponseContent",
|
|
183
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
184
|
+
'409': "InvalidStateErrorResponseContent",
|
|
185
|
+
'422': "ValidationErrorResponseContent",
|
|
186
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
187
|
+
'500': "InternalServiceErrorResponseContent",
|
|
188
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
189
|
+
}
|
|
190
|
+
response_data = self.api_client.call_api(
|
|
191
|
+
*_param,
|
|
192
|
+
_request_timeout=_request_timeout
|
|
193
|
+
)
|
|
194
|
+
response_data.read()
|
|
195
|
+
return self.api_client.response_deserialize(
|
|
196
|
+
response_data=response_data,
|
|
197
|
+
response_types_map=_response_types_map,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
@validate_call
|
|
202
|
+
def cancel_vps_without_preload_content(
|
|
203
|
+
self,
|
|
204
|
+
cancel_vps_request_content: CancelVpsRequestContent,
|
|
205
|
+
_request_timeout: Union[
|
|
206
|
+
None,
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
208
|
+
Tuple[
|
|
209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
211
|
+
]
|
|
212
|
+
] = None,
|
|
213
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
214
|
+
_content_type: Optional[StrictStr] = None,
|
|
215
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
216
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
217
|
+
) -> RESTResponseType:
|
|
218
|
+
"""cancel_vps
|
|
219
|
+
|
|
220
|
+
Cancels a VPS service through WHMCS. This action is irreversible
|
|
221
|
+
|
|
222
|
+
:param cancel_vps_request_content: (required)
|
|
223
|
+
:type cancel_vps_request_content: CancelVpsRequestContent
|
|
224
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
225
|
+
number provided, it will be total request
|
|
226
|
+
timeout. It can also be a pair (tuple) of
|
|
227
|
+
(connection, read) timeouts.
|
|
228
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
229
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
230
|
+
request; this effectively ignores the
|
|
231
|
+
authentication in the spec for a single request.
|
|
232
|
+
:type _request_auth: dict, optional
|
|
233
|
+
:param _content_type: force content-type for the request.
|
|
234
|
+
:type _content_type: str, Optional
|
|
235
|
+
:param _headers: set to override the headers for a single
|
|
236
|
+
request; this effectively ignores the headers
|
|
237
|
+
in the spec for a single request.
|
|
238
|
+
:type _headers: dict, optional
|
|
239
|
+
:param _host_index: set to override the host_index for a single
|
|
240
|
+
request; this effectively ignores the host_index
|
|
241
|
+
in the spec for a single request.
|
|
242
|
+
:type _host_index: int, optional
|
|
243
|
+
:return: Returns the result object.
|
|
244
|
+
""" # noqa: E501
|
|
245
|
+
|
|
246
|
+
_param = self._cancel_vps_serialize(
|
|
247
|
+
cancel_vps_request_content=cancel_vps_request_content,
|
|
248
|
+
_request_auth=_request_auth,
|
|
249
|
+
_content_type=_content_type,
|
|
250
|
+
_headers=_headers,
|
|
251
|
+
_host_index=_host_index
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
255
|
+
'200': "CancelVpsResponseContent",
|
|
256
|
+
'400': "BadRequestErrorResponseContent",
|
|
257
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
258
|
+
'403': "ForbiddenErrorResponseContent",
|
|
259
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
260
|
+
'409': "InvalidStateErrorResponseContent",
|
|
261
|
+
'422': "ValidationErrorResponseContent",
|
|
262
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
263
|
+
'500': "InternalServiceErrorResponseContent",
|
|
264
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
265
|
+
}
|
|
266
|
+
response_data = self.api_client.call_api(
|
|
267
|
+
*_param,
|
|
268
|
+
_request_timeout=_request_timeout
|
|
269
|
+
)
|
|
270
|
+
return response_data.response
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def _cancel_vps_serialize(
|
|
274
|
+
self,
|
|
275
|
+
cancel_vps_request_content,
|
|
276
|
+
_request_auth,
|
|
277
|
+
_content_type,
|
|
278
|
+
_headers,
|
|
279
|
+
_host_index,
|
|
280
|
+
) -> RequestSerialized:
|
|
281
|
+
|
|
282
|
+
_host = None
|
|
283
|
+
|
|
284
|
+
_collection_formats: Dict[str, str] = {
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
_path_params: Dict[str, str] = {}
|
|
288
|
+
_query_params: List[Tuple[str, str]] = []
|
|
289
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
290
|
+
_form_params: List[Tuple[str, str]] = []
|
|
291
|
+
_files: Dict[
|
|
292
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
293
|
+
] = {}
|
|
294
|
+
_body_params: Optional[bytes] = None
|
|
295
|
+
|
|
296
|
+
# process the path parameters
|
|
297
|
+
# process the query parameters
|
|
298
|
+
# process the header parameters
|
|
299
|
+
# process the form parameters
|
|
300
|
+
# process the body parameter
|
|
301
|
+
if cancel_vps_request_content is not None:
|
|
302
|
+
_body_params = cancel_vps_request_content
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
# set the HTTP header `Accept`
|
|
306
|
+
if 'Accept' not in _header_params:
|
|
307
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
308
|
+
[
|
|
309
|
+
'application/json'
|
|
310
|
+
]
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
# set the HTTP header `Content-Type`
|
|
314
|
+
if _content_type:
|
|
315
|
+
_header_params['Content-Type'] = _content_type
|
|
316
|
+
else:
|
|
317
|
+
_default_content_type = (
|
|
318
|
+
self.api_client.select_header_content_type(
|
|
319
|
+
[
|
|
320
|
+
'application/json'
|
|
321
|
+
]
|
|
322
|
+
)
|
|
323
|
+
)
|
|
324
|
+
if _default_content_type is not None:
|
|
325
|
+
_header_params['Content-Type'] = _default_content_type
|
|
326
|
+
|
|
327
|
+
# authentication setting
|
|
328
|
+
_auth_settings: List[str] = [
|
|
329
|
+
'BearerAuth'
|
|
330
|
+
]
|
|
331
|
+
|
|
332
|
+
return self.api_client.param_serialize(
|
|
333
|
+
method='POST',
|
|
334
|
+
resource_path='/vps/cancel',
|
|
335
|
+
path_params=_path_params,
|
|
336
|
+
query_params=_query_params,
|
|
337
|
+
header_params=_header_params,
|
|
338
|
+
body=_body_params,
|
|
339
|
+
post_params=_form_params,
|
|
340
|
+
files=_files,
|
|
341
|
+
auth_settings=_auth_settings,
|
|
342
|
+
collection_formats=_collection_formats,
|
|
343
|
+
_host=_host,
|
|
344
|
+
_request_auth=_request_auth
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
@validate_call
|
|
351
|
+
def create_order(
|
|
352
|
+
self,
|
|
353
|
+
create_order_request_content: CreateOrderRequestContent,
|
|
354
|
+
_request_timeout: Union[
|
|
355
|
+
None,
|
|
356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
357
|
+
Tuple[
|
|
358
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
359
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
360
|
+
]
|
|
361
|
+
] = None,
|
|
362
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_content_type: Optional[StrictStr] = None,
|
|
364
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
365
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
366
|
+
) -> CreateOrderResponseContent:
|
|
367
|
+
"""create_order
|
|
368
|
+
|
|
369
|
+
Creates an order through checkout. Returns payment status; on failure also includes payment_error with code and message.
|
|
370
|
+
|
|
371
|
+
:param create_order_request_content: (required)
|
|
372
|
+
:type create_order_request_content: CreateOrderRequestContent
|
|
373
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
374
|
+
number provided, it will be total request
|
|
375
|
+
timeout. It can also be a pair (tuple) of
|
|
376
|
+
(connection, read) timeouts.
|
|
377
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
378
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
379
|
+
request; this effectively ignores the
|
|
380
|
+
authentication in the spec for a single request.
|
|
381
|
+
:type _request_auth: dict, optional
|
|
382
|
+
:param _content_type: force content-type for the request.
|
|
383
|
+
:type _content_type: str, Optional
|
|
384
|
+
:param _headers: set to override the headers for a single
|
|
385
|
+
request; this effectively ignores the headers
|
|
386
|
+
in the spec for a single request.
|
|
387
|
+
:type _headers: dict, optional
|
|
388
|
+
:param _host_index: set to override the host_index for a single
|
|
389
|
+
request; this effectively ignores the host_index
|
|
390
|
+
in the spec for a single request.
|
|
391
|
+
:type _host_index: int, optional
|
|
392
|
+
:return: Returns the result object.
|
|
393
|
+
""" # noqa: E501
|
|
394
|
+
|
|
395
|
+
_param = self._create_order_serialize(
|
|
396
|
+
create_order_request_content=create_order_request_content,
|
|
397
|
+
_request_auth=_request_auth,
|
|
398
|
+
_content_type=_content_type,
|
|
399
|
+
_headers=_headers,
|
|
400
|
+
_host_index=_host_index
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
404
|
+
'200': "CreateOrderResponseContent",
|
|
405
|
+
'400': "BadRequestErrorResponseContent",
|
|
406
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
407
|
+
'403': "ForbiddenErrorResponseContent",
|
|
408
|
+
'422': "ValidationErrorResponseContent",
|
|
409
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
410
|
+
'500': "InternalServiceErrorResponseContent",
|
|
411
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
412
|
+
}
|
|
413
|
+
response_data = self.api_client.call_api(
|
|
414
|
+
*_param,
|
|
415
|
+
_request_timeout=_request_timeout
|
|
416
|
+
)
|
|
417
|
+
response_data.read()
|
|
418
|
+
return self.api_client.response_deserialize(
|
|
419
|
+
response_data=response_data,
|
|
420
|
+
response_types_map=_response_types_map,
|
|
421
|
+
).data
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
@validate_call
|
|
425
|
+
def create_order_with_http_info(
|
|
426
|
+
self,
|
|
427
|
+
create_order_request_content: CreateOrderRequestContent,
|
|
428
|
+
_request_timeout: Union[
|
|
429
|
+
None,
|
|
430
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
431
|
+
Tuple[
|
|
432
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
433
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
434
|
+
]
|
|
435
|
+
] = None,
|
|
436
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
437
|
+
_content_type: Optional[StrictStr] = None,
|
|
438
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
439
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
440
|
+
) -> ApiResponse[CreateOrderResponseContent]:
|
|
441
|
+
"""create_order
|
|
442
|
+
|
|
443
|
+
Creates an order through checkout. Returns payment status; on failure also includes payment_error with code and message.
|
|
444
|
+
|
|
445
|
+
:param create_order_request_content: (required)
|
|
446
|
+
:type create_order_request_content: CreateOrderRequestContent
|
|
447
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
448
|
+
number provided, it will be total request
|
|
449
|
+
timeout. It can also be a pair (tuple) of
|
|
450
|
+
(connection, read) timeouts.
|
|
451
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
452
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
453
|
+
request; this effectively ignores the
|
|
454
|
+
authentication in the spec for a single request.
|
|
455
|
+
:type _request_auth: dict, optional
|
|
456
|
+
:param _content_type: force content-type for the request.
|
|
457
|
+
:type _content_type: str, Optional
|
|
458
|
+
:param _headers: set to override the headers for a single
|
|
459
|
+
request; this effectively ignores the headers
|
|
460
|
+
in the spec for a single request.
|
|
461
|
+
:type _headers: dict, optional
|
|
462
|
+
:param _host_index: set to override the host_index for a single
|
|
463
|
+
request; this effectively ignores the host_index
|
|
464
|
+
in the spec for a single request.
|
|
465
|
+
:type _host_index: int, optional
|
|
466
|
+
:return: Returns the result object.
|
|
467
|
+
""" # noqa: E501
|
|
468
|
+
|
|
469
|
+
_param = self._create_order_serialize(
|
|
470
|
+
create_order_request_content=create_order_request_content,
|
|
471
|
+
_request_auth=_request_auth,
|
|
472
|
+
_content_type=_content_type,
|
|
473
|
+
_headers=_headers,
|
|
474
|
+
_host_index=_host_index
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
478
|
+
'200': "CreateOrderResponseContent",
|
|
479
|
+
'400': "BadRequestErrorResponseContent",
|
|
480
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
481
|
+
'403': "ForbiddenErrorResponseContent",
|
|
482
|
+
'422': "ValidationErrorResponseContent",
|
|
483
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
484
|
+
'500': "InternalServiceErrorResponseContent",
|
|
485
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
486
|
+
}
|
|
487
|
+
response_data = self.api_client.call_api(
|
|
488
|
+
*_param,
|
|
489
|
+
_request_timeout=_request_timeout
|
|
490
|
+
)
|
|
491
|
+
response_data.read()
|
|
492
|
+
return self.api_client.response_deserialize(
|
|
493
|
+
response_data=response_data,
|
|
494
|
+
response_types_map=_response_types_map,
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
@validate_call
|
|
499
|
+
def create_order_without_preload_content(
|
|
500
|
+
self,
|
|
501
|
+
create_order_request_content: CreateOrderRequestContent,
|
|
502
|
+
_request_timeout: Union[
|
|
503
|
+
None,
|
|
504
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
505
|
+
Tuple[
|
|
506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
507
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
508
|
+
]
|
|
509
|
+
] = None,
|
|
510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
511
|
+
_content_type: Optional[StrictStr] = None,
|
|
512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
514
|
+
) -> RESTResponseType:
|
|
515
|
+
"""create_order
|
|
516
|
+
|
|
517
|
+
Creates an order through checkout. Returns payment status; on failure also includes payment_error with code and message.
|
|
518
|
+
|
|
519
|
+
:param create_order_request_content: (required)
|
|
520
|
+
:type create_order_request_content: CreateOrderRequestContent
|
|
521
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
522
|
+
number provided, it will be total request
|
|
523
|
+
timeout. It can also be a pair (tuple) of
|
|
524
|
+
(connection, read) timeouts.
|
|
525
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
526
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
527
|
+
request; this effectively ignores the
|
|
528
|
+
authentication in the spec for a single request.
|
|
529
|
+
:type _request_auth: dict, optional
|
|
530
|
+
:param _content_type: force content-type for the request.
|
|
531
|
+
:type _content_type: str, Optional
|
|
532
|
+
:param _headers: set to override the headers for a single
|
|
533
|
+
request; this effectively ignores the headers
|
|
534
|
+
in the spec for a single request.
|
|
535
|
+
:type _headers: dict, optional
|
|
536
|
+
:param _host_index: set to override the host_index for a single
|
|
537
|
+
request; this effectively ignores the host_index
|
|
538
|
+
in the spec for a single request.
|
|
539
|
+
:type _host_index: int, optional
|
|
540
|
+
:return: Returns the result object.
|
|
541
|
+
""" # noqa: E501
|
|
542
|
+
|
|
543
|
+
_param = self._create_order_serialize(
|
|
544
|
+
create_order_request_content=create_order_request_content,
|
|
545
|
+
_request_auth=_request_auth,
|
|
546
|
+
_content_type=_content_type,
|
|
547
|
+
_headers=_headers,
|
|
548
|
+
_host_index=_host_index
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
552
|
+
'200': "CreateOrderResponseContent",
|
|
553
|
+
'400': "BadRequestErrorResponseContent",
|
|
554
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
555
|
+
'403': "ForbiddenErrorResponseContent",
|
|
556
|
+
'422': "ValidationErrorResponseContent",
|
|
557
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
558
|
+
'500': "InternalServiceErrorResponseContent",
|
|
559
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
560
|
+
}
|
|
561
|
+
response_data = self.api_client.call_api(
|
|
562
|
+
*_param,
|
|
563
|
+
_request_timeout=_request_timeout
|
|
564
|
+
)
|
|
565
|
+
return response_data.response
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
def _create_order_serialize(
|
|
569
|
+
self,
|
|
570
|
+
create_order_request_content,
|
|
571
|
+
_request_auth,
|
|
572
|
+
_content_type,
|
|
573
|
+
_headers,
|
|
574
|
+
_host_index,
|
|
575
|
+
) -> RequestSerialized:
|
|
576
|
+
|
|
577
|
+
_host = None
|
|
578
|
+
|
|
579
|
+
_collection_formats: Dict[str, str] = {
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
_path_params: Dict[str, str] = {}
|
|
583
|
+
_query_params: List[Tuple[str, str]] = []
|
|
584
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
585
|
+
_form_params: List[Tuple[str, str]] = []
|
|
586
|
+
_files: Dict[
|
|
587
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
588
|
+
] = {}
|
|
589
|
+
_body_params: Optional[bytes] = None
|
|
590
|
+
|
|
591
|
+
# process the path parameters
|
|
592
|
+
# process the query parameters
|
|
593
|
+
# process the header parameters
|
|
594
|
+
# process the form parameters
|
|
595
|
+
# process the body parameter
|
|
596
|
+
if create_order_request_content is not None:
|
|
597
|
+
_body_params = create_order_request_content
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
# set the HTTP header `Accept`
|
|
601
|
+
if 'Accept' not in _header_params:
|
|
602
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
603
|
+
[
|
|
604
|
+
'application/json'
|
|
605
|
+
]
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
# set the HTTP header `Content-Type`
|
|
609
|
+
if _content_type:
|
|
610
|
+
_header_params['Content-Type'] = _content_type
|
|
611
|
+
else:
|
|
612
|
+
_default_content_type = (
|
|
613
|
+
self.api_client.select_header_content_type(
|
|
614
|
+
[
|
|
615
|
+
'application/json'
|
|
616
|
+
]
|
|
617
|
+
)
|
|
618
|
+
)
|
|
619
|
+
if _default_content_type is not None:
|
|
620
|
+
_header_params['Content-Type'] = _default_content_type
|
|
621
|
+
|
|
622
|
+
# authentication setting
|
|
623
|
+
_auth_settings: List[str] = [
|
|
624
|
+
'BearerAuth'
|
|
625
|
+
]
|
|
626
|
+
|
|
627
|
+
return self.api_client.param_serialize(
|
|
628
|
+
method='POST',
|
|
629
|
+
resource_path='/vps/create-order',
|
|
630
|
+
path_params=_path_params,
|
|
631
|
+
query_params=_query_params,
|
|
632
|
+
header_params=_header_params,
|
|
633
|
+
body=_body_params,
|
|
634
|
+
post_params=_form_params,
|
|
635
|
+
files=_files,
|
|
636
|
+
auth_settings=_auth_settings,
|
|
637
|
+
collection_formats=_collection_formats,
|
|
638
|
+
_host=_host,
|
|
639
|
+
_request_auth=_request_auth
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
@validate_call
|
|
646
|
+
def get_catalogue(
|
|
647
|
+
self,
|
|
648
|
+
get_catalogue_request_content: Optional[GetCatalogueRequestContent] = None,
|
|
649
|
+
_request_timeout: Union[
|
|
650
|
+
None,
|
|
651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
652
|
+
Tuple[
|
|
653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
654
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
655
|
+
]
|
|
656
|
+
] = None,
|
|
657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
658
|
+
_content_type: Optional[StrictStr] = None,
|
|
659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
661
|
+
) -> GetCatalogueResponseContent:
|
|
662
|
+
"""get_catalogue
|
|
663
|
+
|
|
664
|
+
Retrieves the product catalogue, optionally filtered by group or product
|
|
665
|
+
|
|
666
|
+
:param get_catalogue_request_content:
|
|
667
|
+
:type get_catalogue_request_content: GetCatalogueRequestContent
|
|
668
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
669
|
+
number provided, it will be total request
|
|
670
|
+
timeout. It can also be a pair (tuple) of
|
|
671
|
+
(connection, read) timeouts.
|
|
672
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
673
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
674
|
+
request; this effectively ignores the
|
|
675
|
+
authentication in the spec for a single request.
|
|
676
|
+
:type _request_auth: dict, optional
|
|
677
|
+
:param _content_type: force content-type for the request.
|
|
678
|
+
:type _content_type: str, Optional
|
|
679
|
+
:param _headers: set to override the headers for a single
|
|
680
|
+
request; this effectively ignores the headers
|
|
681
|
+
in the spec for a single request.
|
|
682
|
+
:type _headers: dict, optional
|
|
683
|
+
:param _host_index: set to override the host_index for a single
|
|
684
|
+
request; this effectively ignores the host_index
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _host_index: int, optional
|
|
687
|
+
:return: Returns the result object.
|
|
688
|
+
""" # noqa: E501
|
|
689
|
+
|
|
690
|
+
_param = self._get_catalogue_serialize(
|
|
691
|
+
get_catalogue_request_content=get_catalogue_request_content,
|
|
692
|
+
_request_auth=_request_auth,
|
|
693
|
+
_content_type=_content_type,
|
|
694
|
+
_headers=_headers,
|
|
695
|
+
_host_index=_host_index
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
699
|
+
'200': "GetCatalogueResponseContent",
|
|
700
|
+
'400': "BadRequestErrorResponseContent",
|
|
701
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
702
|
+
'403': "ForbiddenErrorResponseContent",
|
|
703
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
704
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
705
|
+
'500': "InternalServiceErrorResponseContent",
|
|
706
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
707
|
+
}
|
|
708
|
+
response_data = self.api_client.call_api(
|
|
709
|
+
*_param,
|
|
710
|
+
_request_timeout=_request_timeout
|
|
711
|
+
)
|
|
712
|
+
response_data.read()
|
|
713
|
+
return self.api_client.response_deserialize(
|
|
714
|
+
response_data=response_data,
|
|
715
|
+
response_types_map=_response_types_map,
|
|
716
|
+
).data
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
@validate_call
|
|
720
|
+
def get_catalogue_with_http_info(
|
|
721
|
+
self,
|
|
722
|
+
get_catalogue_request_content: Optional[GetCatalogueRequestContent] = None,
|
|
723
|
+
_request_timeout: Union[
|
|
724
|
+
None,
|
|
725
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
726
|
+
Tuple[
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
728
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
729
|
+
]
|
|
730
|
+
] = None,
|
|
731
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
732
|
+
_content_type: Optional[StrictStr] = None,
|
|
733
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
734
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
735
|
+
) -> ApiResponse[GetCatalogueResponseContent]:
|
|
736
|
+
"""get_catalogue
|
|
737
|
+
|
|
738
|
+
Retrieves the product catalogue, optionally filtered by group or product
|
|
739
|
+
|
|
740
|
+
:param get_catalogue_request_content:
|
|
741
|
+
:type get_catalogue_request_content: GetCatalogueRequestContent
|
|
742
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
743
|
+
number provided, it will be total request
|
|
744
|
+
timeout. It can also be a pair (tuple) of
|
|
745
|
+
(connection, read) timeouts.
|
|
746
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
747
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
748
|
+
request; this effectively ignores the
|
|
749
|
+
authentication in the spec for a single request.
|
|
750
|
+
:type _request_auth: dict, optional
|
|
751
|
+
:param _content_type: force content-type for the request.
|
|
752
|
+
:type _content_type: str, Optional
|
|
753
|
+
:param _headers: set to override the headers for a single
|
|
754
|
+
request; this effectively ignores the headers
|
|
755
|
+
in the spec for a single request.
|
|
756
|
+
:type _headers: dict, optional
|
|
757
|
+
:param _host_index: set to override the host_index for a single
|
|
758
|
+
request; this effectively ignores the host_index
|
|
759
|
+
in the spec for a single request.
|
|
760
|
+
:type _host_index: int, optional
|
|
761
|
+
:return: Returns the result object.
|
|
762
|
+
""" # noqa: E501
|
|
763
|
+
|
|
764
|
+
_param = self._get_catalogue_serialize(
|
|
765
|
+
get_catalogue_request_content=get_catalogue_request_content,
|
|
766
|
+
_request_auth=_request_auth,
|
|
767
|
+
_content_type=_content_type,
|
|
768
|
+
_headers=_headers,
|
|
769
|
+
_host_index=_host_index
|
|
770
|
+
)
|
|
771
|
+
|
|
772
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
773
|
+
'200': "GetCatalogueResponseContent",
|
|
774
|
+
'400': "BadRequestErrorResponseContent",
|
|
775
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
776
|
+
'403': "ForbiddenErrorResponseContent",
|
|
777
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
778
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
779
|
+
'500': "InternalServiceErrorResponseContent",
|
|
780
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
781
|
+
}
|
|
782
|
+
response_data = self.api_client.call_api(
|
|
783
|
+
*_param,
|
|
784
|
+
_request_timeout=_request_timeout
|
|
785
|
+
)
|
|
786
|
+
response_data.read()
|
|
787
|
+
return self.api_client.response_deserialize(
|
|
788
|
+
response_data=response_data,
|
|
789
|
+
response_types_map=_response_types_map,
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
@validate_call
|
|
794
|
+
def get_catalogue_without_preload_content(
|
|
795
|
+
self,
|
|
796
|
+
get_catalogue_request_content: Optional[GetCatalogueRequestContent] = None,
|
|
797
|
+
_request_timeout: Union[
|
|
798
|
+
None,
|
|
799
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
800
|
+
Tuple[
|
|
801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
802
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
803
|
+
]
|
|
804
|
+
] = None,
|
|
805
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
806
|
+
_content_type: Optional[StrictStr] = None,
|
|
807
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
808
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
809
|
+
) -> RESTResponseType:
|
|
810
|
+
"""get_catalogue
|
|
811
|
+
|
|
812
|
+
Retrieves the product catalogue, optionally filtered by group or product
|
|
813
|
+
|
|
814
|
+
:param get_catalogue_request_content:
|
|
815
|
+
:type get_catalogue_request_content: GetCatalogueRequestContent
|
|
816
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
817
|
+
number provided, it will be total request
|
|
818
|
+
timeout. It can also be a pair (tuple) of
|
|
819
|
+
(connection, read) timeouts.
|
|
820
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
821
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
822
|
+
request; this effectively ignores the
|
|
823
|
+
authentication in the spec for a single request.
|
|
824
|
+
:type _request_auth: dict, optional
|
|
825
|
+
:param _content_type: force content-type for the request.
|
|
826
|
+
:type _content_type: str, Optional
|
|
827
|
+
:param _headers: set to override the headers for a single
|
|
828
|
+
request; this effectively ignores the headers
|
|
829
|
+
in the spec for a single request.
|
|
830
|
+
:type _headers: dict, optional
|
|
831
|
+
:param _host_index: set to override the host_index for a single
|
|
832
|
+
request; this effectively ignores the host_index
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _host_index: int, optional
|
|
835
|
+
:return: Returns the result object.
|
|
836
|
+
""" # noqa: E501
|
|
837
|
+
|
|
838
|
+
_param = self._get_catalogue_serialize(
|
|
839
|
+
get_catalogue_request_content=get_catalogue_request_content,
|
|
840
|
+
_request_auth=_request_auth,
|
|
841
|
+
_content_type=_content_type,
|
|
842
|
+
_headers=_headers,
|
|
843
|
+
_host_index=_host_index
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
847
|
+
'200': "GetCatalogueResponseContent",
|
|
848
|
+
'400': "BadRequestErrorResponseContent",
|
|
849
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
850
|
+
'403': "ForbiddenErrorResponseContent",
|
|
851
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
852
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
853
|
+
'500': "InternalServiceErrorResponseContent",
|
|
854
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
855
|
+
}
|
|
856
|
+
response_data = self.api_client.call_api(
|
|
857
|
+
*_param,
|
|
858
|
+
_request_timeout=_request_timeout
|
|
859
|
+
)
|
|
860
|
+
return response_data.response
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
def _get_catalogue_serialize(
|
|
864
|
+
self,
|
|
865
|
+
get_catalogue_request_content,
|
|
866
|
+
_request_auth,
|
|
867
|
+
_content_type,
|
|
868
|
+
_headers,
|
|
869
|
+
_host_index,
|
|
870
|
+
) -> RequestSerialized:
|
|
871
|
+
|
|
872
|
+
_host = None
|
|
873
|
+
|
|
874
|
+
_collection_formats: Dict[str, str] = {
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
_path_params: Dict[str, str] = {}
|
|
878
|
+
_query_params: List[Tuple[str, str]] = []
|
|
879
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
880
|
+
_form_params: List[Tuple[str, str]] = []
|
|
881
|
+
_files: Dict[
|
|
882
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
883
|
+
] = {}
|
|
884
|
+
_body_params: Optional[bytes] = None
|
|
885
|
+
|
|
886
|
+
# process the path parameters
|
|
887
|
+
# process the query parameters
|
|
888
|
+
# process the header parameters
|
|
889
|
+
# process the form parameters
|
|
890
|
+
# process the body parameter
|
|
891
|
+
if get_catalogue_request_content is not None:
|
|
892
|
+
_body_params = get_catalogue_request_content
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
# set the HTTP header `Accept`
|
|
896
|
+
if 'Accept' not in _header_params:
|
|
897
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
898
|
+
[
|
|
899
|
+
'application/json'
|
|
900
|
+
]
|
|
901
|
+
)
|
|
902
|
+
|
|
903
|
+
# set the HTTP header `Content-Type`
|
|
904
|
+
if _content_type:
|
|
905
|
+
_header_params['Content-Type'] = _content_type
|
|
906
|
+
else:
|
|
907
|
+
_default_content_type = (
|
|
908
|
+
self.api_client.select_header_content_type(
|
|
909
|
+
[
|
|
910
|
+
'application/json'
|
|
911
|
+
]
|
|
912
|
+
)
|
|
913
|
+
)
|
|
914
|
+
if _default_content_type is not None:
|
|
915
|
+
_header_params['Content-Type'] = _default_content_type
|
|
916
|
+
|
|
917
|
+
# authentication setting
|
|
918
|
+
_auth_settings: List[str] = [
|
|
919
|
+
'BearerAuth'
|
|
920
|
+
]
|
|
921
|
+
|
|
922
|
+
return self.api_client.param_serialize(
|
|
923
|
+
method='POST',
|
|
924
|
+
resource_path='/vps/get-catalogue',
|
|
925
|
+
path_params=_path_params,
|
|
926
|
+
query_params=_query_params,
|
|
927
|
+
header_params=_header_params,
|
|
928
|
+
body=_body_params,
|
|
929
|
+
post_params=_form_params,
|
|
930
|
+
files=_files,
|
|
931
|
+
auth_settings=_auth_settings,
|
|
932
|
+
collection_formats=_collection_formats,
|
|
933
|
+
_host=_host,
|
|
934
|
+
_request_auth=_request_auth
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
@validate_call
|
|
941
|
+
def list_orders(
|
|
942
|
+
self,
|
|
943
|
+
_request_timeout: Union[
|
|
944
|
+
None,
|
|
945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
946
|
+
Tuple[
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
948
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
949
|
+
]
|
|
950
|
+
] = None,
|
|
951
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
952
|
+
_content_type: Optional[StrictStr] = None,
|
|
953
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
954
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
955
|
+
) -> ListOrdersResponseContent:
|
|
956
|
+
"""list_orders
|
|
957
|
+
|
|
958
|
+
Lists all orders for the authenticated user, including payment and invoice status
|
|
959
|
+
|
|
960
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
961
|
+
number provided, it will be total request
|
|
962
|
+
timeout. It can also be a pair (tuple) of
|
|
963
|
+
(connection, read) timeouts.
|
|
964
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
965
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
966
|
+
request; this effectively ignores the
|
|
967
|
+
authentication in the spec for a single request.
|
|
968
|
+
:type _request_auth: dict, optional
|
|
969
|
+
:param _content_type: force content-type for the request.
|
|
970
|
+
:type _content_type: str, Optional
|
|
971
|
+
:param _headers: set to override the headers for a single
|
|
972
|
+
request; this effectively ignores the headers
|
|
973
|
+
in the spec for a single request.
|
|
974
|
+
:type _headers: dict, optional
|
|
975
|
+
:param _host_index: set to override the host_index for a single
|
|
976
|
+
request; this effectively ignores the host_index
|
|
977
|
+
in the spec for a single request.
|
|
978
|
+
:type _host_index: int, optional
|
|
979
|
+
:return: Returns the result object.
|
|
980
|
+
""" # noqa: E501
|
|
981
|
+
|
|
982
|
+
_param = self._list_orders_serialize(
|
|
983
|
+
_request_auth=_request_auth,
|
|
984
|
+
_content_type=_content_type,
|
|
985
|
+
_headers=_headers,
|
|
986
|
+
_host_index=_host_index
|
|
987
|
+
)
|
|
988
|
+
|
|
989
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
990
|
+
'200': "ListOrdersResponseContent",
|
|
991
|
+
'400': "BadRequestErrorResponseContent",
|
|
992
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
993
|
+
'403': "ForbiddenErrorResponseContent",
|
|
994
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
995
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
996
|
+
'500': "InternalServiceErrorResponseContent",
|
|
997
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
998
|
+
}
|
|
999
|
+
response_data = self.api_client.call_api(
|
|
1000
|
+
*_param,
|
|
1001
|
+
_request_timeout=_request_timeout
|
|
1002
|
+
)
|
|
1003
|
+
response_data.read()
|
|
1004
|
+
return self.api_client.response_deserialize(
|
|
1005
|
+
response_data=response_data,
|
|
1006
|
+
response_types_map=_response_types_map,
|
|
1007
|
+
).data
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
@validate_call
|
|
1011
|
+
def list_orders_with_http_info(
|
|
1012
|
+
self,
|
|
1013
|
+
_request_timeout: Union[
|
|
1014
|
+
None,
|
|
1015
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1016
|
+
Tuple[
|
|
1017
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1018
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1019
|
+
]
|
|
1020
|
+
] = None,
|
|
1021
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1022
|
+
_content_type: Optional[StrictStr] = None,
|
|
1023
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1024
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1025
|
+
) -> ApiResponse[ListOrdersResponseContent]:
|
|
1026
|
+
"""list_orders
|
|
1027
|
+
|
|
1028
|
+
Lists all orders for the authenticated user, including payment and invoice status
|
|
1029
|
+
|
|
1030
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1031
|
+
number provided, it will be total request
|
|
1032
|
+
timeout. It can also be a pair (tuple) of
|
|
1033
|
+
(connection, read) timeouts.
|
|
1034
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1035
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1036
|
+
request; this effectively ignores the
|
|
1037
|
+
authentication in the spec for a single request.
|
|
1038
|
+
:type _request_auth: dict, optional
|
|
1039
|
+
:param _content_type: force content-type for the request.
|
|
1040
|
+
:type _content_type: str, Optional
|
|
1041
|
+
:param _headers: set to override the headers for a single
|
|
1042
|
+
request; this effectively ignores the headers
|
|
1043
|
+
in the spec for a single request.
|
|
1044
|
+
:type _headers: dict, optional
|
|
1045
|
+
:param _host_index: set to override the host_index for a single
|
|
1046
|
+
request; this effectively ignores the host_index
|
|
1047
|
+
in the spec for a single request.
|
|
1048
|
+
:type _host_index: int, optional
|
|
1049
|
+
:return: Returns the result object.
|
|
1050
|
+
""" # noqa: E501
|
|
1051
|
+
|
|
1052
|
+
_param = self._list_orders_serialize(
|
|
1053
|
+
_request_auth=_request_auth,
|
|
1054
|
+
_content_type=_content_type,
|
|
1055
|
+
_headers=_headers,
|
|
1056
|
+
_host_index=_host_index
|
|
1057
|
+
)
|
|
1058
|
+
|
|
1059
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1060
|
+
'200': "ListOrdersResponseContent",
|
|
1061
|
+
'400': "BadRequestErrorResponseContent",
|
|
1062
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1063
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1064
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1065
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1066
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1067
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1068
|
+
}
|
|
1069
|
+
response_data = self.api_client.call_api(
|
|
1070
|
+
*_param,
|
|
1071
|
+
_request_timeout=_request_timeout
|
|
1072
|
+
)
|
|
1073
|
+
response_data.read()
|
|
1074
|
+
return self.api_client.response_deserialize(
|
|
1075
|
+
response_data=response_data,
|
|
1076
|
+
response_types_map=_response_types_map,
|
|
1077
|
+
)
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
@validate_call
|
|
1081
|
+
def list_orders_without_preload_content(
|
|
1082
|
+
self,
|
|
1083
|
+
_request_timeout: Union[
|
|
1084
|
+
None,
|
|
1085
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1086
|
+
Tuple[
|
|
1087
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1088
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1089
|
+
]
|
|
1090
|
+
] = None,
|
|
1091
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1092
|
+
_content_type: Optional[StrictStr] = None,
|
|
1093
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1094
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1095
|
+
) -> RESTResponseType:
|
|
1096
|
+
"""list_orders
|
|
1097
|
+
|
|
1098
|
+
Lists all orders for the authenticated user, including payment and invoice status
|
|
1099
|
+
|
|
1100
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1101
|
+
number provided, it will be total request
|
|
1102
|
+
timeout. It can also be a pair (tuple) of
|
|
1103
|
+
(connection, read) timeouts.
|
|
1104
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1105
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1106
|
+
request; this effectively ignores the
|
|
1107
|
+
authentication in the spec for a single request.
|
|
1108
|
+
:type _request_auth: dict, optional
|
|
1109
|
+
:param _content_type: force content-type for the request.
|
|
1110
|
+
:type _content_type: str, Optional
|
|
1111
|
+
:param _headers: set to override the headers for a single
|
|
1112
|
+
request; this effectively ignores the headers
|
|
1113
|
+
in the spec for a single request.
|
|
1114
|
+
:type _headers: dict, optional
|
|
1115
|
+
:param _host_index: set to override the host_index for a single
|
|
1116
|
+
request; this effectively ignores the host_index
|
|
1117
|
+
in the spec for a single request.
|
|
1118
|
+
:type _host_index: int, optional
|
|
1119
|
+
:return: Returns the result object.
|
|
1120
|
+
""" # noqa: E501
|
|
1121
|
+
|
|
1122
|
+
_param = self._list_orders_serialize(
|
|
1123
|
+
_request_auth=_request_auth,
|
|
1124
|
+
_content_type=_content_type,
|
|
1125
|
+
_headers=_headers,
|
|
1126
|
+
_host_index=_host_index
|
|
1127
|
+
)
|
|
1128
|
+
|
|
1129
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1130
|
+
'200': "ListOrdersResponseContent",
|
|
1131
|
+
'400': "BadRequestErrorResponseContent",
|
|
1132
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1133
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1134
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1135
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1136
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1137
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1138
|
+
}
|
|
1139
|
+
response_data = self.api_client.call_api(
|
|
1140
|
+
*_param,
|
|
1141
|
+
_request_timeout=_request_timeout
|
|
1142
|
+
)
|
|
1143
|
+
return response_data.response
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
def _list_orders_serialize(
|
|
1147
|
+
self,
|
|
1148
|
+
_request_auth,
|
|
1149
|
+
_content_type,
|
|
1150
|
+
_headers,
|
|
1151
|
+
_host_index,
|
|
1152
|
+
) -> RequestSerialized:
|
|
1153
|
+
|
|
1154
|
+
_host = None
|
|
1155
|
+
|
|
1156
|
+
_collection_formats: Dict[str, str] = {
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
_path_params: Dict[str, str] = {}
|
|
1160
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1161
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1162
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1163
|
+
_files: Dict[
|
|
1164
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1165
|
+
] = {}
|
|
1166
|
+
_body_params: Optional[bytes] = None
|
|
1167
|
+
|
|
1168
|
+
# process the path parameters
|
|
1169
|
+
# process the query parameters
|
|
1170
|
+
# process the header parameters
|
|
1171
|
+
# process the form parameters
|
|
1172
|
+
# process the body parameter
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
# set the HTTP header `Accept`
|
|
1176
|
+
if 'Accept' not in _header_params:
|
|
1177
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1178
|
+
[
|
|
1179
|
+
'application/json'
|
|
1180
|
+
]
|
|
1181
|
+
)
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
# authentication setting
|
|
1185
|
+
_auth_settings: List[str] = [
|
|
1186
|
+
'BearerAuth'
|
|
1187
|
+
]
|
|
1188
|
+
|
|
1189
|
+
return self.api_client.param_serialize(
|
|
1190
|
+
method='POST',
|
|
1191
|
+
resource_path='/vps/list-orders',
|
|
1192
|
+
path_params=_path_params,
|
|
1193
|
+
query_params=_query_params,
|
|
1194
|
+
header_params=_header_params,
|
|
1195
|
+
body=_body_params,
|
|
1196
|
+
post_params=_form_params,
|
|
1197
|
+
files=_files,
|
|
1198
|
+
auth_settings=_auth_settings,
|
|
1199
|
+
collection_formats=_collection_formats,
|
|
1200
|
+
_host=_host,
|
|
1201
|
+
_request_auth=_request_auth
|
|
1202
|
+
)
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
@validate_call
|
|
1208
|
+
def retry_payment(
|
|
1209
|
+
self,
|
|
1210
|
+
retry_payment_request_content: RetryPaymentRequestContent,
|
|
1211
|
+
_request_timeout: Union[
|
|
1212
|
+
None,
|
|
1213
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1214
|
+
Tuple[
|
|
1215
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1216
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1217
|
+
]
|
|
1218
|
+
] = None,
|
|
1219
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1220
|
+
_content_type: Optional[StrictStr] = None,
|
|
1221
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1222
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1223
|
+
) -> RetryPaymentResponseContent:
|
|
1224
|
+
"""retry_payment
|
|
1225
|
+
|
|
1226
|
+
Retries a failed or pending payment for an existing order
|
|
1227
|
+
|
|
1228
|
+
:param retry_payment_request_content: (required)
|
|
1229
|
+
:type retry_payment_request_content: RetryPaymentRequestContent
|
|
1230
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1231
|
+
number provided, it will be total request
|
|
1232
|
+
timeout. It can also be a pair (tuple) of
|
|
1233
|
+
(connection, read) timeouts.
|
|
1234
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1235
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1236
|
+
request; this effectively ignores the
|
|
1237
|
+
authentication in the spec for a single request.
|
|
1238
|
+
:type _request_auth: dict, optional
|
|
1239
|
+
:param _content_type: force content-type for the request.
|
|
1240
|
+
:type _content_type: str, Optional
|
|
1241
|
+
:param _headers: set to override the headers for a single
|
|
1242
|
+
request; this effectively ignores the headers
|
|
1243
|
+
in the spec for a single request.
|
|
1244
|
+
:type _headers: dict, optional
|
|
1245
|
+
:param _host_index: set to override the host_index for a single
|
|
1246
|
+
request; this effectively ignores the host_index
|
|
1247
|
+
in the spec for a single request.
|
|
1248
|
+
:type _host_index: int, optional
|
|
1249
|
+
:return: Returns the result object.
|
|
1250
|
+
""" # noqa: E501
|
|
1251
|
+
|
|
1252
|
+
_param = self._retry_payment_serialize(
|
|
1253
|
+
retry_payment_request_content=retry_payment_request_content,
|
|
1254
|
+
_request_auth=_request_auth,
|
|
1255
|
+
_content_type=_content_type,
|
|
1256
|
+
_headers=_headers,
|
|
1257
|
+
_host_index=_host_index
|
|
1258
|
+
)
|
|
1259
|
+
|
|
1260
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1261
|
+
'200': "RetryPaymentResponseContent",
|
|
1262
|
+
'400': "BadRequestErrorResponseContent",
|
|
1263
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1264
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1265
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1266
|
+
'422': "ValidationErrorResponseContent",
|
|
1267
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1268
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1269
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1270
|
+
}
|
|
1271
|
+
response_data = self.api_client.call_api(
|
|
1272
|
+
*_param,
|
|
1273
|
+
_request_timeout=_request_timeout
|
|
1274
|
+
)
|
|
1275
|
+
response_data.read()
|
|
1276
|
+
return self.api_client.response_deserialize(
|
|
1277
|
+
response_data=response_data,
|
|
1278
|
+
response_types_map=_response_types_map,
|
|
1279
|
+
).data
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
@validate_call
|
|
1283
|
+
def retry_payment_with_http_info(
|
|
1284
|
+
self,
|
|
1285
|
+
retry_payment_request_content: RetryPaymentRequestContent,
|
|
1286
|
+
_request_timeout: Union[
|
|
1287
|
+
None,
|
|
1288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1289
|
+
Tuple[
|
|
1290
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1291
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1292
|
+
]
|
|
1293
|
+
] = None,
|
|
1294
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1295
|
+
_content_type: Optional[StrictStr] = None,
|
|
1296
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1297
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1298
|
+
) -> ApiResponse[RetryPaymentResponseContent]:
|
|
1299
|
+
"""retry_payment
|
|
1300
|
+
|
|
1301
|
+
Retries a failed or pending payment for an existing order
|
|
1302
|
+
|
|
1303
|
+
:param retry_payment_request_content: (required)
|
|
1304
|
+
:type retry_payment_request_content: RetryPaymentRequestContent
|
|
1305
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1306
|
+
number provided, it will be total request
|
|
1307
|
+
timeout. It can also be a pair (tuple) of
|
|
1308
|
+
(connection, read) timeouts.
|
|
1309
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1310
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1311
|
+
request; this effectively ignores the
|
|
1312
|
+
authentication in the spec for a single request.
|
|
1313
|
+
:type _request_auth: dict, optional
|
|
1314
|
+
:param _content_type: force content-type for the request.
|
|
1315
|
+
:type _content_type: str, Optional
|
|
1316
|
+
:param _headers: set to override the headers for a single
|
|
1317
|
+
request; this effectively ignores the headers
|
|
1318
|
+
in the spec for a single request.
|
|
1319
|
+
:type _headers: dict, optional
|
|
1320
|
+
:param _host_index: set to override the host_index for a single
|
|
1321
|
+
request; this effectively ignores the host_index
|
|
1322
|
+
in the spec for a single request.
|
|
1323
|
+
:type _host_index: int, optional
|
|
1324
|
+
:return: Returns the result object.
|
|
1325
|
+
""" # noqa: E501
|
|
1326
|
+
|
|
1327
|
+
_param = self._retry_payment_serialize(
|
|
1328
|
+
retry_payment_request_content=retry_payment_request_content,
|
|
1329
|
+
_request_auth=_request_auth,
|
|
1330
|
+
_content_type=_content_type,
|
|
1331
|
+
_headers=_headers,
|
|
1332
|
+
_host_index=_host_index
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1336
|
+
'200': "RetryPaymentResponseContent",
|
|
1337
|
+
'400': "BadRequestErrorResponseContent",
|
|
1338
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1339
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1340
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1341
|
+
'422': "ValidationErrorResponseContent",
|
|
1342
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1343
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1344
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1345
|
+
}
|
|
1346
|
+
response_data = self.api_client.call_api(
|
|
1347
|
+
*_param,
|
|
1348
|
+
_request_timeout=_request_timeout
|
|
1349
|
+
)
|
|
1350
|
+
response_data.read()
|
|
1351
|
+
return self.api_client.response_deserialize(
|
|
1352
|
+
response_data=response_data,
|
|
1353
|
+
response_types_map=_response_types_map,
|
|
1354
|
+
)
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
@validate_call
|
|
1358
|
+
def retry_payment_without_preload_content(
|
|
1359
|
+
self,
|
|
1360
|
+
retry_payment_request_content: RetryPaymentRequestContent,
|
|
1361
|
+
_request_timeout: Union[
|
|
1362
|
+
None,
|
|
1363
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1364
|
+
Tuple[
|
|
1365
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1366
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1367
|
+
]
|
|
1368
|
+
] = None,
|
|
1369
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1370
|
+
_content_type: Optional[StrictStr] = None,
|
|
1371
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1372
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1373
|
+
) -> RESTResponseType:
|
|
1374
|
+
"""retry_payment
|
|
1375
|
+
|
|
1376
|
+
Retries a failed or pending payment for an existing order
|
|
1377
|
+
|
|
1378
|
+
:param retry_payment_request_content: (required)
|
|
1379
|
+
:type retry_payment_request_content: RetryPaymentRequestContent
|
|
1380
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1381
|
+
number provided, it will be total request
|
|
1382
|
+
timeout. It can also be a pair (tuple) of
|
|
1383
|
+
(connection, read) timeouts.
|
|
1384
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1385
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1386
|
+
request; this effectively ignores the
|
|
1387
|
+
authentication in the spec for a single request.
|
|
1388
|
+
:type _request_auth: dict, optional
|
|
1389
|
+
:param _content_type: force content-type for the request.
|
|
1390
|
+
:type _content_type: str, Optional
|
|
1391
|
+
:param _headers: set to override the headers for a single
|
|
1392
|
+
request; this effectively ignores the headers
|
|
1393
|
+
in the spec for a single request.
|
|
1394
|
+
:type _headers: dict, optional
|
|
1395
|
+
:param _host_index: set to override the host_index for a single
|
|
1396
|
+
request; this effectively ignores the host_index
|
|
1397
|
+
in the spec for a single request.
|
|
1398
|
+
:type _host_index: int, optional
|
|
1399
|
+
:return: Returns the result object.
|
|
1400
|
+
""" # noqa: E501
|
|
1401
|
+
|
|
1402
|
+
_param = self._retry_payment_serialize(
|
|
1403
|
+
retry_payment_request_content=retry_payment_request_content,
|
|
1404
|
+
_request_auth=_request_auth,
|
|
1405
|
+
_content_type=_content_type,
|
|
1406
|
+
_headers=_headers,
|
|
1407
|
+
_host_index=_host_index
|
|
1408
|
+
)
|
|
1409
|
+
|
|
1410
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1411
|
+
'200': "RetryPaymentResponseContent",
|
|
1412
|
+
'400': "BadRequestErrorResponseContent",
|
|
1413
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1414
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1415
|
+
'404': "ResourceNotFoundErrorResponseContent",
|
|
1416
|
+
'422': "ValidationErrorResponseContent",
|
|
1417
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1418
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1419
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1420
|
+
}
|
|
1421
|
+
response_data = self.api_client.call_api(
|
|
1422
|
+
*_param,
|
|
1423
|
+
_request_timeout=_request_timeout
|
|
1424
|
+
)
|
|
1425
|
+
return response_data.response
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
def _retry_payment_serialize(
|
|
1429
|
+
self,
|
|
1430
|
+
retry_payment_request_content,
|
|
1431
|
+
_request_auth,
|
|
1432
|
+
_content_type,
|
|
1433
|
+
_headers,
|
|
1434
|
+
_host_index,
|
|
1435
|
+
) -> RequestSerialized:
|
|
1436
|
+
|
|
1437
|
+
_host = None
|
|
1438
|
+
|
|
1439
|
+
_collection_formats: Dict[str, str] = {
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
_path_params: Dict[str, str] = {}
|
|
1443
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1444
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1445
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1446
|
+
_files: Dict[
|
|
1447
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1448
|
+
] = {}
|
|
1449
|
+
_body_params: Optional[bytes] = None
|
|
1450
|
+
|
|
1451
|
+
# process the path parameters
|
|
1452
|
+
# process the query parameters
|
|
1453
|
+
# process the header parameters
|
|
1454
|
+
# process the form parameters
|
|
1455
|
+
# process the body parameter
|
|
1456
|
+
if retry_payment_request_content is not None:
|
|
1457
|
+
_body_params = retry_payment_request_content
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
# set the HTTP header `Accept`
|
|
1461
|
+
if 'Accept' not in _header_params:
|
|
1462
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1463
|
+
[
|
|
1464
|
+
'application/json'
|
|
1465
|
+
]
|
|
1466
|
+
)
|
|
1467
|
+
|
|
1468
|
+
# set the HTTP header `Content-Type`
|
|
1469
|
+
if _content_type:
|
|
1470
|
+
_header_params['Content-Type'] = _content_type
|
|
1471
|
+
else:
|
|
1472
|
+
_default_content_type = (
|
|
1473
|
+
self.api_client.select_header_content_type(
|
|
1474
|
+
[
|
|
1475
|
+
'application/json'
|
|
1476
|
+
]
|
|
1477
|
+
)
|
|
1478
|
+
)
|
|
1479
|
+
if _default_content_type is not None:
|
|
1480
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1481
|
+
|
|
1482
|
+
# authentication setting
|
|
1483
|
+
_auth_settings: List[str] = [
|
|
1484
|
+
'BearerAuth'
|
|
1485
|
+
]
|
|
1486
|
+
|
|
1487
|
+
return self.api_client.param_serialize(
|
|
1488
|
+
method='POST',
|
|
1489
|
+
resource_path='/vps/retry-payment',
|
|
1490
|
+
path_params=_path_params,
|
|
1491
|
+
query_params=_query_params,
|
|
1492
|
+
header_params=_header_params,
|
|
1493
|
+
body=_body_params,
|
|
1494
|
+
post_params=_form_params,
|
|
1495
|
+
files=_files,
|
|
1496
|
+
auth_settings=_auth_settings,
|
|
1497
|
+
collection_formats=_collection_formats,
|
|
1498
|
+
_host=_host,
|
|
1499
|
+
_request_auth=_request_auth
|
|
1500
|
+
)
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
@validate_call
|
|
1506
|
+
def validate_pricing(
|
|
1507
|
+
self,
|
|
1508
|
+
validate_pricing_request_content: ValidatePricingRequestContent,
|
|
1509
|
+
_request_timeout: Union[
|
|
1510
|
+
None,
|
|
1511
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1512
|
+
Tuple[
|
|
1513
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1514
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1515
|
+
]
|
|
1516
|
+
] = None,
|
|
1517
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1518
|
+
_content_type: Optional[StrictStr] = None,
|
|
1519
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1520
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1521
|
+
) -> ValidatePricingResponseContent:
|
|
1522
|
+
"""validate_pricing
|
|
1523
|
+
|
|
1524
|
+
Validates pricing for one or more products, returning per-product breakdown and order summary
|
|
1525
|
+
|
|
1526
|
+
:param validate_pricing_request_content: (required)
|
|
1527
|
+
:type validate_pricing_request_content: ValidatePricingRequestContent
|
|
1528
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1529
|
+
number provided, it will be total request
|
|
1530
|
+
timeout. It can also be a pair (tuple) of
|
|
1531
|
+
(connection, read) timeouts.
|
|
1532
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1533
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1534
|
+
request; this effectively ignores the
|
|
1535
|
+
authentication in the spec for a single request.
|
|
1536
|
+
:type _request_auth: dict, optional
|
|
1537
|
+
:param _content_type: force content-type for the request.
|
|
1538
|
+
:type _content_type: str, Optional
|
|
1539
|
+
:param _headers: set to override the headers for a single
|
|
1540
|
+
request; this effectively ignores the headers
|
|
1541
|
+
in the spec for a single request.
|
|
1542
|
+
:type _headers: dict, optional
|
|
1543
|
+
:param _host_index: set to override the host_index for a single
|
|
1544
|
+
request; this effectively ignores the host_index
|
|
1545
|
+
in the spec for a single request.
|
|
1546
|
+
:type _host_index: int, optional
|
|
1547
|
+
:return: Returns the result object.
|
|
1548
|
+
""" # noqa: E501
|
|
1549
|
+
|
|
1550
|
+
_param = self._validate_pricing_serialize(
|
|
1551
|
+
validate_pricing_request_content=validate_pricing_request_content,
|
|
1552
|
+
_request_auth=_request_auth,
|
|
1553
|
+
_content_type=_content_type,
|
|
1554
|
+
_headers=_headers,
|
|
1555
|
+
_host_index=_host_index
|
|
1556
|
+
)
|
|
1557
|
+
|
|
1558
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1559
|
+
'200': "ValidatePricingResponseContent",
|
|
1560
|
+
'400': "BadRequestErrorResponseContent",
|
|
1561
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1562
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1563
|
+
'422': "ValidationErrorResponseContent",
|
|
1564
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1565
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1566
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1567
|
+
}
|
|
1568
|
+
response_data = self.api_client.call_api(
|
|
1569
|
+
*_param,
|
|
1570
|
+
_request_timeout=_request_timeout
|
|
1571
|
+
)
|
|
1572
|
+
response_data.read()
|
|
1573
|
+
return self.api_client.response_deserialize(
|
|
1574
|
+
response_data=response_data,
|
|
1575
|
+
response_types_map=_response_types_map,
|
|
1576
|
+
).data
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
@validate_call
|
|
1580
|
+
def validate_pricing_with_http_info(
|
|
1581
|
+
self,
|
|
1582
|
+
validate_pricing_request_content: ValidatePricingRequestContent,
|
|
1583
|
+
_request_timeout: Union[
|
|
1584
|
+
None,
|
|
1585
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1586
|
+
Tuple[
|
|
1587
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1588
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1589
|
+
]
|
|
1590
|
+
] = None,
|
|
1591
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1592
|
+
_content_type: Optional[StrictStr] = None,
|
|
1593
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1594
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1595
|
+
) -> ApiResponse[ValidatePricingResponseContent]:
|
|
1596
|
+
"""validate_pricing
|
|
1597
|
+
|
|
1598
|
+
Validates pricing for one or more products, returning per-product breakdown and order summary
|
|
1599
|
+
|
|
1600
|
+
:param validate_pricing_request_content: (required)
|
|
1601
|
+
:type validate_pricing_request_content: ValidatePricingRequestContent
|
|
1602
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1603
|
+
number provided, it will be total request
|
|
1604
|
+
timeout. It can also be a pair (tuple) of
|
|
1605
|
+
(connection, read) timeouts.
|
|
1606
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1607
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1608
|
+
request; this effectively ignores the
|
|
1609
|
+
authentication in the spec for a single request.
|
|
1610
|
+
:type _request_auth: dict, optional
|
|
1611
|
+
:param _content_type: force content-type for the request.
|
|
1612
|
+
:type _content_type: str, Optional
|
|
1613
|
+
:param _headers: set to override the headers for a single
|
|
1614
|
+
request; this effectively ignores the headers
|
|
1615
|
+
in the spec for a single request.
|
|
1616
|
+
:type _headers: dict, optional
|
|
1617
|
+
:param _host_index: set to override the host_index for a single
|
|
1618
|
+
request; this effectively ignores the host_index
|
|
1619
|
+
in the spec for a single request.
|
|
1620
|
+
:type _host_index: int, optional
|
|
1621
|
+
:return: Returns the result object.
|
|
1622
|
+
""" # noqa: E501
|
|
1623
|
+
|
|
1624
|
+
_param = self._validate_pricing_serialize(
|
|
1625
|
+
validate_pricing_request_content=validate_pricing_request_content,
|
|
1626
|
+
_request_auth=_request_auth,
|
|
1627
|
+
_content_type=_content_type,
|
|
1628
|
+
_headers=_headers,
|
|
1629
|
+
_host_index=_host_index
|
|
1630
|
+
)
|
|
1631
|
+
|
|
1632
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1633
|
+
'200': "ValidatePricingResponseContent",
|
|
1634
|
+
'400': "BadRequestErrorResponseContent",
|
|
1635
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1636
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1637
|
+
'422': "ValidationErrorResponseContent",
|
|
1638
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1639
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1640
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1641
|
+
}
|
|
1642
|
+
response_data = self.api_client.call_api(
|
|
1643
|
+
*_param,
|
|
1644
|
+
_request_timeout=_request_timeout
|
|
1645
|
+
)
|
|
1646
|
+
response_data.read()
|
|
1647
|
+
return self.api_client.response_deserialize(
|
|
1648
|
+
response_data=response_data,
|
|
1649
|
+
response_types_map=_response_types_map,
|
|
1650
|
+
)
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
@validate_call
|
|
1654
|
+
def validate_pricing_without_preload_content(
|
|
1655
|
+
self,
|
|
1656
|
+
validate_pricing_request_content: ValidatePricingRequestContent,
|
|
1657
|
+
_request_timeout: Union[
|
|
1658
|
+
None,
|
|
1659
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1660
|
+
Tuple[
|
|
1661
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1662
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1663
|
+
]
|
|
1664
|
+
] = None,
|
|
1665
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1666
|
+
_content_type: Optional[StrictStr] = None,
|
|
1667
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1668
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1669
|
+
) -> RESTResponseType:
|
|
1670
|
+
"""validate_pricing
|
|
1671
|
+
|
|
1672
|
+
Validates pricing for one or more products, returning per-product breakdown and order summary
|
|
1673
|
+
|
|
1674
|
+
:param validate_pricing_request_content: (required)
|
|
1675
|
+
:type validate_pricing_request_content: ValidatePricingRequestContent
|
|
1676
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1677
|
+
number provided, it will be total request
|
|
1678
|
+
timeout. It can also be a pair (tuple) of
|
|
1679
|
+
(connection, read) timeouts.
|
|
1680
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1681
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1682
|
+
request; this effectively ignores the
|
|
1683
|
+
authentication in the spec for a single request.
|
|
1684
|
+
:type _request_auth: dict, optional
|
|
1685
|
+
:param _content_type: force content-type for the request.
|
|
1686
|
+
:type _content_type: str, Optional
|
|
1687
|
+
:param _headers: set to override the headers for a single
|
|
1688
|
+
request; this effectively ignores the headers
|
|
1689
|
+
in the spec for a single request.
|
|
1690
|
+
:type _headers: dict, optional
|
|
1691
|
+
:param _host_index: set to override the host_index for a single
|
|
1692
|
+
request; this effectively ignores the host_index
|
|
1693
|
+
in the spec for a single request.
|
|
1694
|
+
:type _host_index: int, optional
|
|
1695
|
+
:return: Returns the result object.
|
|
1696
|
+
""" # noqa: E501
|
|
1697
|
+
|
|
1698
|
+
_param = self._validate_pricing_serialize(
|
|
1699
|
+
validate_pricing_request_content=validate_pricing_request_content,
|
|
1700
|
+
_request_auth=_request_auth,
|
|
1701
|
+
_content_type=_content_type,
|
|
1702
|
+
_headers=_headers,
|
|
1703
|
+
_host_index=_host_index
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1707
|
+
'200': "ValidatePricingResponseContent",
|
|
1708
|
+
'400': "BadRequestErrorResponseContent",
|
|
1709
|
+
'401': "UnauthorizedErrorResponseContent",
|
|
1710
|
+
'403': "ForbiddenErrorResponseContent",
|
|
1711
|
+
'422': "ValidationErrorResponseContent",
|
|
1712
|
+
'429': "TooManyRequestsErrorResponseContent",
|
|
1713
|
+
'500': "InternalServiceErrorResponseContent",
|
|
1714
|
+
'503': "ServiceUnavailableErrorResponseContent",
|
|
1715
|
+
}
|
|
1716
|
+
response_data = self.api_client.call_api(
|
|
1717
|
+
*_param,
|
|
1718
|
+
_request_timeout=_request_timeout
|
|
1719
|
+
)
|
|
1720
|
+
return response_data.response
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
def _validate_pricing_serialize(
|
|
1724
|
+
self,
|
|
1725
|
+
validate_pricing_request_content,
|
|
1726
|
+
_request_auth,
|
|
1727
|
+
_content_type,
|
|
1728
|
+
_headers,
|
|
1729
|
+
_host_index,
|
|
1730
|
+
) -> RequestSerialized:
|
|
1731
|
+
|
|
1732
|
+
_host = None
|
|
1733
|
+
|
|
1734
|
+
_collection_formats: Dict[str, str] = {
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
_path_params: Dict[str, str] = {}
|
|
1738
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1739
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1740
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1741
|
+
_files: Dict[
|
|
1742
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1743
|
+
] = {}
|
|
1744
|
+
_body_params: Optional[bytes] = None
|
|
1745
|
+
|
|
1746
|
+
# process the path parameters
|
|
1747
|
+
# process the query parameters
|
|
1748
|
+
# process the header parameters
|
|
1749
|
+
# process the form parameters
|
|
1750
|
+
# process the body parameter
|
|
1751
|
+
if validate_pricing_request_content is not None:
|
|
1752
|
+
_body_params = validate_pricing_request_content
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
# set the HTTP header `Accept`
|
|
1756
|
+
if 'Accept' not in _header_params:
|
|
1757
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1758
|
+
[
|
|
1759
|
+
'application/json'
|
|
1760
|
+
]
|
|
1761
|
+
)
|
|
1762
|
+
|
|
1763
|
+
# set the HTTP header `Content-Type`
|
|
1764
|
+
if _content_type:
|
|
1765
|
+
_header_params['Content-Type'] = _content_type
|
|
1766
|
+
else:
|
|
1767
|
+
_default_content_type = (
|
|
1768
|
+
self.api_client.select_header_content_type(
|
|
1769
|
+
[
|
|
1770
|
+
'application/json'
|
|
1771
|
+
]
|
|
1772
|
+
)
|
|
1773
|
+
)
|
|
1774
|
+
if _default_content_type is not None:
|
|
1775
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1776
|
+
|
|
1777
|
+
# authentication setting
|
|
1778
|
+
_auth_settings: List[str] = [
|
|
1779
|
+
'BearerAuth'
|
|
1780
|
+
]
|
|
1781
|
+
|
|
1782
|
+
return self.api_client.param_serialize(
|
|
1783
|
+
method='POST',
|
|
1784
|
+
resource_path='/vps/validate-pricing',
|
|
1785
|
+
path_params=_path_params,
|
|
1786
|
+
query_params=_query_params,
|
|
1787
|
+
header_params=_header_params,
|
|
1788
|
+
body=_body_params,
|
|
1789
|
+
post_params=_form_params,
|
|
1790
|
+
files=_files,
|
|
1791
|
+
auth_settings=_auth_settings,
|
|
1792
|
+
collection_formats=_collection_formats,
|
|
1793
|
+
_host=_host,
|
|
1794
|
+
_request_auth=_request_auth
|
|
1795
|
+
)
|
|
1796
|
+
|
|
1797
|
+
|