Skip to content

Commit 8429d31

Browse files
committed
chore: SDK update
1 parent 0902af2 commit 8429d31

File tree

240 files changed

+35844
-1
lines changed

Some content is hidden

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

240 files changed

+35844
-1
lines changed

.github/workflows/python.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
4+
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
5+
6+
name: hostinger-api Python package
7+
8+
on: [push, pull_request]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install -r test-requirements.txt
29+
- name: Test with pytest
30+
run: |
31+
pytest --cov=hostinger-api

.gitignore

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,66 @@
1-
.idea/
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.venv/
49+
.python-version
50+
.pytest_cache
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
59+
# Sphinx documentation
60+
docs/_build/
61+
62+
# PyBuilder
63+
target/
64+
65+
#Ipython Notebook
66+
.ipynb_checkpoints

README.md

Lines changed: 267 additions & 0 deletions
Large diffs are not rendered by default.

docs/BillingCatalogApi.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# hostinger-api.BillingCatalogApi
2+
3+
All URIs are relative to *https://developers.hostinger.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_catalog_item_list_v1**](BillingCatalogApi.md#get_catalog_item_list_v1) | **GET** /api/billing/v1/catalog | Get catalog item list
8+
9+
10+
# **get_catalog_item_list_v1**
11+
> List[BillingV1CatalogCatalogItemResource] get_catalog_item_list_v1()
12+
13+
Get catalog item list
14+
15+
This endpoint retrieves a list of catalog items available for order.
16+
17+
Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
18+
19+
### Example
20+
21+
* Bearer Authentication (apiToken):
22+
23+
```python
24+
import hostinger-api
25+
from hostinger-api.models.billing_v1_catalog_catalog_item_resource import BillingV1CatalogCatalogItemResource
26+
from hostinger-api.rest import ApiException
27+
from pprint import pprint
28+
29+
# Defining the host is optional and defaults to https://developers.hostinger.com
30+
# See configuration.py for a list of all supported configuration parameters.
31+
configuration = hostinger-api.Configuration(
32+
host = "https://developers.hostinger.com"
33+
)
34+
35+
# The client must configure the authentication and authorization parameters
36+
# in accordance with the API server security policy.
37+
# Examples for each auth method are provided below, use the example that
38+
# satisfies your auth use case.
39+
40+
# Configure Bearer authorization: apiToken
41+
configuration = hostinger-api.Configuration(
42+
access_token = os.environ["BEARER_TOKEN"]
43+
)
44+
45+
# Enter a context with an instance of the API client
46+
with hostinger-api.ApiClient(configuration) as api_client:
47+
# Create an instance of the API class
48+
api_instance = hostinger-api.BillingCatalogApi(api_client)
49+
50+
try:
51+
# Get catalog item list
52+
api_response = api_instance.get_catalog_item_list_v1()
53+
print("The response of BillingCatalogApi->get_catalog_item_list_v1:\n")
54+
pprint(api_response)
55+
except Exception as e:
56+
print("Exception when calling BillingCatalogApi->get_catalog_item_list_v1: %s\n" % e)
57+
```
58+
59+
60+
61+
### Parameters
62+
63+
This endpoint does not need any parameter.
64+
65+
### Return type
66+
67+
[**List[BillingV1CatalogCatalogItemResource]**](BillingV1CatalogCatalogItemResource.md)
68+
69+
### Authorization
70+
71+
[apiToken](../README.md#apiToken)
72+
73+
### HTTP request headers
74+
75+
- **Content-Type**: Not defined
76+
- **Accept**: application/json
77+
78+
### HTTP response details
79+
80+
| Status code | Description | Response headers |
81+
|-------------|-------------|------------------|
82+
**200** | Success response | - |
83+
**401** | Unauthenticated | - |
84+
**500** | Error response | - |
85+
86+
[[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)
87+

docs/BillingOrdersApi.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# hostinger-api.BillingOrdersApi
2+
3+
All URIs are relative to *https://developers.hostinger.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**create_new_service_order_v1**](BillingOrdersApi.md#create_new_service_order_v1) | **POST** /api/billing/v1/orders | Create new service order
8+
9+
10+
# **create_new_service_order_v1**
11+
> BillingV1OrderOrderResource create_new_service_order_v1(billing_v1_order_store_request)
12+
13+
Create new service order
14+
15+
This endpoint creates a new service order.
16+
17+
To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
18+
Coupons also can be provided during order creation.
19+
20+
Orders created using this endpoint will be set for automatically renewal.
21+
22+
### Example
23+
24+
* Bearer Authentication (apiToken):
25+
26+
```python
27+
import hostinger-api
28+
from hostinger-api.models.billing_v1_order_order_resource import BillingV1OrderOrderResource
29+
from hostinger-api.models.billing_v1_order_store_request import BillingV1OrderStoreRequest
30+
from hostinger-api.rest import ApiException
31+
from pprint import pprint
32+
33+
# Defining the host is optional and defaults to https://developers.hostinger.com
34+
# See configuration.py for a list of all supported configuration parameters.
35+
configuration = hostinger-api.Configuration(
36+
host = "https://developers.hostinger.com"
37+
)
38+
39+
# The client must configure the authentication and authorization parameters
40+
# in accordance with the API server security policy.
41+
# Examples for each auth method are provided below, use the example that
42+
# satisfies your auth use case.
43+
44+
# Configure Bearer authorization: apiToken
45+
configuration = hostinger-api.Configuration(
46+
access_token = os.environ["BEARER_TOKEN"]
47+
)
48+
49+
# Enter a context with an instance of the API client
50+
with hostinger-api.ApiClient(configuration) as api_client:
51+
# Create an instance of the API class
52+
api_instance = hostinger-api.BillingOrdersApi(api_client)
53+
billing_v1_order_store_request = hostinger-api.BillingV1OrderStoreRequest() # BillingV1OrderStoreRequest |
54+
55+
try:
56+
# Create new service order
57+
api_response = api_instance.create_new_service_order_v1(billing_v1_order_store_request)
58+
print("The response of BillingOrdersApi->create_new_service_order_v1:\n")
59+
pprint(api_response)
60+
except Exception as e:
61+
print("Exception when calling BillingOrdersApi->create_new_service_order_v1: %s\n" % e)
62+
```
63+
64+
65+
66+
### Parameters
67+
68+
69+
Name | Type | Description | Notes
70+
------------- | ------------- | ------------- | -------------
71+
**billing_v1_order_store_request** | [**BillingV1OrderStoreRequest**](BillingV1OrderStoreRequest.md)| |
72+
73+
### Return type
74+
75+
[**BillingV1OrderOrderResource**](BillingV1OrderOrderResource.md)
76+
77+
### Authorization
78+
79+
[apiToken](../README.md#apiToken)
80+
81+
### HTTP request headers
82+
83+
- **Content-Type**: application/json
84+
- **Accept**: application/json
85+
86+
### HTTP response details
87+
88+
| Status code | Description | Response headers |
89+
|-------------|-------------|------------------|
90+
**200** | Success response | - |
91+
**422** | Validation error response | - |
92+
**401** | Unauthenticated | - |
93+
**500** | Error response | - |
94+
95+
[[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)
96+

0 commit comments

Comments
 (0)