Skip to content

Commit 2310a8b

Browse files
committed
fix: updated php-sdk
1 parent ed0a05a commit 2310a8b

File tree

357 files changed

+12750
-3249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+12750
-3249
lines changed

README.md

Lines changed: 82 additions & 48 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hostinger/api-php-sdk",
3-
"version": "0.0.26",
3+
"version": "0.0.27",
44
"description": "Hostinger API PHP SDK",
55
"keywords": [
66
"hostinger",

docs/Api/BillingCatalogApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ All URIs are relative to https://developers.hostinger.com, except if the operati
1010
## `getCatalogItemListV1()`
1111

1212
```php
13-
getCatalogItemListV1($category, $name): \Hostinger\Model\BillingV1CatalogCatalogItemResource[]
13+
getCatalogItemListV1($category, $name): \Hostinger\Model\BillingV1CatalogCatalogItemCollection
1414
```
1515

1616
Get catalog item list
1717

18-
This endpoint retrieves a list of 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`.
18+
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.
1919

2020
### Example
2121

@@ -49,7 +49,7 @@ try {
4949

5050
### Return type
5151

52-
[**\Hostinger\Model\BillingV1CatalogCatalogItemResource[]**](../Model/BillingV1CatalogCatalogItemResource.md)
52+
[**\Hostinger\Model\BillingV1CatalogCatalogItemCollection**](../Model/BillingV1CatalogCatalogItemCollection.md)
5353

5454
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
5555
[[Back to Model list]](../../README.md#models)

docs/Api/BillingOrdersApi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ All URIs are relative to https://developers.hostinger.com, except if the operati
44

55
| Method | HTTP request | Description |
66
| ------------- | ------------- | ------------- |
7-
| [**createNewServiceOrderV1()**](BillingOrdersApi.md#createNewServiceOrderV1) | **POST** /api/billing/v1/orders | Create new service order |
7+
| [**createServiceOrderV1()**](BillingOrdersApi.md#createServiceOrderV1) | **POST** /api/billing/v1/orders | Create service order |
88

99

10-
## `createNewServiceOrderV1()`
10+
## `createServiceOrderV1()`
1111

1212
```php
13-
createNewServiceOrderV1($billingV1OrderStoreRequest): \Hostinger\Model\BillingV1OrderOrderResource
13+
createServiceOrderV1($billingV1OrderStoreRequest): \Hostinger\Model\BillingV1OrderOrderResource
1414
```
1515

16-
Create new service order
16+
Create service order
1717

18-
This endpoint creates 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.
18+
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.
1919

2020
### Example
2121

@@ -32,10 +32,10 @@ $apiInstance = new Hostinger\Api\BillingOrdersApi(config: $config);
3232
$billingV1OrderStoreRequest = new \Hostinger\Model\BillingV1OrderStoreRequest(); // \Hostinger\Model\BillingV1OrderStoreRequest
3333

3434
try {
35-
$result = $apiInstance->createNewServiceOrderV1($billingV1OrderStoreRequest);
35+
$result = $apiInstance->createServiceOrderV1($billingV1OrderStoreRequest);
3636
print_r($result);
3737
} catch (Exception $e) {
38-
echo 'Exception when calling BillingOrdersApi->createNewServiceOrderV1: ', $e->getMessage(), PHP_EOL;
38+
echo 'Exception when calling BillingOrdersApi->createServiceOrderV1: ', $e->getMessage(), PHP_EOL;
3939
}
4040
```
4141

docs/Api/BillingPaymentMethodsApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ deletePaymentMethodV1($paymentMethodId): \Hostinger\Model\CommonSuccessEmptyReso
1717

1818
Delete payment method
1919

20-
This endpoint deletes a payment method from your account.
20+
Delete a payment method from your account. Use this endpoint to remove unused payment methods from user accounts.
2121

2222
### Example
2323

@@ -58,12 +58,12 @@ try {
5858
## `getPaymentMethodListV1()`
5959

6060
```php
61-
getPaymentMethodListV1(): \Hostinger\Model\BillingV1PaymentMethodPaymentMethodResource[]
61+
getPaymentMethodListV1(): \Hostinger\Model\BillingV1PaymentMethodPaymentMethodCollection
6262
```
6363

6464
Get payment method list
6565

66-
This endpoint retrieves a list of 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).
66+
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.
6767

6868
### Example
6969

@@ -92,7 +92,7 @@ This endpoint does not need any parameter.
9292

9393
### Return type
9494

95-
[**\Hostinger\Model\BillingV1PaymentMethodPaymentMethodResource[]**](../Model/BillingV1PaymentMethodPaymentMethodResource.md)
95+
[**\Hostinger\Model\BillingV1PaymentMethodPaymentMethodCollection**](../Model/BillingV1PaymentMethodPaymentMethodCollection.md)
9696

9797
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
9898
[[Back to Model list]](../../README.md#models)
@@ -106,7 +106,7 @@ setDefaultPaymentMethodV1($paymentMethodId): \Hostinger\Model\CommonSuccessEmpty
106106

107107
Set default payment method
108108

109-
This endpoint sets default payment method for your account.
109+
Set the default payment method for your account. Use this endpoint to configure the primary payment method for future orders.
110110

111111
### Example
112112

docs/Api/BillingSubscriptionsApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cancelSubscriptionV1($subscriptionId, $billingV1SubscriptionCancelRequest): \Hos
1616

1717
Cancel subscription
1818

19-
This endpoint cancels a subscription and stops any further billing.
19+
Cancel a subscription and stop any further billing. Use this endpoint when users want to terminate active services.
2020

2121
### Example
2222

@@ -59,12 +59,12 @@ try {
5959
## `getSubscriptionListV1()`
6060

6161
```php
62-
getSubscriptionListV1(): \Hostinger\Model\BillingV1SubscriptionSubscriptionResource[]
62+
getSubscriptionListV1(): \Hostinger\Model\BillingV1SubscriptionSubscriptionCollection
6363
```
6464

6565
Get subscription list
6666

67-
This endpoint retrieves a list of all subscriptions associated with your account.
67+
Retrieve a list of all subscriptions associated with your account. Use this endpoint to monitor active services and billing status.
6868

6969
### Example
7070

@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
9393

9494
### Return type
9595

96-
[**\Hostinger\Model\BillingV1SubscriptionSubscriptionResource[]**](../Model/BillingV1SubscriptionSubscriptionResource.md)
96+
[**\Hostinger\Model\BillingV1SubscriptionSubscriptionCollection**](../Model/BillingV1SubscriptionSubscriptionCollection.md)
9797

9898
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
9999
[[Back to Model list]](../../README.md#models)

docs/Api/DNSSnapshotApi.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ All URIs are relative to https://developers.hostinger.com, except if the operati
44

55
| Method | HTTP request | Description |
66
| ------------- | ------------- | ------------- |
7-
| [**getSnapshotListV1()**](DNSSnapshotApi.md#getSnapshotListV1) | **GET** /api/dns/v1/snapshots/{domain} | Get snapshot list |
8-
| [**getSnapshotV1()**](DNSSnapshotApi.md#getSnapshotV1) | **GET** /api/dns/v1/snapshots/{domain}/{snapshotId} | Get snapshot |
9-
| [**restoreSnapshotV1()**](DNSSnapshotApi.md#restoreSnapshotV1) | **POST** /api/dns/v1/snapshots/{domain}/{snapshotId}/restore | Restore snapshot |
7+
| [**getDNSSnapshotListV1()**](DNSSnapshotApi.md#getDNSSnapshotListV1) | **GET** /api/dns/v1/snapshots/{domain} | Get DNS snapshot list |
8+
| [**getDNSSnapshotV1()**](DNSSnapshotApi.md#getDNSSnapshotV1) | **GET** /api/dns/v1/snapshots/{domain}/{snapshotId} | Get DNS snapshot |
9+
| [**restoreDNSSnapshotV1()**](DNSSnapshotApi.md#restoreDNSSnapshotV1) | **POST** /api/dns/v1/snapshots/{domain}/{snapshotId}/restore | Restore DNS snapshot |
1010

1111

12-
## `getSnapshotListV1()`
12+
## `getDNSSnapshotListV1()`
1313

1414
```php
15-
getSnapshotListV1($domain): \Hostinger\Model\DNSV1SnapshotSnapshotResource[]
15+
getDNSSnapshotListV1($domain): \Hostinger\Model\DNSV1SnapshotSnapshotCollection
1616
```
1717

18-
Get snapshot list
18+
Get DNS snapshot list
1919

20-
This endpoint retrieves list of DNS snapshots.
20+
Retrieve DNS snapshots for a domain. Use this endpoint to view available DNS backup points for restoration.
2121

2222
### Example
2323

@@ -34,10 +34,10 @@ $apiInstance = new Hostinger\Api\DNSSnapshotApi(config: $config);
3434
$domain = mydomain.tld; // string | Domain name
3535

3636
try {
37-
$result = $apiInstance->getSnapshotListV1($domain);
37+
$result = $apiInstance->getDNSSnapshotListV1($domain);
3838
print_r($result);
3939
} catch (Exception $e) {
40-
echo 'Exception when calling DNSSnapshotApi->getSnapshotListV1: ', $e->getMessage(), PHP_EOL;
40+
echo 'Exception when calling DNSSnapshotApi->getDNSSnapshotListV1: ', $e->getMessage(), PHP_EOL;
4141
}
4242
```
4343

@@ -49,21 +49,21 @@ try {
4949

5050
### Return type
5151

52-
[**\Hostinger\Model\DNSV1SnapshotSnapshotResource[]**](../Model/DNSV1SnapshotSnapshotResource.md)
52+
[**\Hostinger\Model\DNSV1SnapshotSnapshotCollection**](../Model/DNSV1SnapshotSnapshotCollection.md)
5353

5454
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
5555
[[Back to Model list]](../../README.md#models)
5656
[[Back to README]](../../README.md)
5757

58-
## `getSnapshotV1()`
58+
## `getDNSSnapshotV1()`
5959

6060
```php
61-
getSnapshotV1($domain, $snapshotId): \Hostinger\Model\DNSV1SnapshotSnapshotWithContentResource
61+
getDNSSnapshotV1($domain, $snapshotId): \Hostinger\Model\DNSV1SnapshotSnapshotWithContentResource
6262
```
6363

64-
Get snapshot
64+
Get DNS snapshot
6565

66-
This endpoint retrieves particular DNS snapshot with the contents of DNS zone records.
66+
Retrieve particular DNS snapshot with contents of DNS zone records. Use this endpoint to view historical DNS configurations for domains.
6767

6868
### Example
6969

@@ -81,10 +81,10 @@ $domain = mydomain.tld; // string | Domain name
8181
$snapshotId = 53513053; // int | Snapshot ID
8282

8383
try {
84-
$result = $apiInstance->getSnapshotV1($domain, $snapshotId);
84+
$result = $apiInstance->getDNSSnapshotV1($domain, $snapshotId);
8585
print_r($result);
8686
} catch (Exception $e) {
87-
echo 'Exception when calling DNSSnapshotApi->getSnapshotV1: ', $e->getMessage(), PHP_EOL;
87+
echo 'Exception when calling DNSSnapshotApi->getDNSSnapshotV1: ', $e->getMessage(), PHP_EOL;
8888
}
8989
```
9090

@@ -103,15 +103,15 @@ try {
103103
[[Back to Model list]](../../README.md#models)
104104
[[Back to README]](../../README.md)
105105

106-
## `restoreSnapshotV1()`
106+
## `restoreDNSSnapshotV1()`
107107

108108
```php
109-
restoreSnapshotV1($domain, $snapshotId): \Hostinger\Model\CommonSuccessEmptyResource
109+
restoreDNSSnapshotV1($domain, $snapshotId): \Hostinger\Model\CommonSuccessEmptyResource
110110
```
111111

112-
Restore snapshot
112+
Restore DNS snapshot
113113

114-
This endpoint restores DNS zone to the selected snapshot.
114+
Restore DNS zone to the selected snapshot. Use this endpoint to revert domain DNS to a previous configuration.
115115

116116
### Example
117117

@@ -129,10 +129,10 @@ $domain = mydomain.tld; // string | Domain name
129129
$snapshotId = 53513053; // int | Snapshot ID
130130

131131
try {
132-
$result = $apiInstance->restoreSnapshotV1($domain, $snapshotId);
132+
$result = $apiInstance->restoreDNSSnapshotV1($domain, $snapshotId);
133133
print_r($result);
134134
} catch (Exception $e) {
135-
echo 'Exception when calling DNSSnapshotApi->restoreSnapshotV1: ', $e->getMessage(), PHP_EOL;
135+
echo 'Exception when calling DNSSnapshotApi->restoreDNSSnapshotV1: ', $e->getMessage(), PHP_EOL;
136136
}
137137
```
138138

0 commit comments

Comments
 (0)