hostinger-api-sdk 0.0.11 → 0.0.13

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.
Files changed (132) hide show
  1. package/README.md +2 -2
  2. package/api.ts +2333 -1289
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +1701 -1059
  7. package/dist/api.js +1739 -976
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +1701 -1059
  15. package/dist/esm/api.js +1728 -969
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/BillingCatalogApi.md +64 -0
  27. package/docs/BillingOrdersApi.md +63 -0
  28. package/docs/BillingPaymentMethodsApi.md +162 -0
  29. package/docs/BillingSubscriptionsApi.md +113 -0
  30. package/docs/BillingV1CatalogCatalogItemPriceResource.md +32 -0
  31. package/docs/BillingV1CatalogCatalogItemResource.md +28 -0
  32. package/docs/BillingV1OrderOrderBillingAddressResource.md +40 -0
  33. package/docs/BillingV1OrderOrderResource.md +36 -0
  34. package/docs/BillingV1OrderStoreRequest.md +24 -0
  35. package/docs/BillingV1OrderStoreRequestItemsInner.md +22 -0
  36. package/docs/BillingV1OrderVirtualMachineOrderResource.md +22 -0
  37. package/docs/BillingV1PaymentMethodPaymentMethodResource.md +36 -0
  38. package/docs/BillingV1SubscriptionCancelRequest.md +22 -0
  39. package/docs/BillingV1SubscriptionSubscriptionResource.md +42 -0
  40. package/docs/CommonSchemaPaginationMetaSchema.md +24 -0
  41. package/docs/CommonSuccessEmptyResource.md +20 -0
  42. package/docs/DNSSnapshotApi.md +175 -0
  43. package/docs/DNSV1SnapshotSnapshotResource.md +24 -0
  44. package/docs/DNSV1SnapshotSnapshotWithContentResource.md +26 -0
  45. package/docs/DNSV1ZoneDestroyRequest.md +20 -0
  46. package/docs/DNSV1ZoneDestroyRequestFiltersInner.md +22 -0
  47. package/docs/DNSV1ZoneNameRecordResource.md +22 -0
  48. package/docs/DNSV1ZoneRecordResource.md +26 -0
  49. package/docs/DNSV1ZoneResetRequest.md +24 -0
  50. package/docs/DNSV1ZoneUpdateRequest.md +22 -0
  51. package/docs/DNSV1ZoneUpdateRequestZoneInner.md +26 -0
  52. package/docs/DNSV1ZoneUpdateRequestZoneInnerRecordsInner.md +20 -0
  53. package/docs/DNSZoneApi.md +297 -0
  54. package/docs/DomainsAvailabilityApi.md +63 -0
  55. package/docs/DomainsForwardingApi.md +171 -0
  56. package/docs/DomainsPortfolioApi.md +439 -0
  57. package/docs/DomainsV1AvailabilityAvailabilityRequest.md +24 -0
  58. package/docs/DomainsV1AvailabilityAvailabilityResource.md +26 -0
  59. package/docs/DomainsV1DomainDomainExtendedResource.md +48 -0
  60. package/docs/DomainsV1DomainDomainExtendedResourceDomainContacts.md +27 -0
  61. package/docs/DomainsV1DomainDomainExtendedResourceNameServers.md +23 -0
  62. package/docs/DomainsV1DomainDomainResource.md +30 -0
  63. package/docs/DomainsV1ForwardingForwardingResource.md +28 -0
  64. package/docs/DomainsV1ForwardingStoreRequest.md +24 -0
  65. package/docs/DomainsV1PortfolioPurchaseRequest.md +30 -0
  66. package/docs/DomainsV1PortfolioPurchaseRequestDomainContacts.md +27 -0
  67. package/docs/DomainsV1PortfolioUpdateNameserversRequest.md +26 -0
  68. package/docs/DomainsV1WHOISProfileResource.md +34 -0
  69. package/docs/DomainsV1WHOISStoreRequest.md +28 -0
  70. package/docs/DomainsWHOISApi.md +279 -0
  71. package/docs/InlineObject.md +22 -0
  72. package/docs/InlineObject1.md +22 -0
  73. package/docs/InlineObject2.md +24 -0
  74. package/docs/InlineObject2Errors.md +23 -0
  75. package/docs/VPSActionsApi.md +121 -0
  76. package/docs/VPSBackupsApi.md +121 -0
  77. package/docs/VPSDataCentersApi.md +54 -0
  78. package/docs/VPSDockerManagerApi.md +585 -0
  79. package/docs/VPSFirewallApi.md +577 -0
  80. package/docs/VPSGetActionsV1200Response.md +22 -0
  81. package/docs/VPSGetBackupsV1200Response.md +22 -0
  82. package/docs/VPSGetFirewallListV1200Response.md +22 -0
  83. package/docs/VPSGetPostInstallScriptsV1200Response.md +22 -0
  84. package/docs/VPSGetPublicKeysV1200Response.md +22 -0
  85. package/docs/VPSMalwareScannerApi.md +172 -0
  86. package/docs/VPSOSTemplatesApi.md +108 -0
  87. package/docs/VPSPTRRecordsApi.md +126 -0
  88. package/docs/VPSPostInstallScriptsApi.md +284 -0
  89. package/docs/VPSPublicKeysApi.md +230 -0
  90. package/docs/VPSRecoveryApi.md +120 -0
  91. package/docs/VPSSnapshotsApi.md +223 -0
  92. package/docs/VPSV1ActionActionResource.md +28 -0
  93. package/docs/VPSV1BackupBackupResource.md +24 -0
  94. package/docs/VPSV1DataCenterDataCenterResource.md +28 -0
  95. package/docs/VPSV1DockerManagerContainerPortResource.md +36 -0
  96. package/docs/VPSV1DockerManagerContainerResource.md +34 -0
  97. package/docs/VPSV1DockerManagerContainerStatsResource.md +30 -0
  98. package/docs/VPSV1DockerManagerContentResource.md +20 -0
  99. package/docs/VPSV1DockerManagerLogEntryResource.md +22 -0
  100. package/docs/VPSV1DockerManagerLogsResource.md +22 -0
  101. package/docs/VPSV1DockerManagerProjectResource.md +26 -0
  102. package/docs/VPSV1FirewallFirewallResource.md +30 -0
  103. package/docs/VPSV1FirewallFirewallRuleResource.md +30 -0
  104. package/docs/VPSV1FirewallRulesStoreRequest.md +26 -0
  105. package/docs/VPSV1FirewallStoreRequest.md +20 -0
  106. package/docs/VPSV1IPAddressIPAddressResource.md +24 -0
  107. package/docs/VPSV1MalwareMetricsResource.md +30 -0
  108. package/docs/VPSV1MetricsMetricsCollection.md +30 -0
  109. package/docs/VPSV1MetricsMetricsResource.md +22 -0
  110. package/docs/VPSV1PostInstallScriptPostInstallScriptResource.md +28 -0
  111. package/docs/VPSV1PostInstallScriptStoreRequest.md +22 -0
  112. package/docs/VPSV1PublicKeyAttachRequest.md +20 -0
  113. package/docs/VPSV1PublicKeyPublicKeyResource.md +24 -0
  114. package/docs/VPSV1PublicKeyStoreRequest.md +22 -0
  115. package/docs/VPSV1SnapshotSnapshotResource.md +24 -0
  116. package/docs/VPSV1TemplateTemplateResource.md +26 -0
  117. package/docs/VPSV1VirtualMachineDockerManagerUpRequest.md +22 -0
  118. package/docs/VPSV1VirtualMachineHostnameUpdateRequest.md +20 -0
  119. package/docs/VPSV1VirtualMachineMetricGetRequest.md +22 -0
  120. package/docs/VPSV1VirtualMachineNameserversUpdateRequest.md +24 -0
  121. package/docs/VPSV1VirtualMachinePTRStoreRequest.md +20 -0
  122. package/docs/VPSV1VirtualMachinePanelPasswordUpdateRequest.md +20 -0
  123. package/docs/VPSV1VirtualMachinePurchaseRequest.md +26 -0
  124. package/docs/VPSV1VirtualMachineRecoveryStartRequest.md +20 -0
  125. package/docs/VPSV1VirtualMachineRecreateRequest.md +26 -0
  126. package/docs/VPSV1VirtualMachineRootPasswordUpdateRequest.md +20 -0
  127. package/docs/VPSV1VirtualMachineSetupRequest.md +38 -0
  128. package/docs/VPSV1VirtualMachineSetupRequestPublicKey.md +23 -0
  129. package/docs/VPSV1VirtualMachineVirtualMachineResource.md +52 -0
  130. package/docs/VPSVirtualMachineApi.md +852 -0
  131. package/index.ts +1 -1
  132. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.0.68
