Skip to content

Commit d41f0e9

Browse files
chore: sdk update
1 parent ab7871c commit d41f0e9

926 files changed

Lines changed: 1671 additions & 923 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Class | Method | HTTP request | Description
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
170170
*EcommerceProductsApi* | [**create_digital_product_v1**](docs/EcommerceProductsApi.md#create_digital_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product
171171
*EcommerceProductsApi* | [**create_physical_product_v1**](docs/EcommerceProductsApi.md#create_physical_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product
172+
*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
172173
*EcommerceSalesChannelsApi* | [**create_custom_sales_channel_v1**](docs/EcommerceSalesChannelsApi.md#create_custom_sales_channel_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/sales-channels | Create custom sales channel
173174
*EcommerceSalesChannelsApi* | [**list_sales_channels_v1**](docs/EcommerceSalesChannelsApi.md#list_sales_channels_v1) | **GET** /api/ecommerce/v1/stores/{store_id}/sales-channels | List sales channels
174175
*EcommerceSalesChannelsApi* | [**update_sales_channel_v1**](docs/EcommerceSalesChannelsApi.md#update_sales_channel_v1) | **PATCH** /api/ecommerce/v1/stores/{store_id}/sales-channels/{sales_channel_id} | Update sales channel
@@ -517,6 +518,8 @@ Class | Method | HTTP request | Description
517518
- [EcommerceV1ProductCreatePhysicalProductRequest](docs/EcommerceV1ProductCreatePhysicalProductRequest.md)
518519
- [EcommerceV1ProductProductCreationResource](docs/EcommerceV1ProductProductCreationResource.md)
519520
- [EcommerceV1ProductProductCreationResourceProduct](docs/EcommerceV1ProductProductCreationResourceProduct.md)
521+
- [EcommerceV1ProductProductImageUploadResource](docs/EcommerceV1ProductProductImageUploadResource.md)
522+
- [EcommerceV1ProductUploadProductImageRequest](docs/EcommerceV1ProductUploadProductImageRequest.md)
520523
- [EcommerceV1SalesChannelSalesChannelCreationResource](docs/EcommerceV1SalesChannelSalesChannelCreationResource.md)
521524
- [EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel](docs/EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel.md)
522525
- [EcommerceV1SalesChannelSalesChannelListResource](docs/EcommerceV1SalesChannelSalesChannelListResource.md)

‎docs/EcommerceProductsApi.md‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**create_digital_product_v1**](EcommerceProductsApi.md#create_digital_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product
88
[**create_physical_product_v1**](EcommerceProductsApi.md#create_physical_product_v1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product
9+
[**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
910

1011

1112
# **create_digital_product_v1**
@@ -156,3 +157,81 @@ Name | Type | Description | Notes
156157

157158
[[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)
158159

160+
# **upload_and_attach_a_product_image_v1**
161+
> EcommerceV1ProductProductImageUploadResource upload_and_attach_a_product_image_v1(store_id, product_id, ecommerce_v1_product_upload_product_image_request)
162+
163+
Upload and attach a product image
164+
165+
Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) and attach it to a product in a single call.
166+
The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make
167+
it the product's primary image.
168+
169+
### Example
170+
171+
* Bearer Authentication (apiToken):
172+
173+
```python
174+
import hostinger_api
175+
from hostinger_api.models.ecommerce_v1_product_product_image_upload_resource import EcommerceV1ProductProductImageUploadResource
176+
from hostinger_api.models.ecommerce_v1_product_upload_product_image_request import EcommerceV1ProductUploadProductImageRequest
177+
from hostinger_api.rest import ApiException
178+
from pprint import pprint
179+
180+
181+
# Configure Bearer authorization: apiToken
182+
configuration = hostinger_api.Configuration(
183+
access_token = os.environ["BEARER_TOKEN"]
184+
)
185+
186+
# Enter a context with an instance of the API client
187+
with hostinger_api.ApiClient(configuration) as api_client:
188+
# Create an instance of the API class
189+
api_instance = hostinger_api.EcommerceProductsApi(api_client)
190+
store_id = 'store_01J8Z5F8W9K8M4A7B3C2D1E0FG' # str | The ID of the store the product belongs to.
191+
product_id = 'prod_01J8Z5F8W9K8M4A7B3C2D1E0FG' # str | The ID of the product to attach the image to.
192+
ecommerce_v1_product_upload_product_image_request = hostinger_api.EcommerceV1ProductUploadProductImageRequest() # EcommerceV1ProductUploadProductImageRequest |
193+
194+
try:
195+
# Upload and attach a product image
196+
api_response = api_instance.upload_and_attach_a_product_image_v1(store_id, product_id, ecommerce_v1_product_upload_product_image_request)
197+
print("The response of EcommerceProductsApi->upload_and_attach_a_product_image_v1:\n")
198+
pprint(api_response)
199+
except Exception as e:
200+
print("Exception when calling EcommerceProductsApi->upload_and_attach_a_product_image_v1: %s\n" % e)
201+
```
202+
203+
204+
205+
### Parameters
206+
207+
208+
Name | Type | Description | Notes
209+
------------- | ------------- | ------------- | -------------
210+
**store_id** | **str**| The ID of the store the product belongs to. |
211+
**product_id** | **str**| The ID of the product to attach the image to. |
212+
**ecommerce_v1_product_upload_product_image_request** | [**EcommerceV1ProductUploadProductImageRequest**](EcommerceV1ProductUploadProductImageRequest.md)| |
213+
214+
### Return type
215+
216+
[**EcommerceV1ProductProductImageUploadResource**](EcommerceV1ProductProductImageUploadResource.md)
217+
218+
### Authorization
219+
220+
[apiToken](../README.md#apiToken)
221+
222+
### HTTP request headers
223+
224+
- **Content-Type**: application/json
225+
- **Accept**: application/json
226+
227+
### HTTP response details
228+
229+
| Status code | Description | Response headers |
230+
|-------------|-------------|------------------|
231+
**200** | Success response | - |
232+
**422** | Validation error response | - |
233+
**401** | Unauthenticated response | - |
234+
**500** | Error response | - |
235+
236+
[[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)
237+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EcommerceV1ProductProductImageUploadResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**url** | **str** | CDN URL of the uploaded image. | [optional]
9+
**is_thumbnail** | **bool** | Whether the image was set as the product's thumbnail (primary image). | [optional]
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.ecommerce_v1_product_product_image_upload_resource import EcommerceV1ProductProductImageUploadResource
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of EcommerceV1ProductProductImageUploadResource from a JSON string
19+
ecommerce_v1_product_product_image_upload_resource_instance = EcommerceV1ProductProductImageUploadResource.from_json(json)
20+
# print the JSON string representation of the object
21+
print(EcommerceV1ProductProductImageUploadResource.to_json())
22+
23+
# convert the object into a dict
24+
ecommerce_v1_product_product_image_upload_resource_dict = ecommerce_v1_product_product_image_upload_resource_instance.to_dict()
25+
# create an instance of EcommerceV1ProductProductImageUploadResource from a dict
26+
ecommerce_v1_product_product_image_upload_resource_from_dict = EcommerceV1ProductProductImageUploadResource.from_dict(ecommerce_v1_product_product_image_upload_resource_dict)
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)
29+
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EcommerceV1ProductUploadProductImageRequest
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**image** | **str** | Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted. |
9+
**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]
10+
11+
## Example
12+
13+
```python
14+
from hostinger_api.models.ecommerce_v1_product_upload_product_image_request import EcommerceV1ProductUploadProductImageRequest
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of EcommerceV1ProductUploadProductImageRequest from a JSON string
19+
ecommerce_v1_product_upload_product_image_request_instance = EcommerceV1ProductUploadProductImageRequest.from_json(json)
20+
# print the JSON string representation of the object
21+
print(EcommerceV1ProductUploadProductImageRequest.to_json())
22+
23+
# convert the object into a dict
24+
ecommerce_v1_product_upload_product_image_request_dict = ecommerce_v1_product_upload_product_image_request_instance.to_dict()
25+
# create an instance of EcommerceV1ProductUploadProductImageRequest from a dict
26+
ecommerce_v1_product_upload_product_image_request_from_dict = EcommerceV1ProductUploadProductImageRequest.from_dict(ecommerce_v1_product_upload_product_image_request_dict)
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)
29+
30+

‎hostinger_api/__init__.py‎

Lines changed: 4 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.1
8+
API Version: 1.32.2
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.1"
15+
__version__ = "3.29.2"
1616

1717
# import apis into sdk package
1818
from hostinger_api.api.agency_hosting_cache_api import AgencyHostingCacheApi
@@ -224,6 +224,8 @@
224224
from hostinger_api.models.ecommerce_v1_product_create_physical_product_request import EcommerceV1ProductCreatePhysicalProductRequest
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
227+
from hostinger_api.models.ecommerce_v1_product_product_image_upload_resource import EcommerceV1ProductProductImageUploadResource
228+
from hostinger_api.models.ecommerce_v1_product_upload_product_image_request import EcommerceV1ProductUploadProductImageRequest
227229
from hostinger_api.models.ecommerce_v1_sales_channel_sales_channel_creation_resource import EcommerceV1SalesChannelSalesChannelCreationResource
228230
from hostinger_api.models.ecommerce_v1_sales_channel_sales_channel_creation_resource_sales_channel import EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel
229231
from hostinger_api.models.ecommerce_v1_sales_channel_sales_channel_list_resource import EcommerceV1SalesChannelSalesChannelListResource

‎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.1
6+
API Version: 1.32.2
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.1
6+
API Version: 1.32.2
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.1
6+
API Version: 1.32.2
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.1
6+
API Version: 1.32.2
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.1
6+
API Version: 1.32.2
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)