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,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
HostAfricaApi
|
|
5
|
+
|
|
6
|
+
HostAfrica API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-01-01
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ValidatePricingPriceRange(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Price before and after discount
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
before_discount: StrictStr
|
|
30
|
+
discount: StrictStr
|
|
31
|
+
after_discount: StrictStr
|
|
32
|
+
__properties: ClassVar[List[str]] = ["before_discount", "discount", "after_discount"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ValidatePricingPriceRange from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of ValidatePricingPriceRange from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"before_discount": obj.get("before_discount"),
|
|
86
|
+
"discount": obj.get("discount"),
|
|
87
|
+
"after_discount": obj.get("after_discount")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
HostAfricaApi
|
|
5
|
+
|
|
6
|
+
HostAfrica API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-01-01
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from ha_sdk_python.models.billing_cycle import BillingCycle
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ValidatePricingProduct(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A single product line item in a validate pricing request
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
pid: StrictInt = Field(description="WHMCS product ID")
|
|
31
|
+
billing_cycle: BillingCycle
|
|
32
|
+
plan_id: StrictInt = Field(description="Plan ID for the selected product configuration")
|
|
33
|
+
hostname: Optional[StrictStr] = Field(default=None, description="Hostname to assign to the service")
|
|
34
|
+
config_options: Optional[Any] = Field(description="Configuration options as a free-form map (option_id -> value)")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["pid", "billing_cycle", "plan_id", "hostname", "config_options"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ValidatePricingProduct from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# set to None if config_options (nullable) is None
|
|
77
|
+
# and model_fields_set contains the field
|
|
78
|
+
if self.config_options is None and "config_options" in self.model_fields_set:
|
|
79
|
+
_dict['config_options'] = None
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of ValidatePricingProduct from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"pid": obj.get("pid"),
|
|
94
|
+
"billing_cycle": obj.get("billing_cycle"),
|
|
95
|
+
"plan_id": obj.get("plan_id"),
|
|
96
|
+
"hostname": obj.get("hostname"),
|
|
97
|
+
"config_options": obj.get("config_options")
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
HostAfricaApi
|
|
5
|
+
|
|
6
|
+
HostAfrica API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-01-01
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from ha_sdk_python.models.validate_pricing_breakdown import ValidatePricingBreakdown
|
|
23
|
+
from ha_sdk_python.models.validate_pricing_discount import ValidatePricingDiscount
|
|
24
|
+
from ha_sdk_python.models.validate_pricing_price_range import ValidatePricingPriceRange
|
|
25
|
+
from ha_sdk_python.models.validate_pricing_prorata import ValidatePricingProrata
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class ValidatePricingProductResult(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Per-product pricing detail in the validate pricing response
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
pid: StrictInt
|
|
34
|
+
name: StrictStr
|
|
35
|
+
billing_cycle: StrictStr
|
|
36
|
+
plan_id: Optional[StrictInt] = None
|
|
37
|
+
prorata: Optional[ValidatePricingProrata] = None
|
|
38
|
+
recurring_price: Optional[ValidatePricingPriceRange] = None
|
|
39
|
+
discount: Optional[ValidatePricingDiscount] = None
|
|
40
|
+
line_total_before_discount: StrictStr
|
|
41
|
+
line_total: StrictStr
|
|
42
|
+
breakdown: Optional[ValidatePricingBreakdown] = None
|
|
43
|
+
__properties: ClassVar[List[str]] = ["pid", "name", "billing_cycle", "plan_id", "prorata", "recurring_price", "discount", "line_total_before_discount", "line_total", "breakdown"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of ValidatePricingProductResult from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of prorata
|
|
85
|
+
if self.prorata:
|
|
86
|
+
_dict['prorata'] = self.prorata.to_dict()
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of recurring_price
|
|
88
|
+
if self.recurring_price:
|
|
89
|
+
_dict['recurring_price'] = self.recurring_price.to_dict()
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of discount
|
|
91
|
+
if self.discount:
|
|
92
|
+
_dict['discount'] = self.discount.to_dict()
|
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
94
|
+
if self.breakdown:
|
|
95
|
+
_dict['breakdown'] = self.breakdown.to_dict()
|
|
96
|
+
return _dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
100
|
+
"""Create an instance of ValidatePricingProductResult from a dict"""
|
|
101
|
+
if obj is None:
|
|
102
|
+
return None
|
|
103
|
+
|
|
104
|
+
if not isinstance(obj, dict):
|
|
105
|
+
return cls.model_validate(obj)
|
|
106
|
+
|
|
107
|
+
_obj = cls.model_validate({
|
|
108
|
+
"pid": obj.get("pid"),
|
|
109
|
+
"name": obj.get("name"),
|
|
110
|
+
"billing_cycle": obj.get("billing_cycle"),
|
|
111
|
+
"plan_id": obj.get("plan_id"),
|
|
112
|
+
"prorata": ValidatePricingProrata.from_dict(obj["prorata"]) if obj.get("prorata") is not None else None,
|
|
113
|
+
"recurring_price": ValidatePricingPriceRange.from_dict(obj["recurring_price"]) if obj.get("recurring_price") is not None else None,
|
|
114
|
+
"discount": ValidatePricingDiscount.from_dict(obj["discount"]) if obj.get("discount") is not None else None,
|
|
115
|
+
"line_total_before_discount": obj.get("line_total_before_discount"),
|
|
116
|
+
"line_total": obj.get("line_total"),
|
|
117
|
+
"breakdown": ValidatePricingBreakdown.from_dict(obj["breakdown"]) if obj.get("breakdown") is not None else None
|
|
118
|
+
})
|
|
119
|
+
return _obj
|
|
120
|
+
|
|
121
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
HostAfricaApi
|
|
5
|
+
|
|
6
|
+
HostAfrica API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-01-01
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ValidatePricingProrata(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Prorata charge details for a product
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
applied: StrictBool
|
|
30
|
+
amount: Optional[StrictStr] = None
|
|
31
|
+
var_date: Optional[StrictStr] = Field(default=None, alias="date")
|
|
32
|
+
invoice_date: Optional[StrictStr] = None
|
|
33
|
+
days: Optional[StrictInt] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["applied", "amount", "date", "invoice_date", "days"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of ValidatePricingProrata from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of ValidatePricingProrata from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"applied": obj.get("applied"),
|
|
88
|
+
"amount": obj.get("amount"),
|
|
89
|
+
"date": obj.get("date"),
|
|
90
|
+
"invoice_date": obj.get("invoice_date"),
|
|
91
|
+
"days": obj.get("days")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
HostAfricaApi
|
|
5
|
+
|
|
6
|
+
HostAfrica API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-01-01
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from ha_sdk_python.models.validate_pricing_product import ValidatePricingProduct
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ValidatePricingRequestContent(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ValidatePricingRequestContent
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
promo: Optional[StrictStr] = Field(default=None, description="Optional promotional code to apply")
|
|
31
|
+
products: List[ValidatePricingProduct] = Field(description="List of products to validate pricing for")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["promo", "products"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ValidatePricingRequestContent from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in products (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.products:
|
|
76
|
+
for _item_products in self.products:
|
|
77
|
+
if _item_products:
|
|
78
|
+
_items.append(_item_products.to_dict())
|
|
79
|
+
_dict['products'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of ValidatePricingRequestContent from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"promo": obj.get("promo"),
|
|
93
|
+
"products": [ValidatePricingProduct.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
HostAfricaApi
|
|
5
|
+
|
|
6
|
+
HostAfrica API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-01-01
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from ha_sdk_python.models.operation_status import OperationStatus
|
|
23
|
+
from ha_sdk_python.models.validate_pricing_response_data import ValidatePricingResponseData
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ValidatePricingResponseContent(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ValidatePricingResponseContent
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
status: OperationStatus
|
|
32
|
+
data: ValidatePricingResponseData
|
|
33
|
+
__properties: ClassVar[List[str]] = ["status", "data"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ValidatePricingResponseContent from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
75
|
+
if self.data:
|
|
76
|
+
_dict['data'] = self.data.to_dict()
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of ValidatePricingResponseContent from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"status": obj.get("status"),
|
|
90
|
+
"data": ValidatePricingResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
93
|
+
|
|
94
|
+
|