4
+ * API Version: 0.0.97
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.0.68
6
+ * API Version: 0.0.97
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.0.68
4
+ * API Version: 0.0.97
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.0.68
6
+ * API Version: 0.0.97
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.0.68
4
+ * API Version: 0.0.97
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.0.68
6
+ * API Version: 0.0.97
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/0.0.11" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/0.0.13" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.0.68
4
+ * API Version: 0.0.97
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.0.68
6
+ * API Version: 0.0.97
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.0.68
4
+ * API Version: 0.0.97
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 0.0.68
7
+ * API Version: 0.0.97
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -0,0 +1,64 @@
1
+ # BillingCatalogApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getCatalogItemListV1**](#getcatalogitemlistv1) | **GET** /api/billing/v1/catalog | Get catalog item list|
8
+
9
+ # **getCatalogItemListV1**
10
+ > Array<BillingV1CatalogCatalogItemResource> getCatalogItemListV1()
11
+
12
+ Retrieve catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`. Use this endpoint to view available services and pricing before placing orders.
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ BillingCatalogApi,
19
+ Configuration
20
+ } from 'hostinger-api-sdk';
21
+
22
+ const configuration = new Configuration();
23
+ const apiInstance = new BillingCatalogApi(configuration);
24
+
25
+ let category: 'DOMAIN' | 'VPS'; //Filter catalog items by category (optional) (default to undefined)
26
+ let name: string; //Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain (optional) (default to undefined)
27
+
28
+ const { status, data } = await apiInstance.getCatalogItemListV1(
29
+ category,
30
+ name
31
+ );
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ |Name | Type | Description | Notes|
37
+ |------------- | ------------- | ------------- | -------------|
38
+ | **category** | [**&#39;DOMAIN&#39; | &#39;VPS&#39;**]**Array<&#39;DOMAIN&#39; &#124; &#39;VPS&#39;>** | Filter catalog items by category | (optional) defaults to undefined|
39
+ | **name** | [**string**] | Filter catalog items by name. Use &#x60;*&#x60; for wildcard search, e.g. &#x60;.COM*&#x60; to find .com domain | (optional) defaults to undefined|
40
+
41
+
42
+ ### Return type
43
+
44
+ **Array<BillingV1CatalogCatalogItemResource>**
45
+
46
+ ### Authorization
47
+
48
+ [apiToken](../README.md#apiToken)
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: Not defined
53
+ - **Accept**: application/json
54
+
55
+
56
+ ### HTTP response details
57
+ | Status code | Description | Response headers |
58
+ |-------------|-------------|------------------|
59
+ |**200** | Success response | - |
60
+ |**401** | Unauthenticated response | - |
61
+ |**500** | Error response | - |
62
+
63
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
64
+
@@ -0,0 +1,63 @@
1
+ # BillingOrdersApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**createServiceOrderV1**](#createserviceorderv1) | **POST** /api/billing/v1/orders | Create service order|
8
+
9
+ # **createServiceOrderV1**
10
+ > BillingV1OrderOrderResource createServiceOrderV1(billingV1OrderStoreRequest)
11
+
12
+ Create a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ BillingOrdersApi,
19
+ Configuration,
20
+ BillingV1OrderStoreRequest
21
+ } from 'hostinger-api-sdk';
22
+
23
+ const configuration = new Configuration();
24
+ const apiInstance = new BillingOrdersApi(configuration);
25
+
26
+ let billingV1OrderStoreRequest: BillingV1OrderStoreRequest; //
27
+
28
+ const { status, data } = await apiInstance.createServiceOrderV1(
29
+ billingV1OrderStoreRequest
30
+ );
31
+ ```
32
+
33
+ ### Parameters
34
+
35
+ |Name | Type | Description | Notes|
36
+ |------------- | ------------- | ------------- | -------------|
37
+ | **billingV1OrderStoreRequest** | **BillingV1OrderStoreRequest**| | |
38
+
39
+
40
+ ### Return type
41
+
42
+ **BillingV1OrderOrderResource**
43
+
44
+ ### Authorization
45
+
46
+ [apiToken](../README.md#apiToken)
47
+
48
+ ### HTTP request headers
49
+
50
+ - **Content-Type**: application/json
51
+ - **Accept**: application/json
52
+
53
+
54
+ ### HTTP response details
55
+ | Status code | Description | Response headers |
56
+ |-------------|-------------|------------------|
57
+ |**200** | Success response | - |
58
+ |**422** | Validation error response | - |
59
+ |**401** | Unauthenticated response | - |
60
+ |**500** | Error response | - |
61
+
62
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
63
+
@@ -0,0 +1,162 @@
1
+ # BillingPaymentMethodsApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**deletePaymentMethodV1**](#deletepaymentmethodv1) | **DELETE** /api/billing/v1/payment-methods/{paymentMethodId} | Delete payment method|
8
+ |[**getPaymentMethodListV1**](#getpaymentmethodlistv1) | **GET** /api/billing/v1/payment-methods | Get payment method list|
9
+ |[**setDefaultPaymentMethodV1**](#setdefaultpaymentmethodv1) | **POST** /api/billing/v1/payment-methods/{paymentMethodId} | Set default payment method|
10
+
11
+ # **deletePaymentMethodV1**
12
+ > CommonSuccessEmptyResource deletePaymentMethodV1()
13
+
14
+ Delete a payment method from your account. Use this endpoint to remove unused payment methods from user accounts.
15
+
16
+ ### Example
17
+
18
+ ```typescript
19
+ import {
20
+ BillingPaymentMethodsApi,
21
+ Configuration
22
+ } from 'hostinger-api-sdk';
23
+
24
+ const configuration = new Configuration();
25
+ const apiInstance = new BillingPaymentMethodsApi(configuration);
26
+
27
+ let paymentMethodId: number; //Payment method ID (default to undefined)
28
+
29
+ const { status, data } = await apiInstance.deletePaymentMethodV1(
30
+ paymentMethodId
31
+ );
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ |Name | Type | Description | Notes|
37
+ |------------- | ------------- | ------------- | -------------|
38
+ | **paymentMethodId** | [**number**] | Payment method ID | defaults to undefined|
39
+
40
+
41
+ ### Return type
42
+
43
+ **CommonSuccessEmptyResource**
44
+
45
+ ### Authorization
46
+
47
+ [apiToken](../README.md#apiToken)
48
+
49
+ ### HTTP request headers
50
+
51
+ - **Content-Type**: Not defined
52
+ - **Accept**: application/json
53
+
54
+
55
+ ### HTTP response details
56
+ | Status code | Description | Response headers |
57
+ |-------------|-------------|------------------|
58
+ |**200** | Success empty response | - |
59
+ |**401** | Unauthenticated response | - |
60
+ |**500** | Error response | - |
61
+
62
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
63
+
64
+ # **getPaymentMethodListV1**
65
+ > Array<BillingV1PaymentMethodPaymentMethodResource> getPaymentMethodListV1()
66
+
67
+ Retrieve available payment methods that can be used for placing new orders. If you want to add new payment method, please use [hPanel](https://hpanel.hostinger.com/billing/payment-methods). Use this endpoint to view available payment options before creating orders.
68
+
69
+ ### Example
70
+
71
+ ```typescript
72
+ import {
73
+ BillingPaymentMethodsApi,
74
+ Configuration
75
+ } from 'hostinger-api-sdk';
76
+
77
+ const configuration = new Configuration();
78
+ const apiInstance = new BillingPaymentMethodsApi(configuration);
79
+
80
+ const { status, data } = await apiInstance.getPaymentMethodListV1();
81
+ ```
82
+
83
+ ### Parameters
84
+ This endpoint does not have any parameters.
85
+
86
+
87
+ ### Return type
88
+
89
+ **Array<BillingV1PaymentMethodPaymentMethodResource>**
90
+
91
+ ### Authorization
92
+
93
+ [apiToken](../README.md#apiToken)
94
+
95
+ ### HTTP request headers
96
+
97
+ - **Content-Type**: Not defined
98
+ - **Accept**: application/json
99
+
100
+
101
+ ### HTTP response details
102
+ | Status code | Description | Response headers |
103
+ |-------------|-------------|------------------|
104
+ |**200** | Success response | - |
105
+ |**401** | Unauthenticated response | - |
106
+ |**500** | Error response | - |
107
+
108
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
109
+
110
+ # **setDefaultPaymentMethodV1**
111
+ > CommonSuccessEmptyResource setDefaultPaymentMethodV1()
112
+
113
+ Set the default payment method for your account. Use this endpoint to configure the primary payment method for future orders.
114
+
115
+ ### Example
116
+
117
+ ```typescript
118
+ import {
119
+ BillingPaymentMethodsApi,
120
+ Configuration
121
+ } from 'hostinger-api-sdk';
122
+
123
+ const configuration = new Configuration();
124
+ const apiInstance = new BillingPaymentMethodsApi(configuration);
125
+
126
+ let paymentMethodId: number; //Payment method ID (default to undefined)
127
+
128
+ const { status, data } = await apiInstance.setDefaultPaymentMethodV1(
129
+ paymentMethodId
130
+ );
131
+ ```
132
+
133
+ ### Parameters
134
+
135
+ |Name | Type | Description | Notes|
136
+ |------------- | ------------- | ------------- | -------------|
137
+ | **paymentMethodId** | [**number**] | Payment method ID | defaults to undefined|
138
+
139
+
140
+ ### Return type
141
+
142
+ **CommonSuccessEmptyResource**
143
+
144
+ ### Authorization
145
+
146
+ [apiToken](../README.md#apiToken)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: application/json
152
+
153
+
154
+ ### HTTP response details
155
+ | Status code | Description | Response headers |
156
+ |-------------|-------------|------------------|
157
+ |**200** | Success empty response | - |
158
+ |**401** | Unauthenticated response | - |
159
+ |**500** | Error response | - |
160
+
161
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
162
+
@@ -0,0 +1,113 @@
1
+ # BillingSubscriptionsApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**cancelSubscriptionV1**](#cancelsubscriptionv1) | **DELETE** /api/billing/v1/subscriptions/{subscriptionId} | Cancel subscription|
8
+ |[**getSubscriptionListV1**](#getsubscriptionlistv1) | **GET** /api/billing/v1/subscriptions | Get subscription list|
9
+
10
+ # **cancelSubscriptionV1**
11
+ > CommonSuccessEmptyResource cancelSubscriptionV1(billingV1SubscriptionCancelRequest)
12
+
13
+ Cancel a subscription and stop any further billing. Use this endpoint when users want to terminate active services.
14
+
15
+ ### Example
16
+
17
+ ```typescript
18
+ import {
19
+ BillingSubscriptionsApi,
20
+ Configuration,
21
+ BillingV1SubscriptionCancelRequest
22
+ } from 'hostinger-api-sdk';
23
+
24
+ const configuration = new Configuration();
25
+ const apiInstance = new BillingSubscriptionsApi(configuration);
26
+
27
+ let subscriptionId: string; //Subscription ID (default to undefined)
28
+ let billingV1SubscriptionCancelRequest: BillingV1SubscriptionCancelRequest; //
29
+
30
+ const { status, data } = await apiInstance.cancelSubscriptionV1(
31
+ subscriptionId,
32
+ billingV1SubscriptionCancelRequest
33
+ );
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ |Name | Type | Description | Notes|
39
+ |------------- | ------------- | ------------- | -------------|
40
+ | **billingV1SubscriptionCancelRequest** | **BillingV1SubscriptionCancelRequest**| | |
41
+ | **subscriptionId** | [**string**] | Subscription ID | defaults to undefined|
42
+
43
+
44
+ ### Return type
45
+
46
+ **CommonSuccessEmptyResource**
47
+
48
+ ### Authorization
49
+
50
+ [apiToken](../README.md#apiToken)
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: application/json
55
+ - **Accept**: application/json
56
+
57
+
58
+ ### HTTP response details
59
+ | Status code | Description | Response headers |
60
+ |-------------|-------------|------------------|
61
+ |**200** | Success empty response | - |
62
+ |**422** | Validation error response | - |
63
+ |**401** | Unauthenticated response | - |
64
+ |**500** | Error response | - |
65
+
66
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
67
+
68
+ # **getSubscriptionListV1**
69
+ > Array<BillingV1SubscriptionSubscriptionResource> getSubscriptionListV1()
70
+
71
+ Retrieve a list of all subscriptions associated with your account. Use this endpoint to monitor active services and billing status.
72
+
73
+ ### Example
74
+
75
+ ```typescript
76
+ import {
77
+ BillingSubscriptionsApi,
78
+ Configuration
79
+ } from 'hostinger-api-sdk';
80
+
81
+ const configuration = new Configuration();
82
+ const apiInstance = new BillingSubscriptionsApi(configuration);
83
+
84
+ const { status, data } = await apiInstance.getSubscriptionListV1();
85
+ ```
86
+
87
+ ### Parameters
88
+ This endpoint does not have any parameters.
89
+
90
+
91
+ ### Return type
92
+
93
+ **Array<BillingV1SubscriptionSubscriptionResource>**
94
+
95
+ ### Authorization
96
+
97
+ [apiToken](../README.md#apiToken)
98
+
99
+ ### HTTP request headers
100
+
101
+ - **Content-Type**: Not defined
102
+ - **Accept**: application/json
103
+
104
+
105
+ ### HTTP response details
106
+ | Status code | Description | Response headers |
107
+ |-------------|-------------|------------------|
108
+ |**200** | Success response | - |
109
+ |**401** | Unauthenticated response | - |
110
+ |**500** | Error response | - |
111
+
112
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
113
+
@@ -0,0 +1,32 @@
1
+ # BillingV1CatalogCatalogItemPriceResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | Price item ID | [optional] [default to undefined]
9
+ **name** | **string** | Price item name | [optional] [default to undefined]
10
+ **currency** | **string** | Currency code | [optional] [default to undefined]
11
+ **price** | **number** | Price in cents | [optional] [default to undefined]
12
+ **first_period_price** | **number** | First period price in cents | [optional] [default to undefined]
13
+ **period** | **number** | Period | [optional] [default to undefined]
14
+ **period_unit** | **string** | Period unit | [optional] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { BillingV1CatalogCatalogItemPriceResource } from 'hostinger-api-sdk';
20
+
21
+ const instance: BillingV1CatalogCatalogItemPriceResource = {
22
+ id,
23
+ name,
24
+ currency,
25
+ price,
26
+ first_period_price,
27
+ period,
28
+ period_unit,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,28 @@
1
+ # BillingV1CatalogCatalogItemResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | Catalog item ID | [optional] [default to undefined]
9
+ **name** | **string** | | [optional] [default to undefined]
10
+ **category** | **string** | | [optional] [default to undefined]
11
+ **metadata** | **object** | Flexible key-value storage containing category-specific metadata for the catalog item. The structure and available fields vary depending on the item category. | [optional] [default to undefined]
12
+ **prices** | [**Array&lt;BillingV1CatalogCatalogItemPriceResource&gt;**](BillingV1CatalogCatalogItemPriceResource.md) | Array of [&#x60;Billing.V1.Catalog.CatalogItemPriceResource&#x60;](#model/billingv1catalogcatalogitempriceresource) | [optional] [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { BillingV1CatalogCatalogItemResource } from 'hostinger-api-sdk';
18
+
19
+ const instance: BillingV1CatalogCatalogItemResource = {
20
+ id,
21
+ name,
22
+ category,
23
+ metadata,
24
+ prices,
25
+ };
26
+ ```
27
+
28
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,40 @@
1
+ # BillingV1OrderOrderBillingAddressResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **first_name** | **string** | | [optional] [default to undefined]
9
+ **last_name** | **string** | | [optional] [default to undefined]
10
+ **company** | **string** | | [optional] [default to undefined]
11
+ **address_1** | **string** | | [optional] [default to undefined]
12
+ **address_2** | **string** | | [optional] [default to undefined]
13
+ **city** | **string** | | [optional] [default to undefined]
14
+ **state** | **string** | | [optional] [default to undefined]
15
+ **zip** | **string** | | [optional] [default to undefined]
16
+ **country** | **string** | | [optional] [default to undefined]
17
+ **phone** | **string** | | [optional] [default to undefined]
18
+ **email** | **string** | | [optional] [default to undefined]
19
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ import { BillingV1OrderOrderBillingAddressResource } from 'hostinger-api-sdk';
24
+
25
+ const instance: BillingV1OrderOrderBillingAddressResource = {
26
+ first_name,
27
+ last_name,
28
+ company,
29
+ address_1,
30
+ address_2,
31
+ city,
32
+ state,
33
+ zip,
34
+ country,
35
+ phone,
36
+ email,
37
+ };
38
+ ```
39
+
40
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,36 @@
1
+ # BillingV1OrderOrderResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | Order ID | [optional] [default to undefined]
9
+ **subscription_id** | **string** | Subscription ID | [optional] [default to undefined]
10
+ **status** | **string** | | [optional] [default to undefined]
11
+ **currency** | **string** | Currency code | [optional] [default to undefined]
12
+ **subtotal** | **number** | Subtotal price (exc. VAT) in cents | [optional] [default to undefined]
13
+ **total** | **number** | Total price (inc. VAT) in cents | [optional] [default to undefined]
14
+ **billing_address** | [**BillingV1OrderOrderBillingAddressResource**](BillingV1OrderOrderBillingAddressResource.md) | | [optional] [default to undefined]
15
+ **created_at** | **string** | | [optional] [default to undefined]
16
+ **updated_at** | **string** | | [optional] [default to undefined]
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import { BillingV1OrderOrderResource } from 'hostinger-api-sdk';
22
+
23
+ const instance: BillingV1OrderOrderResource = {
24
+ id,
25
+ subscription_id,
26
+ status,
27
+ currency,
28
+ subtotal,
29
+ total,
30
+ billing_address,
31
+ created_at,
32
+ updated_at,
33
+ };
34
+ ```
35
+
36
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,24 @@
1
+ # BillingV1OrderStoreRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **payment_method_id** | **number** | Payment method ID | [default to undefined]
9
+ **items** | [**Array&lt;BillingV1OrderStoreRequestItemsInner&gt;**](BillingV1OrderStoreRequestItemsInner.md) | | [default to undefined]
10
+ **coupons** | **Array&lt;any&gt;** | Discount coupon codes | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { BillingV1OrderStoreRequest } from 'hostinger-api-sdk';
16
+
17
+ const instance: BillingV1OrderStoreRequest = {
18
+ payment_method_id,
19
+ items,
20
+ coupons,
21
+ };
22
+ ```
23
+
24
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)