Skip to content

Commit 28b14ab

Browse files
chore: sdk update
1 parent eb1d5b3 commit 28b14ab

494 files changed

Lines changed: 18463 additions & 544 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 112 additions & 4 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.44",
3+
"version": "0.0.45",
44
"description": "Hostinger API PHP SDK",
55
"keywords": [
66
"hostinger",

docs/Api/BillingOrdersApi.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/Api/BillingSubscriptionsApi.md

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

55
| Method | HTTP request | Description |
66
| ------------- | ------------- | ------------- |
7-
| [**cancelSubscriptionV1()**](BillingSubscriptionsApi.md#cancelSubscriptionV1) | **DELETE** /api/billing/v1/subscriptions/{subscriptionId} | Cancel subscription |
87
| [**disableAutoRenewalV1()**](BillingSubscriptionsApi.md#disableAutoRenewalV1) | **DELETE** /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disable | Disable auto-renewal |
98
| [**enableAutoRenewalV1()**](BillingSubscriptionsApi.md#enableAutoRenewalV1) | **PATCH** /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enable | Enable auto-renewal |
109
| [**getSubscriptionListV1()**](BillingSubscriptionsApi.md#getSubscriptionListV1) | **GET** /api/billing/v1/subscriptions | Get subscription list |
1110

1211

13-
## `cancelSubscriptionV1()`
14-
15-
```php
16-
cancelSubscriptionV1($subscriptionId, $billingV1SubscriptionCancelRequest): \Hostinger\Model\CommonSuccessEmptyResource
17-
```
18-
19-
Cancel subscription
20-
21-
Cancel a subscription and stop any further billing. Use this endpoint when users want to terminate active services.
22-
23-
### Example
24-
25-
```php
26-
<?php
27-
require_once(__DIR__ . '/vendor/autoload.php');
28-
29-
30-
// Configure Bearer authorization: apiToken
31-
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
32-
33-
34-
$apiInstance = new Hostinger\Api\BillingSubscriptionsApi(config: $config);
35-
$subscriptionId = Cxy353Uhl1xC54pG6; // string | Subscription ID
36-
$billingV1SubscriptionCancelRequest = new \Hostinger\Model\BillingV1SubscriptionCancelRequest(); // \Hostinger\Model\BillingV1SubscriptionCancelRequest
37-
38-
try {
39-
$result = $apiInstance->cancelSubscriptionV1($subscriptionId, $billingV1SubscriptionCancelRequest);
40-
print_r($result);
41-
} catch (Exception $e) {
42-
echo 'Exception when calling BillingSubscriptionsApi->cancelSubscriptionV1: ', $e->getMessage(), PHP_EOL;
43-
}
44-
```
45-
46-
### Parameters
47-
48-
| Name | Type | Description | Notes |
49-
| ------------- | ------------- | ------------- | ------------- |
50-
| **subscriptionId** | **string**| Subscription ID | |
51-
| **billingV1SubscriptionCancelRequest** | [**\Hostinger\Model\BillingV1SubscriptionCancelRequest**](../Model/BillingV1SubscriptionCancelRequest.md)| | |
52-
53-
### Return type
54-
55-
[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md)
56-
57-
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
58-
[[Back to Model list]](../../README.md#models)
59-
[[Back to README]](../../README.md)
60-
6112
## `disableAutoRenewalV1()`
6213

6314
```php
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Hostinger\DomainAccessVerifierVerificationsApi
2+
3+
All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
4+
5+
| Method | HTTP request | Description |
6+
| ------------- | ------------- | ------------- |
7+
| [**getDomainVerificationsDIRECT()**](DomainAccessVerifierVerificationsApi.md#getDomainVerificationsDIRECT) | **GET** /api/v2/direct/verifications/active | Get domain verifications |
8+
9+
10+
## `getDomainVerificationsDIRECT()`
11+
12+
```php
13+
getDomainVerificationsDIRECT($domainAccessVerifierV2VerificationsListRequest): \Hostinger\Model\DomainAccessVerifierV2VerificationsActiveVerificationsCollection
14+
```
15+
16+
Get domain verifications
17+
18+
Retrieve a list of pending and completed domain verifications.
19+
20+
### Example
21+
22+
```php
23+
<?php
24+
require_once(__DIR__ . '/vendor/autoload.php');
25+
26+
27+
// Configure Bearer authorization: apiToken
28+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
29+
30+
31+
$apiInstance = new Hostinger\Api\DomainAccessVerifierVerificationsApi(config: $config);
32+
$domainAccessVerifierV2VerificationsListRequest = new \Hostinger\Model\DomainAccessVerifierV2VerificationsListRequest(); // \Hostinger\Model\DomainAccessVerifierV2VerificationsListRequest
33+
34+
try {
35+
$result = $apiInstance->getDomainVerificationsDIRECT($domainAccessVerifierV2VerificationsListRequest);
36+
print_r($result);
37+
} catch (Exception $e) {
38+
echo 'Exception when calling DomainAccessVerifierVerificationsApi->getDomainVerificationsDIRECT: ', $e->getMessage(), PHP_EOL;
39+
}
40+
```
41+
42+
### Parameters
43+
44+
| Name | Type | Description | Notes |
45+
| ------------- | ------------- | ------------- | ------------- |
46+
| **domainAccessVerifierV2VerificationsListRequest** | [**\Hostinger\Model\DomainAccessVerifierV2VerificationsListRequest**](../Model/DomainAccessVerifierV2VerificationsListRequest.md)| | |
47+
48+
### Return type
49+
50+
[**\Hostinger\Model\DomainAccessVerifierV2VerificationsActiveVerificationsCollection**](../Model/DomainAccessVerifierV2VerificationsActiveVerificationsCollection.md)
51+
52+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
53+
[[Back to Model list]](../../README.md#models)
54+
[[Back to README]](../../README.md)

docs/Api/DomainsPortfolioApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ purchaseNewDomainV1($domainsV1PortfolioPurchaseRequest): \Hostinger\Model\Billin
295295

296296
Purchase new domain
297297

298-
Purchase and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing purchase. Use this endpoint to register new domains for users.
298+
Purchase and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing purchase. Use this endpoint to register new domains for users.
299299

300300
### Example
301301

docs/Api/EcommercePaymentsApi.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Hostinger\EcommercePaymentsApi
2+
3+
All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
4+
5+
| Method | HTTP request | Description |
6+
| ------------- | ------------- | ------------- |
7+
| [**enableManualPaymentMethodV1()**](EcommercePaymentsApi.md#enableManualPaymentMethodV1) | **POST** /api/ecommerce/v1/stores/{store_id}/payment-methods/manual | Enable manual payment method |
8+
9+
10+
## `enableManualPaymentMethodV1()`
11+
12+
```php
13+
enableManualPaymentMethodV1($storeId, $ecommerceV1PaymentEnableManualPaymentRequest): \Hostinger\Model\EcommerceV1PaymentManualPaymentResource
14+
```
15+
16+
Enable manual payment method
17+
18+
Enable a manual payment method so the store can accept orders without an online payment provider.
19+
20+
### Example
21+
22+
```php
23+
<?php
24+
require_once(__DIR__ . '/vendor/autoload.php');
25+
26+
27+
// Configure Bearer authorization: apiToken
28+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
29+
30+
31+
$apiInstance = new Hostinger\Api\EcommercePaymentsApi(config: $config);
32+
$storeId = store_01J8Z5F8W9K8M4A7B3C2D1E0FG; // string | The ID of the store to enable manual payment for.
33+
$ecommerceV1PaymentEnableManualPaymentRequest = new \Hostinger\Model\EcommerceV1PaymentEnableManualPaymentRequest(); // \Hostinger\Model\EcommerceV1PaymentEnableManualPaymentRequest
34+
35+
try {
36+
$result = $apiInstance->enableManualPaymentMethodV1($storeId, $ecommerceV1PaymentEnableManualPaymentRequest);
37+
print_r($result);
38+
} catch (Exception $e) {
39+
echo 'Exception when calling EcommercePaymentsApi->enableManualPaymentMethodV1: ', $e->getMessage(), PHP_EOL;
40+
}
41+
```
42+
43+
### Parameters
44+
45+
| Name | Type | Description | Notes |
46+
| ------------- | ------------- | ------------- | ------------- |
47+
| **storeId** | **string**| The ID of the store to enable manual payment for. | |
48+
| **ecommerceV1PaymentEnableManualPaymentRequest** | [**\Hostinger\Model\EcommerceV1PaymentEnableManualPaymentRequest**](../Model/EcommerceV1PaymentEnableManualPaymentRequest.md)| | |
49+
50+
### Return type
51+
52+
[**\Hostinger\Model\EcommerceV1PaymentManualPaymentResource**](../Model/EcommerceV1PaymentManualPaymentResource.md)
53+
54+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
55+
[[Back to Model list]](../../README.md#models)
56+
[[Back to README]](../../README.md)

docs/Api/EcommerceProductsApi.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Hostinger\EcommerceProductsApi
2+
3+
All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
4+
5+
| Method | HTTP request | Description |
6+
| ------------- | ------------- | ------------- |
7+
| [**createDigitalProductV1()**](EcommerceProductsApi.md#createDigitalProductV1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product |
8+
| [**createPhysicalProductV1()**](EcommerceProductsApi.md#createPhysicalProductV1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product |
9+
10+
11+
## `createDigitalProductV1()`
12+
13+
```php
14+
createDigitalProductV1($storeId, $ecommerceV1ProductCreateDigitalProductRequest): \Hostinger\Model\EcommerceV1ProductProductCreationResource
15+
```
16+
17+
Create digital product
18+
19+
Create a published digital product with a single variant and an optional external download link.
20+
21+
### Example
22+
23+
```php
24+
<?php
25+
require_once(__DIR__ . '/vendor/autoload.php');
26+
27+
28+
// Configure Bearer authorization: apiToken
29+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
30+
31+
32+
$apiInstance = new Hostinger\Api\EcommerceProductsApi(config: $config);
33+
$storeId = store_01J8Z5F8W9K8M4A7B3C2D1E0FG; // string | The ID of the store to create the product in.
34+
$ecommerceV1ProductCreateDigitalProductRequest = new \Hostinger\Model\EcommerceV1ProductCreateDigitalProductRequest(); // \Hostinger\Model\EcommerceV1ProductCreateDigitalProductRequest
35+
36+
try {
37+
$result = $apiInstance->createDigitalProductV1($storeId, $ecommerceV1ProductCreateDigitalProductRequest);
38+
print_r($result);
39+
} catch (Exception $e) {
40+
echo 'Exception when calling EcommerceProductsApi->createDigitalProductV1: ', $e->getMessage(), PHP_EOL;
41+
}
42+
```
43+
44+
### Parameters
45+
46+
| Name | Type | Description | Notes |
47+
| ------------- | ------------- | ------------- | ------------- |
48+
| **storeId** | **string**| The ID of the store to create the product in. | |
49+
| **ecommerceV1ProductCreateDigitalProductRequest** | [**\Hostinger\Model\EcommerceV1ProductCreateDigitalProductRequest**](../Model/EcommerceV1ProductCreateDigitalProductRequest.md)| | |
50+
51+
### Return type
52+
53+
[**\Hostinger\Model\EcommerceV1ProductProductCreationResource**](../Model/EcommerceV1ProductProductCreationResource.md)
54+
55+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
56+
[[Back to Model list]](../../README.md#models)
57+
[[Back to README]](../../README.md)
58+
59+
## `createPhysicalProductV1()`
60+
61+
```php
62+
createPhysicalProductV1($storeId, $ecommerceV1ProductCreatePhysicalProductRequest): \Hostinger\Model\EcommerceV1ProductProductCreationResource
63+
```
64+
65+
Create physical product
66+
67+
Create a published physical product with a single variant priced in the store currency.
68+
69+
### Example
70+
71+
```php
72+
<?php
73+
require_once(__DIR__ . '/vendor/autoload.php');
74+
75+
76+
// Configure Bearer authorization: apiToken
77+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
78+
79+
80+
$apiInstance = new Hostinger\Api\EcommerceProductsApi(config: $config);
81+
$storeId = store_01J8Z5F8W9K8M4A7B3C2D1E0FG; // string | The ID of the store to create the product in.
82+
$ecommerceV1ProductCreatePhysicalProductRequest = new \Hostinger\Model\EcommerceV1ProductCreatePhysicalProductRequest(); // \Hostinger\Model\EcommerceV1ProductCreatePhysicalProductRequest
83+
84+
try {
85+
$result = $apiInstance->createPhysicalProductV1($storeId, $ecommerceV1ProductCreatePhysicalProductRequest);
86+
print_r($result);
87+
} catch (Exception $e) {
88+
echo 'Exception when calling EcommerceProductsApi->createPhysicalProductV1: ', $e->getMessage(), PHP_EOL;
89+
}
90+
```
91+
92+
### Parameters
93+
94+
| Name | Type | Description | Notes |
95+
| ------------- | ------------- | ------------- | ------------- |
96+
| **storeId** | **string**| The ID of the store to create the product in. | |
97+
| **ecommerceV1ProductCreatePhysicalProductRequest** | [**\Hostinger\Model\EcommerceV1ProductCreatePhysicalProductRequest**](../Model/EcommerceV1ProductCreatePhysicalProductRequest.md)| | |
98+
99+
### Return type
100+
101+
[**\Hostinger\Model\EcommerceV1ProductProductCreationResource**](../Model/EcommerceV1ProductProductCreationResource.md)
102+
103+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
104+
[[Back to Model list]](../../README.md#models)
105+
[[Back to README]](../../README.md)

0 commit comments

Comments
 (0)