Skip to content

Commit c24a601

Browse files
chore: sdk update
1 parent 4e2c4b7 commit c24a601

926 files changed

Lines changed: 1477 additions & 929 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Class | Method | HTTP request | Description
167167
*DomainsWHOISApi* | [**unset_default_whois_profile_v1**](docs/DomainsWHOISApi.md#unset_default_whois_profile_v1) | **DELETE** /api/domains/v1/whois/default/{whoisId} | Unset default WHOIS profile
168168
*EcommerceMiscellaneousApi* | [**get_custom_storefront_setup_instructions_v1**](docs/EcommerceMiscellaneousApi.md#get_custom_storefront_setup_instructions_v1) | **GET** /api/ecommerce/v1/miscellaneous/custom-storefront-instructions | Get custom storefront setup instructions
169169
*EcommercePaymentsApi* | [**enable_manual_payment_method_v1**](docs/EcommercePaymentsApi.md#enable_manual_payment_method_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/payment-methods/manual | Enable manual payment method
170+
*EcommerceProductsApi* | [**create_a_product_image_upload_urlv1**](docs/EcommerceProductsApi.md#create_a_product_image_upload_urlv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url | Create a product image upload URL
170171
*EcommerceProductsApi* | [**create_digital_product_v1**](docs/EcommerceProductsApi.md#create_digital_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product
171172
*EcommerceProductsApi* | [**create_physical_product_v1**](docs/EcommerceProductsApi.md#create_physical_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product
172173
*EcommerceProductsApi* | [**upload_and_attach_a_product_image_v1**](docs/EcommerceProductsApi.md#upload_and_attach_a_product_image_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images | Upload and attach a product image
@@ -519,6 +520,7 @@ Class | Method | HTTP request | Description
519520
- [EcommerceV1ProductProductCreationResource](docs/EcommerceV1ProductProductCreationResource.md)
520521
- [EcommerceV1ProductProductCreationResourceProduct](docs/EcommerceV1ProductProductCreationResourceProduct.md)
521522
- [EcommerceV1ProductProductImageUploadResource](docs/EcommerceV1ProductProductImageUploadResource.md)
523+
- [EcommerceV1ProductProductImageUploadUrlResource](docs/EcommerceV1ProductProductImageUploadUrlResource.md)
522524
- [EcommerceV1ProductUploadProductImageRequest](docs/EcommerceV1ProductUploadProductImageRequest.md)
523525
- [EcommerceV1SalesChannelSalesChannelCreationResource](docs/EcommerceV1SalesChannelSalesChannelCreationResource.md)
524526
- [EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel](docs/EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel.md)

docs/EcommerceProductsApi.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,85 @@ All URIs are relative to *https://developers.hostinger.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**create_a_product_image_upload_urlv1**](EcommerceProductsApi.md#create_a_product_image_upload_urlv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url | Create a product image upload URL
78
[**create_digital_product_v1**](EcommerceProductsApi.md#create_digital_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product
89
[**create_physical_product_v1**](EcommerceProductsApi.md#create_physical_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product
910
[**upload_and_attach_a_product_image_v1**](EcommerceProductsApi.md#upload_and_attach_a_product_image_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images | Upload and attach a product image
1011

1112

13+
# **create_a_product_image_upload_urlv1**
14+
> EcommerceV1ProductProductImageUploadUrlResource create_a_product_image_upload_urlv1(store_id, product_id)
15+
16+
Create a product image upload URL
17+
18+
Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the
19+
attach-image endpoint with the returned object_name to scan and attach it to the product.
20+
21+
### Example
22+
23+
* Bearer Authentication (apiToken):
24+
25+
```python
26+
import hostinger_api
27+
from hostinger_api.models.ecommerce_v1_product_product_image_upload_url_resource import EcommerceV1ProductProductImageUploadUrlResource
28+
from hostinger_api.rest import ApiException
29+
from pprint import pprint
30+
31+
32+
# Configure Bearer authorization: apiToken
33+
configuration = hostinger_api.Configuration(
34+
access_token = os.environ["BEARER_TOKEN"]
35+
)
36+
37+
# Enter a context with an instance of the API client
38+
with hostinger_api.ApiClient(configuration) as api_client:
39+
# Create an instance of the API class
40+
api_instance = hostinger_api.EcommerceProductsApi(api_client)
41+
store_id = 'store_01J8Z5F8W9K8M4A7B3C2D1E0FG' # str | The ID of the store the product belongs to.
42+
product_id = 'prod_01J8Z5F8W9K8M4A7B3C2D1E0FG' # str | The ID of the product the image will be attached to.
43+
44+
try:
45+
# Create a product image upload URL
46+
api_response = api_instance.create_a_product_image_upload_urlv1(store_id, product_id)
47+
print("The response of EcommerceProductsApi->create_a_product_image_upload_urlv1:\n")
48+
pprint(api_response)
49+
except Exception as e:
50+
print("Exception when calling EcommerceProductsApi->create_a_product_image_upload_urlv1: %s\n" % e)
51+
```
52+
53+
54+
55+
### Parameters
56+
57+
58+
Name | Type | Description | Notes
59+
------------- | ------------- | ------------- | -------------
60+
**store_id** | **str**| The ID of the store the product belongs to. |
61+
**product_id** | **str**| The ID of the product the image will be attached to. |
62+
63+
### Return type
64+
65+
[**EcommerceV1ProductProductImageUploadUrlResource**](EcommerceV1ProductProductImageUploadUrlResource.md)
66+
67+
### Authorization
68+
69+
[apiToken](../README.md#apiToken)
70+
71+
### HTTP request headers
72+
73+
- **Content-Type**: Not defined
74+
- **Accept**: application/json
75+
76+
### HTTP response details
77+
78+
| Status code | Description | Response headers |
79+
|-------------|-------------|------------------|
80+
**200** | Success response | - |
81+
**401** | Unauthenticated response | - |
82+
**500** | Error response | - |
83+
84+
[[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)
85+
1286
# **create_digital_product_v1**
1387
> EcommerceV1ProductProductCreationResource create_digital_product_v1(store_id, ecommerce_v1_product_create_digital_product_request)
1488
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# EcommerceV1ProductProductImageUploadUrlResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**upload_url** | **str** | Signed URL to upload the image to with a multipart/form-data POST. | [optional]
9+
**fields** | **Dict[str, str]** | Form fields to send alongside the file in the multipart POST. | [optional]
10+
**object_name** | **str** | Key of the uploaded object — send it to the attach-image endpoint. | [optional]
11+
**max_bytes** | **int** | Maximum accepted upload size in bytes. | [optional]
12+
13+
## Example
14+
15+
```python
16+
from hostinger_api.models.ecommerce_v1_product_product_image_upload_url_resource import EcommerceV1ProductProductImageUploadUrlResource
17+
18+
# TODO update the JSON string below
19+
json = "{}"
20+
# create an instance of EcommerceV1ProductProductImageUploadUrlResource from a JSON string
21+
ecommerce_v1_product_product_image_upload_url_resource_instance = EcommerceV1ProductProductImageUploadUrlResource.from_json(json)
22+
# print the JSON string representation of the object
23+
print(EcommerceV1ProductProductImageUploadUrlResource.to_json())
24+
25+
# convert the object into a dict
26+
ecommerce_v1_product_product_image_upload_url_resource_dict = ecommerce_v1_product_product_image_upload_url_resource_instance.to_dict()
27+
# create an instance of EcommerceV1ProductProductImageUploadUrlResource from a dict
28+
ecommerce_v1_product_product_image_upload_url_resource_from_dict = EcommerceV1ProductProductImageUploadUrlResource.from_dict(ecommerce_v1_product_product_image_upload_url_resource_dict)
29+
```
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31+
32+

docs/EcommerceV1ProductUploadProductImageRequest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**image_url** | **str** | Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. |
8+
**image_url** | **str** | Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name. | [optional]
9+
**object_name** | **str** | Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image. | [optional]
910
**is_thumbnail** | **bool** | When true, the image becomes the product's thumbnail (primary image). When omitted, it becomes the thumbnail only if the product does not have one yet. | [optional]
1011

1112
## Example

hostinger_api/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"""
66
Hostinger API Python SDK
77
8-
API Version: 1.32.5
8+
API Version: 1.32.6
99
1010
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
1111
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
1212
""" # noqa: E501
1313

1414

15-
__version__ = "3.29.6"
15+
__version__ = "3.29.7"
1616

1717
# import apis into sdk package
1818
from hostinger_api.api.agency_hosting_cache_api import AgencyHostingCacheApi
@@ -225,6 +225,7 @@
225225
from hostinger_api.models.ecommerce_v1_product_product_creation_resource import EcommerceV1ProductProductCreationResource
226226
from hostinger_api.models.ecommerce_v1_product_product_creation_resource_product import EcommerceV1ProductProductCreationResourceProduct
227227
from hostinger_api.models.ecommerce_v1_product_product_image_upload_resource import EcommerceV1ProductProductImageUploadResource
228+
from hostinger_api.models.ecommerce_v1_product_product_image_upload_url_resource import EcommerceV1ProductProductImageUploadUrlResource
228229
from hostinger_api.models.ecommerce_v1_product_upload_product_image_request import EcommerceV1ProductUploadProductImageRequest
229230
from hostinger_api.models.ecommerce_v1_sales_channel_sales_channel_creation_resource import EcommerceV1SalesChannelSalesChannelCreationResource
230231
from hostinger_api.models.ecommerce_v1_sales_channel_sales_channel_creation_resource_sales_channel import EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel

hostinger_api/api/agency_hosting_cache_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.32.5
6+
API Version: 1.32.6
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

hostinger_api/api/agency_hosting_cron_jobs_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.32.5
6+
API Version: 1.32.6
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

hostinger_api/api/agency_hosting_databases_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.32.5
6+
API Version: 1.32.6
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

hostinger_api/api/agency_hosting_datacenters_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.32.5
6+
API Version: 1.32.6
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

hostinger_api/api/agency_hosting_domains_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Hostinger API Python SDK
55
6-
API Version: 1.32.5
6+
API Version: 1.32.6
77
88
NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

0 commit comments

Comments
 (0)