aurigma-backoffice-api-client 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aurigma/backoffice/__init__.py +222 -0
- aurigma/backoffice/api/__init__.py +9 -0
- aurigma/backoffice/api/build_info_api.py +513 -0
- aurigma/backoffice/api/product_references_management_api.py +1469 -0
- aurigma/backoffice/api/products_management_api.py +7962 -0
- aurigma/backoffice/api/storefronts_management_api.py +3930 -0
- aurigma/backoffice/api/users_management_api.py +1512 -0
- aurigma/backoffice/api_client.py +807 -0
- aurigma/backoffice/api_response.py +21 -0
- aurigma/backoffice/configuration.py +637 -0
- aurigma/backoffice/exceptions.py +219 -0
- aurigma/backoffice/models/__init__.py +99 -0
- aurigma/backoffice/models/appearance_data_dto.py +103 -0
- aurigma/backoffice/models/appearance_data_item_dto.py +99 -0
- aurigma/backoffice/models/appearance_data_type.py +42 -0
- aurigma/backoffice/models/big_commerce_settings_dto.py +127 -0
- aurigma/backoffice/models/big_commerce_storefront_dto.py +134 -0
- aurigma/backoffice/models/build_info_model.py +113 -0
- aurigma/backoffice/models/conflict_type.py +39 -0
- aurigma/backoffice/models/create_big_commerce_storefront_dto.py +116 -0
- aurigma/backoffice/models/create_custom_storefront_dto.py +118 -0
- aurigma/backoffice/models/create_magento_storefront_dto.py +115 -0
- aurigma/backoffice/models/create_nop_commerce_storefront_dto.py +106 -0
- aurigma/backoffice/models/create_product_design_connections_dto.py +100 -0
- aurigma/backoffice/models/create_product_document_connections_dto.py +100 -0
- aurigma/backoffice/models/create_product_dto.py +127 -0
- aurigma/backoffice/models/create_product_mockup_connections_dto.py +100 -0
- aurigma/backoffice/models/create_product_option_dto.py +115 -0
- aurigma/backoffice/models/create_product_option_value_dto.py +92 -0
- aurigma/backoffice/models/create_product_reference_dto.py +125 -0
- aurigma/backoffice/models/create_tenant_user_dto.py +105 -0
- aurigma/backoffice/models/create_woo_commerce_storefront_dto.py +106 -0
- aurigma/backoffice/models/custom_storefront_dto.py +137 -0
- aurigma/backoffice/models/general_conflict_dto.py +95 -0
- aurigma/backoffice/models/image_info.py +99 -0
- aurigma/backoffice/models/magento_settings_dto.py +117 -0
- aurigma/backoffice/models/magento_storefront_dto.py +134 -0
- aurigma/backoffice/models/microsoft_asp_net_core_mvc_problem_details.py +133 -0
- aurigma/backoffice/models/nop_commerce_settings_dto.py +124 -0
- aurigma/backoffice/models/nop_commerce_storefront_dto.py +134 -0
- aurigma/backoffice/models/option_type.py +38 -0
- aurigma/backoffice/models/paged_of_personalization_workflow_dto.py +102 -0
- aurigma/backoffice/models/paged_of_processing_pipeline_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_option_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_reference_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_variant_design_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_variant_document_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_variant_dto.py +102 -0
- aurigma/backoffice/models/paged_of_product_variant_mockup_dto.py +102 -0
- aurigma/backoffice/models/paged_of_storefront_dto.py +102 -0
- aurigma/backoffice/models/paged_of_tenant_user_dto.py +102 -0
- aurigma/backoffice/models/paged_of_tenant_user_role_dto.py +102 -0
- aurigma/backoffice/models/personalization_workflow_dto.py +97 -0
- aurigma/backoffice/models/processing_pipeline_dto.py +94 -0
- aurigma/backoffice/models/product_asset_connection_options_dto.py +99 -0
- aurigma/backoffice/models/product_design_connection_dto.py +107 -0
- aurigma/backoffice/models/product_document_connection_dto.py +107 -0
- aurigma/backoffice/models/product_dto.py +165 -0
- aurigma/backoffice/models/product_mockup_connection_dto.py +122 -0
- aurigma/backoffice/models/product_mockup_type.py +38 -0
- aurigma/backoffice/models/product_option_dto.py +183 -0
- aurigma/backoffice/models/product_option_value_dto.py +148 -0
- aurigma/backoffice/models/product_reference_creation_conflict_dto.py +110 -0
- aurigma/backoffice/models/product_reference_dto.py +119 -0
- aurigma/backoffice/models/product_reference_info.py +112 -0
- aurigma/backoffice/models/product_reference_type.py +39 -0
- aurigma/backoffice/models/product_variant_availability_dto.py +94 -0
- aurigma/backoffice/models/product_variant_design_dto.py +180 -0
- aurigma/backoffice/models/product_variant_document_dto.py +176 -0
- aurigma/backoffice/models/product_variant_dto.py +140 -0
- aurigma/backoffice/models/product_variant_mockup_dto.py +161 -0
- aurigma/backoffice/models/product_variant_mockup_type.py +38 -0
- aurigma/backoffice/models/product_variant_option_dto.py +134 -0
- aurigma/backoffice/models/product_variant_price_dto.py +99 -0
- aurigma/backoffice/models/product_variant_resource_dto.py +120 -0
- aurigma/backoffice/models/product_variant_resource_preview.py +113 -0
- aurigma/backoffice/models/product_variant_resource_type.py +38 -0
- aurigma/backoffice/models/product_variant_sku_dto.py +99 -0
- aurigma/backoffice/models/remove_product_asset_connection_dto.py +107 -0
- aurigma/backoffice/models/remove_product_design_connections_dto.py +100 -0
- aurigma/backoffice/models/remove_product_document_connections_dto.py +100 -0
- aurigma/backoffice/models/remove_product_mockup_connections_dto.py +100 -0
- aurigma/backoffice/models/set_product_variant_availability_dto.py +100 -0
- aurigma/backoffice/models/set_product_variant_price_dto.py +100 -0
- aurigma/backoffice/models/set_product_variant_sku_dto.py +100 -0
- aurigma/backoffice/models/simple_option_value.py +92 -0
- aurigma/backoffice/models/storefront_dto.py +123 -0
- aurigma/backoffice/models/storefront_type.py +45 -0
- aurigma/backoffice/models/surface_usage_type.py +38 -0
- aurigma/backoffice/models/tenant_user_dto.py +124 -0
- aurigma/backoffice/models/tenant_user_role_dto.py +94 -0
- aurigma/backoffice/models/woo_commerce_settings_dto.py +124 -0
- aurigma/backoffice/models/woo_commerce_storefront_dto.py +134 -0
- aurigma/backoffice/models/workflow_type.py +39 -0
- aurigma/backoffice/py.typed +0 -0
- aurigma/backoffice/rest.py +199 -0
- aurigma_backoffice_api_client-1.0.0.dist-info/METADATA +282 -0
- aurigma_backoffice_api_client-1.0.0.dist-info/RECORD +101 -0
- aurigma_backoffice_api_client-1.0.0.dist-info/WHEEL +5 -0
- aurigma_backoffice_api_client-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1469 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
BackOffice API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: backoffice-v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictInt, StrictStr
|
|
20
|
+
from typing import List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from aurigma.backoffice.models.create_product_reference_dto import CreateProductReferenceDto
|
|
23
|
+
from aurigma.backoffice.models.paged_of_product_reference_dto import PagedOfProductReferenceDto
|
|
24
|
+
from aurigma.backoffice.models.product_reference_dto import ProductReferenceDto
|
|
25
|
+
|
|
26
|
+
from aurigma.backoffice.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from aurigma.backoffice.api_response import ApiResponse
|
|
28
|
+
from aurigma.backoffice.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ProductReferencesManagementApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
async def product_references_management_create(
|
|
46
|
+
self,
|
|
47
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
48
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
49
|
+
create_product_reference_dto: Annotated[Optional[CreateProductReferenceDto], Field(description="Create operation parameters.")] = None,
|
|
50
|
+
_request_timeout: Union[
|
|
51
|
+
None,
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Tuple[
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> ProductReferenceDto:
|
|
63
|
+
"""Creates a new storefront product reference.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
:param storefront_id: Storefront identifier. (required)
|
|
67
|
+
:type storefront_id: int
|
|
68
|
+
:param tenant_id: Tenant identifier.
|
|
69
|
+
:type tenant_id: int
|
|
70
|
+
:param create_product_reference_dto: Create operation parameters.
|
|
71
|
+
:type create_product_reference_dto: CreateProductReferenceDto
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._product_references_management_create_serialize(
|
|
95
|
+
storefront_id=storefront_id,
|
|
96
|
+
tenant_id=tenant_id,
|
|
97
|
+
create_product_reference_dto=create_product_reference_dto,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'201': "ProductReferenceDto",
|
|
106
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
107
|
+
'409': "ProductReferenceCreationConflictDto",
|
|
108
|
+
'401': None,
|
|
109
|
+
'403': None,
|
|
110
|
+
}
|
|
111
|
+
response_data = await self.api_client.call_api(
|
|
112
|
+
*_param,
|
|
113
|
+
_request_timeout=_request_timeout
|
|
114
|
+
)
|
|
115
|
+
await response_data.read()
|
|
116
|
+
return self.api_client.response_deserialize(
|
|
117
|
+
response_data=response_data,
|
|
118
|
+
response_types_map=_response_types_map,
|
|
119
|
+
).data
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@validate_call
|
|
123
|
+
async def product_references_management_create_with_http_info(
|
|
124
|
+
self,
|
|
125
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
126
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
127
|
+
create_product_reference_dto: Annotated[Optional[CreateProductReferenceDto], Field(description="Create operation parameters.")] = None,
|
|
128
|
+
_request_timeout: Union[
|
|
129
|
+
None,
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Tuple[
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
133
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
134
|
+
]
|
|
135
|
+
] = None,
|
|
136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_content_type: Optional[StrictStr] = None,
|
|
138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
140
|
+
) -> ApiResponse[ProductReferenceDto]:
|
|
141
|
+
"""Creates a new storefront product reference.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
:param storefront_id: Storefront identifier. (required)
|
|
145
|
+
:type storefront_id: int
|
|
146
|
+
:param tenant_id: Tenant identifier.
|
|
147
|
+
:type tenant_id: int
|
|
148
|
+
:param create_product_reference_dto: Create operation parameters.
|
|
149
|
+
:type create_product_reference_dto: CreateProductReferenceDto
|
|
150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
151
|
+
number provided, it will be total request
|
|
152
|
+
timeout. It can also be a pair (tuple) of
|
|
153
|
+
(connection, read) timeouts.
|
|
154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
156
|
+
request; this effectively ignores the
|
|
157
|
+
authentication in the spec for a single request.
|
|
158
|
+
:type _request_auth: dict, optional
|
|
159
|
+
:param _content_type: force content-type for the request.
|
|
160
|
+
:type _content_type: str, Optional
|
|
161
|
+
:param _headers: set to override the headers for a single
|
|
162
|
+
request; this effectively ignores the headers
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _headers: dict, optional
|
|
165
|
+
:param _host_index: set to override the host_index for a single
|
|
166
|
+
request; this effectively ignores the host_index
|
|
167
|
+
in the spec for a single request.
|
|
168
|
+
:type _host_index: int, optional
|
|
169
|
+
:return: Returns the result object.
|
|
170
|
+
""" # noqa: E501
|
|
171
|
+
|
|
172
|
+
_param = self._product_references_management_create_serialize(
|
|
173
|
+
storefront_id=storefront_id,
|
|
174
|
+
tenant_id=tenant_id,
|
|
175
|
+
create_product_reference_dto=create_product_reference_dto,
|
|
176
|
+
_request_auth=_request_auth,
|
|
177
|
+
_content_type=_content_type,
|
|
178
|
+
_headers=_headers,
|
|
179
|
+
_host_index=_host_index
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
183
|
+
'201': "ProductReferenceDto",
|
|
184
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
185
|
+
'409': "ProductReferenceCreationConflictDto",
|
|
186
|
+
'401': None,
|
|
187
|
+
'403': None,
|
|
188
|
+
}
|
|
189
|
+
response_data = await self.api_client.call_api(
|
|
190
|
+
*_param,
|
|
191
|
+
_request_timeout=_request_timeout
|
|
192
|
+
)
|
|
193
|
+
await response_data.read()
|
|
194
|
+
return self.api_client.response_deserialize(
|
|
195
|
+
response_data=response_data,
|
|
196
|
+
response_types_map=_response_types_map,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
@validate_call
|
|
201
|
+
async def product_references_management_create_without_preload_content(
|
|
202
|
+
self,
|
|
203
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
204
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
205
|
+
create_product_reference_dto: Annotated[Optional[CreateProductReferenceDto], Field(description="Create operation parameters.")] = None,
|
|
206
|
+
_request_timeout: Union[
|
|
207
|
+
None,
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Tuple[
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
212
|
+
]
|
|
213
|
+
] = None,
|
|
214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_content_type: Optional[StrictStr] = None,
|
|
216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
218
|
+
) -> RESTResponseType:
|
|
219
|
+
"""Creates a new storefront product reference.
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
:param storefront_id: Storefront identifier. (required)
|
|
223
|
+
:type storefront_id: int
|
|
224
|
+
:param tenant_id: Tenant identifier.
|
|
225
|
+
:type tenant_id: int
|
|
226
|
+
:param create_product_reference_dto: Create operation parameters.
|
|
227
|
+
:type create_product_reference_dto: CreateProductReferenceDto
|
|
228
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
229
|
+
number provided, it will be total request
|
|
230
|
+
timeout. It can also be a pair (tuple) of
|
|
231
|
+
(connection, read) timeouts.
|
|
232
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
233
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
234
|
+
request; this effectively ignores the
|
|
235
|
+
authentication in the spec for a single request.
|
|
236
|
+
:type _request_auth: dict, optional
|
|
237
|
+
:param _content_type: force content-type for the request.
|
|
238
|
+
:type _content_type: str, Optional
|
|
239
|
+
:param _headers: set to override the headers for a single
|
|
240
|
+
request; this effectively ignores the headers
|
|
241
|
+
in the spec for a single request.
|
|
242
|
+
:type _headers: dict, optional
|
|
243
|
+
:param _host_index: set to override the host_index for a single
|
|
244
|
+
request; this effectively ignores the host_index
|
|
245
|
+
in the spec for a single request.
|
|
246
|
+
:type _host_index: int, optional
|
|
247
|
+
:return: Returns the result object.
|
|
248
|
+
""" # noqa: E501
|
|
249
|
+
|
|
250
|
+
_param = self._product_references_management_create_serialize(
|
|
251
|
+
storefront_id=storefront_id,
|
|
252
|
+
tenant_id=tenant_id,
|
|
253
|
+
create_product_reference_dto=create_product_reference_dto,
|
|
254
|
+
_request_auth=_request_auth,
|
|
255
|
+
_content_type=_content_type,
|
|
256
|
+
_headers=_headers,
|
|
257
|
+
_host_index=_host_index
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
261
|
+
'201': "ProductReferenceDto",
|
|
262
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
263
|
+
'409': "ProductReferenceCreationConflictDto",
|
|
264
|
+
'401': None,
|
|
265
|
+
'403': None,
|
|
266
|
+
}
|
|
267
|
+
response_data = await self.api_client.call_api(
|
|
268
|
+
*_param,
|
|
269
|
+
_request_timeout=_request_timeout
|
|
270
|
+
)
|
|
271
|
+
return response_data.response
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def _product_references_management_create_serialize(
|
|
275
|
+
self,
|
|
276
|
+
storefront_id,
|
|
277
|
+
tenant_id,
|
|
278
|
+
create_product_reference_dto,
|
|
279
|
+
_request_auth,
|
|
280
|
+
_content_type,
|
|
281
|
+
_headers,
|
|
282
|
+
_host_index,
|
|
283
|
+
) -> RequestSerialized:
|
|
284
|
+
|
|
285
|
+
_host = None
|
|
286
|
+
|
|
287
|
+
_collection_formats: Dict[str, str] = {
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
_path_params: Dict[str, str] = {}
|
|
291
|
+
_query_params: List[Tuple[str, str]] = []
|
|
292
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
293
|
+
_form_params: List[Tuple[str, str]] = []
|
|
294
|
+
_files: Dict[
|
|
295
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
296
|
+
] = {}
|
|
297
|
+
_body_params: Optional[bytes] = None
|
|
298
|
+
|
|
299
|
+
# process the path parameters
|
|
300
|
+
# process the query parameters
|
|
301
|
+
if storefront_id is not None:
|
|
302
|
+
|
|
303
|
+
_query_params.append(('storefrontId', storefront_id))
|
|
304
|
+
|
|
305
|
+
if tenant_id is not None:
|
|
306
|
+
|
|
307
|
+
_query_params.append(('tenantId', tenant_id))
|
|
308
|
+
|
|
309
|
+
# process the header parameters
|
|
310
|
+
# process the form parameters
|
|
311
|
+
# process the body parameter
|
|
312
|
+
if create_product_reference_dto is not None:
|
|
313
|
+
_body_params = create_product_reference_dto
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
# set the HTTP header `Accept`
|
|
317
|
+
if 'Accept' not in _header_params:
|
|
318
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
319
|
+
[
|
|
320
|
+
'application/json'
|
|
321
|
+
]
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
# set the HTTP header `Content-Type`
|
|
325
|
+
if _content_type:
|
|
326
|
+
_header_params['Content-Type'] = _content_type
|
|
327
|
+
else:
|
|
328
|
+
_default_content_type = (
|
|
329
|
+
self.api_client.select_header_content_type(
|
|
330
|
+
[
|
|
331
|
+
'application/json'
|
|
332
|
+
]
|
|
333
|
+
)
|
|
334
|
+
)
|
|
335
|
+
if _default_content_type is not None:
|
|
336
|
+
_header_params['Content-Type'] = _default_content_type
|
|
337
|
+
|
|
338
|
+
# authentication setting
|
|
339
|
+
_auth_settings: List[str] = [
|
|
340
|
+
'ApiKey',
|
|
341
|
+
'OAuth2ClientCredentials',
|
|
342
|
+
'OAuth2Implicit',
|
|
343
|
+
'Bearer'
|
|
344
|
+
]
|
|
345
|
+
|
|
346
|
+
return self.api_client.param_serialize(
|
|
347
|
+
method='POST',
|
|
348
|
+
resource_path='/api/backoffice/v1/product-references',
|
|
349
|
+
path_params=_path_params,
|
|
350
|
+
query_params=_query_params,
|
|
351
|
+
header_params=_header_params,
|
|
352
|
+
body=_body_params,
|
|
353
|
+
post_params=_form_params,
|
|
354
|
+
files=_files,
|
|
355
|
+
auth_settings=_auth_settings,
|
|
356
|
+
collection_formats=_collection_formats,
|
|
357
|
+
_host=_host,
|
|
358
|
+
_request_auth=_request_auth
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
@validate_call
|
|
365
|
+
async def product_references_management_delete(
|
|
366
|
+
self,
|
|
367
|
+
reference: Annotated[Optional[StrictStr], Field(description="Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.")],
|
|
368
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
369
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
370
|
+
_request_timeout: Union[
|
|
371
|
+
None,
|
|
372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
373
|
+
Tuple[
|
|
374
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
375
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
376
|
+
]
|
|
377
|
+
] = None,
|
|
378
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
379
|
+
_content_type: Optional[StrictStr] = None,
|
|
380
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
381
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
382
|
+
) -> ProductReferenceDto:
|
|
383
|
+
"""Deletes the storefront product reference.
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
:param reference: Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier. (required)
|
|
387
|
+
:type reference: str
|
|
388
|
+
:param storefront_id: Storefront identifier. (required)
|
|
389
|
+
:type storefront_id: int
|
|
390
|
+
:param tenant_id: Tenant identifier.
|
|
391
|
+
:type tenant_id: int
|
|
392
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
393
|
+
number provided, it will be total request
|
|
394
|
+
timeout. It can also be a pair (tuple) of
|
|
395
|
+
(connection, read) timeouts.
|
|
396
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
397
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
398
|
+
request; this effectively ignores the
|
|
399
|
+
authentication in the spec for a single request.
|
|
400
|
+
:type _request_auth: dict, optional
|
|
401
|
+
:param _content_type: force content-type for the request.
|
|
402
|
+
:type _content_type: str, Optional
|
|
403
|
+
:param _headers: set to override the headers for a single
|
|
404
|
+
request; this effectively ignores the headers
|
|
405
|
+
in the spec for a single request.
|
|
406
|
+
:type _headers: dict, optional
|
|
407
|
+
:param _host_index: set to override the host_index for a single
|
|
408
|
+
request; this effectively ignores the host_index
|
|
409
|
+
in the spec for a single request.
|
|
410
|
+
:type _host_index: int, optional
|
|
411
|
+
:return: Returns the result object.
|
|
412
|
+
""" # noqa: E501
|
|
413
|
+
|
|
414
|
+
_param = self._product_references_management_delete_serialize(
|
|
415
|
+
reference=reference,
|
|
416
|
+
storefront_id=storefront_id,
|
|
417
|
+
tenant_id=tenant_id,
|
|
418
|
+
_request_auth=_request_auth,
|
|
419
|
+
_content_type=_content_type,
|
|
420
|
+
_headers=_headers,
|
|
421
|
+
_host_index=_host_index
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
425
|
+
'200': "ProductReferenceDto",
|
|
426
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
427
|
+
'409': "GeneralConflictDto",
|
|
428
|
+
'401': None,
|
|
429
|
+
'403': None,
|
|
430
|
+
}
|
|
431
|
+
response_data = await self.api_client.call_api(
|
|
432
|
+
*_param,
|
|
433
|
+
_request_timeout=_request_timeout
|
|
434
|
+
)
|
|
435
|
+
await response_data.read()
|
|
436
|
+
return self.api_client.response_deserialize(
|
|
437
|
+
response_data=response_data,
|
|
438
|
+
response_types_map=_response_types_map,
|
|
439
|
+
).data
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
@validate_call
|
|
443
|
+
async def product_references_management_delete_with_http_info(
|
|
444
|
+
self,
|
|
445
|
+
reference: Annotated[Optional[StrictStr], Field(description="Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.")],
|
|
446
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
447
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
448
|
+
_request_timeout: Union[
|
|
449
|
+
None,
|
|
450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
451
|
+
Tuple[
|
|
452
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
453
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
454
|
+
]
|
|
455
|
+
] = None,
|
|
456
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
457
|
+
_content_type: Optional[StrictStr] = None,
|
|
458
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
459
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
460
|
+
) -> ApiResponse[ProductReferenceDto]:
|
|
461
|
+
"""Deletes the storefront product reference.
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
:param reference: Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier. (required)
|
|
465
|
+
:type reference: str
|
|
466
|
+
:param storefront_id: Storefront identifier. (required)
|
|
467
|
+
:type storefront_id: int
|
|
468
|
+
:param tenant_id: Tenant identifier.
|
|
469
|
+
:type tenant_id: int
|
|
470
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
471
|
+
number provided, it will be total request
|
|
472
|
+
timeout. It can also be a pair (tuple) of
|
|
473
|
+
(connection, read) timeouts.
|
|
474
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
475
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
476
|
+
request; this effectively ignores the
|
|
477
|
+
authentication in the spec for a single request.
|
|
478
|
+
:type _request_auth: dict, optional
|
|
479
|
+
:param _content_type: force content-type for the request.
|
|
480
|
+
:type _content_type: str, Optional
|
|
481
|
+
:param _headers: set to override the headers for a single
|
|
482
|
+
request; this effectively ignores the headers
|
|
483
|
+
in the spec for a single request.
|
|
484
|
+
:type _headers: dict, optional
|
|
485
|
+
:param _host_index: set to override the host_index for a single
|
|
486
|
+
request; this effectively ignores the host_index
|
|
487
|
+
in the spec for a single request.
|
|
488
|
+
:type _host_index: int, optional
|
|
489
|
+
:return: Returns the result object.
|
|
490
|
+
""" # noqa: E501
|
|
491
|
+
|
|
492
|
+
_param = self._product_references_management_delete_serialize(
|
|
493
|
+
reference=reference,
|
|
494
|
+
storefront_id=storefront_id,
|
|
495
|
+
tenant_id=tenant_id,
|
|
496
|
+
_request_auth=_request_auth,
|
|
497
|
+
_content_type=_content_type,
|
|
498
|
+
_headers=_headers,
|
|
499
|
+
_host_index=_host_index
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
503
|
+
'200': "ProductReferenceDto",
|
|
504
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
505
|
+
'409': "GeneralConflictDto",
|
|
506
|
+
'401': None,
|
|
507
|
+
'403': None,
|
|
508
|
+
}
|
|
509
|
+
response_data = await self.api_client.call_api(
|
|
510
|
+
*_param,
|
|
511
|
+
_request_timeout=_request_timeout
|
|
512
|
+
)
|
|
513
|
+
await response_data.read()
|
|
514
|
+
return self.api_client.response_deserialize(
|
|
515
|
+
response_data=response_data,
|
|
516
|
+
response_types_map=_response_types_map,
|
|
517
|
+
)
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
@validate_call
|
|
521
|
+
async def product_references_management_delete_without_preload_content(
|
|
522
|
+
self,
|
|
523
|
+
reference: Annotated[Optional[StrictStr], Field(description="Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier.")],
|
|
524
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
525
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
526
|
+
_request_timeout: Union[
|
|
527
|
+
None,
|
|
528
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
529
|
+
Tuple[
|
|
530
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
531
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
532
|
+
]
|
|
533
|
+
] = None,
|
|
534
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
535
|
+
_content_type: Optional[StrictStr] = None,
|
|
536
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
537
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
538
|
+
) -> RESTResponseType:
|
|
539
|
+
"""Deletes the storefront product reference.
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
:param reference: Product reference - external reference to Customer's Canvas product specification, e.g online store product identifier. (required)
|
|
543
|
+
:type reference: str
|
|
544
|
+
:param storefront_id: Storefront identifier. (required)
|
|
545
|
+
:type storefront_id: int
|
|
546
|
+
:param tenant_id: Tenant identifier.
|
|
547
|
+
:type tenant_id: int
|
|
548
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
549
|
+
number provided, it will be total request
|
|
550
|
+
timeout. It can also be a pair (tuple) of
|
|
551
|
+
(connection, read) timeouts.
|
|
552
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
553
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
554
|
+
request; this effectively ignores the
|
|
555
|
+
authentication in the spec for a single request.
|
|
556
|
+
:type _request_auth: dict, optional
|
|
557
|
+
:param _content_type: force content-type for the request.
|
|
558
|
+
:type _content_type: str, Optional
|
|
559
|
+
:param _headers: set to override the headers for a single
|
|
560
|
+
request; this effectively ignores the headers
|
|
561
|
+
in the spec for a single request.
|
|
562
|
+
:type _headers: dict, optional
|
|
563
|
+
:param _host_index: set to override the host_index for a single
|
|
564
|
+
request; this effectively ignores the host_index
|
|
565
|
+
in the spec for a single request.
|
|
566
|
+
:type _host_index: int, optional
|
|
567
|
+
:return: Returns the result object.
|
|
568
|
+
""" # noqa: E501
|
|
569
|
+
|
|
570
|
+
_param = self._product_references_management_delete_serialize(
|
|
571
|
+
reference=reference,
|
|
572
|
+
storefront_id=storefront_id,
|
|
573
|
+
tenant_id=tenant_id,
|
|
574
|
+
_request_auth=_request_auth,
|
|
575
|
+
_content_type=_content_type,
|
|
576
|
+
_headers=_headers,
|
|
577
|
+
_host_index=_host_index
|
|
578
|
+
)
|
|
579
|
+
|
|
580
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
581
|
+
'200': "ProductReferenceDto",
|
|
582
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
583
|
+
'409': "GeneralConflictDto",
|
|
584
|
+
'401': None,
|
|
585
|
+
'403': None,
|
|
586
|
+
}
|
|
587
|
+
response_data = await self.api_client.call_api(
|
|
588
|
+
*_param,
|
|
589
|
+
_request_timeout=_request_timeout
|
|
590
|
+
)
|
|
591
|
+
return response_data.response
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
def _product_references_management_delete_serialize(
|
|
595
|
+
self,
|
|
596
|
+
reference,
|
|
597
|
+
storefront_id,
|
|
598
|
+
tenant_id,
|
|
599
|
+
_request_auth,
|
|
600
|
+
_content_type,
|
|
601
|
+
_headers,
|
|
602
|
+
_host_index,
|
|
603
|
+
) -> RequestSerialized:
|
|
604
|
+
|
|
605
|
+
_host = None
|
|
606
|
+
|
|
607
|
+
_collection_formats: Dict[str, str] = {
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
_path_params: Dict[str, str] = {}
|
|
611
|
+
_query_params: List[Tuple[str, str]] = []
|
|
612
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
613
|
+
_form_params: List[Tuple[str, str]] = []
|
|
614
|
+
_files: Dict[
|
|
615
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
616
|
+
] = {}
|
|
617
|
+
_body_params: Optional[bytes] = None
|
|
618
|
+
|
|
619
|
+
# process the path parameters
|
|
620
|
+
if reference is not None:
|
|
621
|
+
_path_params['reference'] = reference
|
|
622
|
+
# process the query parameters
|
|
623
|
+
if storefront_id is not None:
|
|
624
|
+
|
|
625
|
+
_query_params.append(('storefrontId', storefront_id))
|
|
626
|
+
|
|
627
|
+
if tenant_id is not None:
|
|
628
|
+
|
|
629
|
+
_query_params.append(('tenantId', tenant_id))
|
|
630
|
+
|
|
631
|
+
# process the header parameters
|
|
632
|
+
# process the form parameters
|
|
633
|
+
# process the body parameter
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
# set the HTTP header `Accept`
|
|
637
|
+
if 'Accept' not in _header_params:
|
|
638
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
639
|
+
[
|
|
640
|
+
'application/json'
|
|
641
|
+
]
|
|
642
|
+
)
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
# authentication setting
|
|
646
|
+
_auth_settings: List[str] = [
|
|
647
|
+
'ApiKey',
|
|
648
|
+
'OAuth2ClientCredentials',
|
|
649
|
+
'OAuth2Implicit',
|
|
650
|
+
'Bearer'
|
|
651
|
+
]
|
|
652
|
+
|
|
653
|
+
return self.api_client.param_serialize(
|
|
654
|
+
method='DELETE',
|
|
655
|
+
resource_path='/api/backoffice/v1/product-references/{reference}',
|
|
656
|
+
path_params=_path_params,
|
|
657
|
+
query_params=_query_params,
|
|
658
|
+
header_params=_header_params,
|
|
659
|
+
body=_body_params,
|
|
660
|
+
post_params=_form_params,
|
|
661
|
+
files=_files,
|
|
662
|
+
auth_settings=_auth_settings,
|
|
663
|
+
collection_formats=_collection_formats,
|
|
664
|
+
_host=_host,
|
|
665
|
+
_request_auth=_request_auth
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
@validate_call
|
|
672
|
+
async def product_references_management_get(
|
|
673
|
+
self,
|
|
674
|
+
reference: Annotated[Optional[StrictStr], Field(description="An external reference to Customer's Canvas product, e.g online store product identifier.")],
|
|
675
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
676
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
677
|
+
_request_timeout: Union[
|
|
678
|
+
None,
|
|
679
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
680
|
+
Tuple[
|
|
681
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
682
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
683
|
+
]
|
|
684
|
+
] = None,
|
|
685
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
686
|
+
_content_type: Optional[StrictStr] = None,
|
|
687
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
688
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
689
|
+
) -> ProductReferenceDto:
|
|
690
|
+
"""Returns a storefront product reference.
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
:param reference: An external reference to Customer's Canvas product, e.g online store product identifier. (required)
|
|
694
|
+
:type reference: str
|
|
695
|
+
:param storefront_id: Storefront identifier. (required)
|
|
696
|
+
:type storefront_id: int
|
|
697
|
+
:param tenant_id: Tenant identifier.
|
|
698
|
+
:type tenant_id: int
|
|
699
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
700
|
+
number provided, it will be total request
|
|
701
|
+
timeout. It can also be a pair (tuple) of
|
|
702
|
+
(connection, read) timeouts.
|
|
703
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
704
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
705
|
+
request; this effectively ignores the
|
|
706
|
+
authentication in the spec for a single request.
|
|
707
|
+
:type _request_auth: dict, optional
|
|
708
|
+
:param _content_type: force content-type for the request.
|
|
709
|
+
:type _content_type: str, Optional
|
|
710
|
+
:param _headers: set to override the headers for a single
|
|
711
|
+
request; this effectively ignores the headers
|
|
712
|
+
in the spec for a single request.
|
|
713
|
+
:type _headers: dict, optional
|
|
714
|
+
:param _host_index: set to override the host_index for a single
|
|
715
|
+
request; this effectively ignores the host_index
|
|
716
|
+
in the spec for a single request.
|
|
717
|
+
:type _host_index: int, optional
|
|
718
|
+
:return: Returns the result object.
|
|
719
|
+
""" # noqa: E501
|
|
720
|
+
|
|
721
|
+
_param = self._product_references_management_get_serialize(
|
|
722
|
+
reference=reference,
|
|
723
|
+
storefront_id=storefront_id,
|
|
724
|
+
tenant_id=tenant_id,
|
|
725
|
+
_request_auth=_request_auth,
|
|
726
|
+
_content_type=_content_type,
|
|
727
|
+
_headers=_headers,
|
|
728
|
+
_host_index=_host_index
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
732
|
+
'200': "ProductReferenceDto",
|
|
733
|
+
'409': "GeneralConflictDto",
|
|
734
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
735
|
+
'401': None,
|
|
736
|
+
'403': None,
|
|
737
|
+
}
|
|
738
|
+
response_data = await self.api_client.call_api(
|
|
739
|
+
*_param,
|
|
740
|
+
_request_timeout=_request_timeout
|
|
741
|
+
)
|
|
742
|
+
await response_data.read()
|
|
743
|
+
return self.api_client.response_deserialize(
|
|
744
|
+
response_data=response_data,
|
|
745
|
+
response_types_map=_response_types_map,
|
|
746
|
+
).data
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
@validate_call
|
|
750
|
+
async def product_references_management_get_with_http_info(
|
|
751
|
+
self,
|
|
752
|
+
reference: Annotated[Optional[StrictStr], Field(description="An external reference to Customer's Canvas product, e.g online store product identifier.")],
|
|
753
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
754
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
755
|
+
_request_timeout: Union[
|
|
756
|
+
None,
|
|
757
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
758
|
+
Tuple[
|
|
759
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
760
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
761
|
+
]
|
|
762
|
+
] = None,
|
|
763
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
764
|
+
_content_type: Optional[StrictStr] = None,
|
|
765
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
766
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
767
|
+
) -> ApiResponse[ProductReferenceDto]:
|
|
768
|
+
"""Returns a storefront product reference.
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
:param reference: An external reference to Customer's Canvas product, e.g online store product identifier. (required)
|
|
772
|
+
:type reference: str
|
|
773
|
+
:param storefront_id: Storefront identifier. (required)
|
|
774
|
+
:type storefront_id: int
|
|
775
|
+
:param tenant_id: Tenant identifier.
|
|
776
|
+
:type tenant_id: int
|
|
777
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
778
|
+
number provided, it will be total request
|
|
779
|
+
timeout. It can also be a pair (tuple) of
|
|
780
|
+
(connection, read) timeouts.
|
|
781
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
782
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
783
|
+
request; this effectively ignores the
|
|
784
|
+
authentication in the spec for a single request.
|
|
785
|
+
:type _request_auth: dict, optional
|
|
786
|
+
:param _content_type: force content-type for the request.
|
|
787
|
+
:type _content_type: str, Optional
|
|
788
|
+
:param _headers: set to override the headers for a single
|
|
789
|
+
request; this effectively ignores the headers
|
|
790
|
+
in the spec for a single request.
|
|
791
|
+
:type _headers: dict, optional
|
|
792
|
+
:param _host_index: set to override the host_index for a single
|
|
793
|
+
request; this effectively ignores the host_index
|
|
794
|
+
in the spec for a single request.
|
|
795
|
+
:type _host_index: int, optional
|
|
796
|
+
:return: Returns the result object.
|
|
797
|
+
""" # noqa: E501
|
|
798
|
+
|
|
799
|
+
_param = self._product_references_management_get_serialize(
|
|
800
|
+
reference=reference,
|
|
801
|
+
storefront_id=storefront_id,
|
|
802
|
+
tenant_id=tenant_id,
|
|
803
|
+
_request_auth=_request_auth,
|
|
804
|
+
_content_type=_content_type,
|
|
805
|
+
_headers=_headers,
|
|
806
|
+
_host_index=_host_index
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
810
|
+
'200': "ProductReferenceDto",
|
|
811
|
+
'409': "GeneralConflictDto",
|
|
812
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
813
|
+
'401': None,
|
|
814
|
+
'403': None,
|
|
815
|
+
}
|
|
816
|
+
response_data = await self.api_client.call_api(
|
|
817
|
+
*_param,
|
|
818
|
+
_request_timeout=_request_timeout
|
|
819
|
+
)
|
|
820
|
+
await response_data.read()
|
|
821
|
+
return self.api_client.response_deserialize(
|
|
822
|
+
response_data=response_data,
|
|
823
|
+
response_types_map=_response_types_map,
|
|
824
|
+
)
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
@validate_call
|
|
828
|
+
async def product_references_management_get_without_preload_content(
|
|
829
|
+
self,
|
|
830
|
+
reference: Annotated[Optional[StrictStr], Field(description="An external reference to Customer's Canvas product, e.g online store product identifier.")],
|
|
831
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
832
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
833
|
+
_request_timeout: Union[
|
|
834
|
+
None,
|
|
835
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
836
|
+
Tuple[
|
|
837
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
838
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
839
|
+
]
|
|
840
|
+
] = None,
|
|
841
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
842
|
+
_content_type: Optional[StrictStr] = None,
|
|
843
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
844
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
845
|
+
) -> RESTResponseType:
|
|
846
|
+
"""Returns a storefront product reference.
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
:param reference: An external reference to Customer's Canvas product, e.g online store product identifier. (required)
|
|
850
|
+
:type reference: str
|
|
851
|
+
:param storefront_id: Storefront identifier. (required)
|
|
852
|
+
:type storefront_id: int
|
|
853
|
+
:param tenant_id: Tenant identifier.
|
|
854
|
+
:type tenant_id: int
|
|
855
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
856
|
+
number provided, it will be total request
|
|
857
|
+
timeout. It can also be a pair (tuple) of
|
|
858
|
+
(connection, read) timeouts.
|
|
859
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
860
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
861
|
+
request; this effectively ignores the
|
|
862
|
+
authentication in the spec for a single request.
|
|
863
|
+
:type _request_auth: dict, optional
|
|
864
|
+
:param _content_type: force content-type for the request.
|
|
865
|
+
:type _content_type: str, Optional
|
|
866
|
+
:param _headers: set to override the headers for a single
|
|
867
|
+
request; this effectively ignores the headers
|
|
868
|
+
in the spec for a single request.
|
|
869
|
+
:type _headers: dict, optional
|
|
870
|
+
:param _host_index: set to override the host_index for a single
|
|
871
|
+
request; this effectively ignores the host_index
|
|
872
|
+
in the spec for a single request.
|
|
873
|
+
:type _host_index: int, optional
|
|
874
|
+
:return: Returns the result object.
|
|
875
|
+
""" # noqa: E501
|
|
876
|
+
|
|
877
|
+
_param = self._product_references_management_get_serialize(
|
|
878
|
+
reference=reference,
|
|
879
|
+
storefront_id=storefront_id,
|
|
880
|
+
tenant_id=tenant_id,
|
|
881
|
+
_request_auth=_request_auth,
|
|
882
|
+
_content_type=_content_type,
|
|
883
|
+
_headers=_headers,
|
|
884
|
+
_host_index=_host_index
|
|
885
|
+
)
|
|
886
|
+
|
|
887
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
888
|
+
'200': "ProductReferenceDto",
|
|
889
|
+
'409': "GeneralConflictDto",
|
|
890
|
+
'404': "MicrosoftAspNetCoreMvcProblemDetails",
|
|
891
|
+
'401': None,
|
|
892
|
+
'403': None,
|
|
893
|
+
}
|
|
894
|
+
response_data = await self.api_client.call_api(
|
|
895
|
+
*_param,
|
|
896
|
+
_request_timeout=_request_timeout
|
|
897
|
+
)
|
|
898
|
+
return response_data.response
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
def _product_references_management_get_serialize(
|
|
902
|
+
self,
|
|
903
|
+
reference,
|
|
904
|
+
storefront_id,
|
|
905
|
+
tenant_id,
|
|
906
|
+
_request_auth,
|
|
907
|
+
_content_type,
|
|
908
|
+
_headers,
|
|
909
|
+
_host_index,
|
|
910
|
+
) -> RequestSerialized:
|
|
911
|
+
|
|
912
|
+
_host = None
|
|
913
|
+
|
|
914
|
+
_collection_formats: Dict[str, str] = {
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
_path_params: Dict[str, str] = {}
|
|
918
|
+
_query_params: List[Tuple[str, str]] = []
|
|
919
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
920
|
+
_form_params: List[Tuple[str, str]] = []
|
|
921
|
+
_files: Dict[
|
|
922
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
923
|
+
] = {}
|
|
924
|
+
_body_params: Optional[bytes] = None
|
|
925
|
+
|
|
926
|
+
# process the path parameters
|
|
927
|
+
if reference is not None:
|
|
928
|
+
_path_params['reference'] = reference
|
|
929
|
+
# process the query parameters
|
|
930
|
+
if storefront_id is not None:
|
|
931
|
+
|
|
932
|
+
_query_params.append(('storefrontId', storefront_id))
|
|
933
|
+
|
|
934
|
+
if tenant_id is not None:
|
|
935
|
+
|
|
936
|
+
_query_params.append(('tenantId', tenant_id))
|
|
937
|
+
|
|
938
|
+
# process the header parameters
|
|
939
|
+
# process the form parameters
|
|
940
|
+
# process the body parameter
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
# set the HTTP header `Accept`
|
|
944
|
+
if 'Accept' not in _header_params:
|
|
945
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
946
|
+
[
|
|
947
|
+
'application/json'
|
|
948
|
+
]
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
# authentication setting
|
|
953
|
+
_auth_settings: List[str] = [
|
|
954
|
+
'ApiKey',
|
|
955
|
+
'OAuth2ClientCredentials',
|
|
956
|
+
'OAuth2Implicit',
|
|
957
|
+
'Bearer'
|
|
958
|
+
]
|
|
959
|
+
|
|
960
|
+
return self.api_client.param_serialize(
|
|
961
|
+
method='GET',
|
|
962
|
+
resource_path='/api/backoffice/v1/product-references/{reference}',
|
|
963
|
+
path_params=_path_params,
|
|
964
|
+
query_params=_query_params,
|
|
965
|
+
header_params=_header_params,
|
|
966
|
+
body=_body_params,
|
|
967
|
+
post_params=_form_params,
|
|
968
|
+
files=_files,
|
|
969
|
+
auth_settings=_auth_settings,
|
|
970
|
+
collection_formats=_collection_formats,
|
|
971
|
+
_host=_host,
|
|
972
|
+
_request_auth=_request_auth
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
@validate_call
|
|
979
|
+
async def product_references_management_get_all(
|
|
980
|
+
self,
|
|
981
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
982
|
+
product_reference: Annotated[Optional[StrictStr], Field(description="Product reference filter. Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.")] = None,
|
|
983
|
+
product_specification_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product specification filter.")] = None,
|
|
984
|
+
product_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product filter.")] = None,
|
|
985
|
+
product_link_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product link filter.")] = None,
|
|
986
|
+
product_bundle_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product bundle filter.")] = None,
|
|
987
|
+
skip: Annotated[Optional[StrictInt], Field(description="Defines page start offset from beginning of sorted result list.")] = None,
|
|
988
|
+
take: Annotated[Optional[StrictInt], Field(description="Defines page length (how many consequent items of sorted result list should be taken).")] = None,
|
|
989
|
+
sorting: Annotated[Optional[StrictStr], Field(description="Defines sorting order of result list e.g.: \"Title ASC, LastModified DESC\".")] = None,
|
|
990
|
+
search: Annotated[Optional[StrictStr], Field(description="Search string for partial match.")] = None,
|
|
991
|
+
sku: Annotated[Optional[StrictStr], Field(description="SKU filter.")] = None,
|
|
992
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="List of tags that product should have.")] = None,
|
|
993
|
+
custom_fields: Annotated[Optional[StrictStr], Field(description="Serialized custom fields dictionary filter. For example: {\"public\":\"true\",\"name\":\"my item\"}.")] = None,
|
|
994
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
995
|
+
_request_timeout: Union[
|
|
996
|
+
None,
|
|
997
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
998
|
+
Tuple[
|
|
999
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1001
|
+
]
|
|
1002
|
+
] = None,
|
|
1003
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1004
|
+
_content_type: Optional[StrictStr] = None,
|
|
1005
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1006
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1007
|
+
) -> PagedOfProductReferenceDto:
|
|
1008
|
+
"""Returns all storefront product references relevant to the specified query parameters.
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
:param storefront_id: Storefront identifier. (required)
|
|
1012
|
+
:type storefront_id: int
|
|
1013
|
+
:param product_reference: Product reference filter. Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1014
|
+
:type product_reference: str
|
|
1015
|
+
:param product_specification_id: Customer's Canvas product specification filter.
|
|
1016
|
+
:type product_specification_id: int
|
|
1017
|
+
:param product_id: Customer's Canvas product filter.
|
|
1018
|
+
:type product_id: int
|
|
1019
|
+
:param product_link_id: Customer's Canvas product link filter.
|
|
1020
|
+
:type product_link_id: int
|
|
1021
|
+
:param product_bundle_id: Customer's Canvas product bundle filter.
|
|
1022
|
+
:type product_bundle_id: int
|
|
1023
|
+
:param skip: Defines page start offset from beginning of sorted result list.
|
|
1024
|
+
:type skip: int
|
|
1025
|
+
:param take: Defines page length (how many consequent items of sorted result list should be taken).
|
|
1026
|
+
:type take: int
|
|
1027
|
+
:param sorting: Defines sorting order of result list e.g.: \"Title ASC, LastModified DESC\".
|
|
1028
|
+
:type sorting: str
|
|
1029
|
+
:param search: Search string for partial match.
|
|
1030
|
+
:type search: str
|
|
1031
|
+
:param sku: SKU filter.
|
|
1032
|
+
:type sku: str
|
|
1033
|
+
:param tags: List of tags that product should have.
|
|
1034
|
+
:type tags: List[str]
|
|
1035
|
+
:param custom_fields: Serialized custom fields dictionary filter. For example: {\"public\":\"true\",\"name\":\"my item\"}.
|
|
1036
|
+
:type custom_fields: str
|
|
1037
|
+
:param tenant_id: Tenant identifier.
|
|
1038
|
+
:type tenant_id: int
|
|
1039
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1040
|
+
number provided, it will be total request
|
|
1041
|
+
timeout. It can also be a pair (tuple) of
|
|
1042
|
+
(connection, read) timeouts.
|
|
1043
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1044
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1045
|
+
request; this effectively ignores the
|
|
1046
|
+
authentication in the spec for a single request.
|
|
1047
|
+
:type _request_auth: dict, optional
|
|
1048
|
+
:param _content_type: force content-type for the request.
|
|
1049
|
+
:type _content_type: str, Optional
|
|
1050
|
+
:param _headers: set to override the headers for a single
|
|
1051
|
+
request; this effectively ignores the headers
|
|
1052
|
+
in the spec for a single request.
|
|
1053
|
+
:type _headers: dict, optional
|
|
1054
|
+
:param _host_index: set to override the host_index for a single
|
|
1055
|
+
request; this effectively ignores the host_index
|
|
1056
|
+
in the spec for a single request.
|
|
1057
|
+
:type _host_index: int, optional
|
|
1058
|
+
:return: Returns the result object.
|
|
1059
|
+
""" # noqa: E501
|
|
1060
|
+
|
|
1061
|
+
_param = self._product_references_management_get_all_serialize(
|
|
1062
|
+
storefront_id=storefront_id,
|
|
1063
|
+
product_reference=product_reference,
|
|
1064
|
+
product_specification_id=product_specification_id,
|
|
1065
|
+
product_id=product_id,
|
|
1066
|
+
product_link_id=product_link_id,
|
|
1067
|
+
product_bundle_id=product_bundle_id,
|
|
1068
|
+
skip=skip,
|
|
1069
|
+
take=take,
|
|
1070
|
+
sorting=sorting,
|
|
1071
|
+
search=search,
|
|
1072
|
+
sku=sku,
|
|
1073
|
+
tags=tags,
|
|
1074
|
+
custom_fields=custom_fields,
|
|
1075
|
+
tenant_id=tenant_id,
|
|
1076
|
+
_request_auth=_request_auth,
|
|
1077
|
+
_content_type=_content_type,
|
|
1078
|
+
_headers=_headers,
|
|
1079
|
+
_host_index=_host_index
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1082
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1083
|
+
'200': "PagedOfProductReferenceDto",
|
|
1084
|
+
'409': "GeneralConflictDto",
|
|
1085
|
+
'401': None,
|
|
1086
|
+
'403': None,
|
|
1087
|
+
}
|
|
1088
|
+
response_data = await self.api_client.call_api(
|
|
1089
|
+
*_param,
|
|
1090
|
+
_request_timeout=_request_timeout
|
|
1091
|
+
)
|
|
1092
|
+
await response_data.read()
|
|
1093
|
+
return self.api_client.response_deserialize(
|
|
1094
|
+
response_data=response_data,
|
|
1095
|
+
response_types_map=_response_types_map,
|
|
1096
|
+
).data
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
@validate_call
|
|
1100
|
+
async def product_references_management_get_all_with_http_info(
|
|
1101
|
+
self,
|
|
1102
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
1103
|
+
product_reference: Annotated[Optional[StrictStr], Field(description="Product reference filter. Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.")] = None,
|
|
1104
|
+
product_specification_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product specification filter.")] = None,
|
|
1105
|
+
product_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product filter.")] = None,
|
|
1106
|
+
product_link_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product link filter.")] = None,
|
|
1107
|
+
product_bundle_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product bundle filter.")] = None,
|
|
1108
|
+
skip: Annotated[Optional[StrictInt], Field(description="Defines page start offset from beginning of sorted result list.")] = None,
|
|
1109
|
+
take: Annotated[Optional[StrictInt], Field(description="Defines page length (how many consequent items of sorted result list should be taken).")] = None,
|
|
1110
|
+
sorting: Annotated[Optional[StrictStr], Field(description="Defines sorting order of result list e.g.: \"Title ASC, LastModified DESC\".")] = None,
|
|
1111
|
+
search: Annotated[Optional[StrictStr], Field(description="Search string for partial match.")] = None,
|
|
1112
|
+
sku: Annotated[Optional[StrictStr], Field(description="SKU filter.")] = None,
|
|
1113
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="List of tags that product should have.")] = None,
|
|
1114
|
+
custom_fields: Annotated[Optional[StrictStr], Field(description="Serialized custom fields dictionary filter. For example: {\"public\":\"true\",\"name\":\"my item\"}.")] = None,
|
|
1115
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
1116
|
+
_request_timeout: Union[
|
|
1117
|
+
None,
|
|
1118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1119
|
+
Tuple[
|
|
1120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1122
|
+
]
|
|
1123
|
+
] = None,
|
|
1124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1125
|
+
_content_type: Optional[StrictStr] = None,
|
|
1126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1128
|
+
) -> ApiResponse[PagedOfProductReferenceDto]:
|
|
1129
|
+
"""Returns all storefront product references relevant to the specified query parameters.
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
:param storefront_id: Storefront identifier. (required)
|
|
1133
|
+
:type storefront_id: int
|
|
1134
|
+
:param product_reference: Product reference filter. Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1135
|
+
:type product_reference: str
|
|
1136
|
+
:param product_specification_id: Customer's Canvas product specification filter.
|
|
1137
|
+
:type product_specification_id: int
|
|
1138
|
+
:param product_id: Customer's Canvas product filter.
|
|
1139
|
+
:type product_id: int
|
|
1140
|
+
:param product_link_id: Customer's Canvas product link filter.
|
|
1141
|
+
:type product_link_id: int
|
|
1142
|
+
:param product_bundle_id: Customer's Canvas product bundle filter.
|
|
1143
|
+
:type product_bundle_id: int
|
|
1144
|
+
:param skip: Defines page start offset from beginning of sorted result list.
|
|
1145
|
+
:type skip: int
|
|
1146
|
+
:param take: Defines page length (how many consequent items of sorted result list should be taken).
|
|
1147
|
+
:type take: int
|
|
1148
|
+
:param sorting: Defines sorting order of result list e.g.: \"Title ASC, LastModified DESC\".
|
|
1149
|
+
:type sorting: str
|
|
1150
|
+
:param search: Search string for partial match.
|
|
1151
|
+
:type search: str
|
|
1152
|
+
:param sku: SKU filter.
|
|
1153
|
+
:type sku: str
|
|
1154
|
+
:param tags: List of tags that product should have.
|
|
1155
|
+
:type tags: List[str]
|
|
1156
|
+
:param custom_fields: Serialized custom fields dictionary filter. For example: {\"public\":\"true\",\"name\":\"my item\"}.
|
|
1157
|
+
:type custom_fields: str
|
|
1158
|
+
:param tenant_id: Tenant identifier.
|
|
1159
|
+
:type tenant_id: int
|
|
1160
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1161
|
+
number provided, it will be total request
|
|
1162
|
+
timeout. It can also be a pair (tuple) of
|
|
1163
|
+
(connection, read) timeouts.
|
|
1164
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1165
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1166
|
+
request; this effectively ignores the
|
|
1167
|
+
authentication in the spec for a single request.
|
|
1168
|
+
:type _request_auth: dict, optional
|
|
1169
|
+
:param _content_type: force content-type for the request.
|
|
1170
|
+
:type _content_type: str, Optional
|
|
1171
|
+
:param _headers: set to override the headers for a single
|
|
1172
|
+
request; this effectively ignores the headers
|
|
1173
|
+
in the spec for a single request.
|
|
1174
|
+
:type _headers: dict, optional
|
|
1175
|
+
:param _host_index: set to override the host_index for a single
|
|
1176
|
+
request; this effectively ignores the host_index
|
|
1177
|
+
in the spec for a single request.
|
|
1178
|
+
:type _host_index: int, optional
|
|
1179
|
+
:return: Returns the result object.
|
|
1180
|
+
""" # noqa: E501
|
|
1181
|
+
|
|
1182
|
+
_param = self._product_references_management_get_all_serialize(
|
|
1183
|
+
storefront_id=storefront_id,
|
|
1184
|
+
product_reference=product_reference,
|
|
1185
|
+
product_specification_id=product_specification_id,
|
|
1186
|
+
product_id=product_id,
|
|
1187
|
+
product_link_id=product_link_id,
|
|
1188
|
+
product_bundle_id=product_bundle_id,
|
|
1189
|
+
skip=skip,
|
|
1190
|
+
take=take,
|
|
1191
|
+
sorting=sorting,
|
|
1192
|
+
search=search,
|
|
1193
|
+
sku=sku,
|
|
1194
|
+
tags=tags,
|
|
1195
|
+
custom_fields=custom_fields,
|
|
1196
|
+
tenant_id=tenant_id,
|
|
1197
|
+
_request_auth=_request_auth,
|
|
1198
|
+
_content_type=_content_type,
|
|
1199
|
+
_headers=_headers,
|
|
1200
|
+
_host_index=_host_index
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1204
|
+
'200': "PagedOfProductReferenceDto",
|
|
1205
|
+
'409': "GeneralConflictDto",
|
|
1206
|
+
'401': None,
|
|
1207
|
+
'403': None,
|
|
1208
|
+
}
|
|
1209
|
+
response_data = await self.api_client.call_api(
|
|
1210
|
+
*_param,
|
|
1211
|
+
_request_timeout=_request_timeout
|
|
1212
|
+
)
|
|
1213
|
+
await response_data.read()
|
|
1214
|
+
return self.api_client.response_deserialize(
|
|
1215
|
+
response_data=response_data,
|
|
1216
|
+
response_types_map=_response_types_map,
|
|
1217
|
+
)
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
@validate_call
|
|
1221
|
+
async def product_references_management_get_all_without_preload_content(
|
|
1222
|
+
self,
|
|
1223
|
+
storefront_id: Annotated[StrictInt, Field(description="Storefront identifier.")],
|
|
1224
|
+
product_reference: Annotated[Optional[StrictStr], Field(description="Product reference filter. Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.")] = None,
|
|
1225
|
+
product_specification_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product specification filter.")] = None,
|
|
1226
|
+
product_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product filter.")] = None,
|
|
1227
|
+
product_link_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product link filter.")] = None,
|
|
1228
|
+
product_bundle_id: Annotated[Optional[StrictInt], Field(description="Customer's Canvas product bundle filter.")] = None,
|
|
1229
|
+
skip: Annotated[Optional[StrictInt], Field(description="Defines page start offset from beginning of sorted result list.")] = None,
|
|
1230
|
+
take: Annotated[Optional[StrictInt], Field(description="Defines page length (how many consequent items of sorted result list should be taken).")] = None,
|
|
1231
|
+
sorting: Annotated[Optional[StrictStr], Field(description="Defines sorting order of result list e.g.: \"Title ASC, LastModified DESC\".")] = None,
|
|
1232
|
+
search: Annotated[Optional[StrictStr], Field(description="Search string for partial match.")] = None,
|
|
1233
|
+
sku: Annotated[Optional[StrictStr], Field(description="SKU filter.")] = None,
|
|
1234
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="List of tags that product should have.")] = None,
|
|
1235
|
+
custom_fields: Annotated[Optional[StrictStr], Field(description="Serialized custom fields dictionary filter. For example: {\"public\":\"true\",\"name\":\"my item\"}.")] = None,
|
|
1236
|
+
tenant_id: Annotated[Optional[StrictInt], Field(description="Tenant identifier.")] = None,
|
|
1237
|
+
_request_timeout: Union[
|
|
1238
|
+
None,
|
|
1239
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1240
|
+
Tuple[
|
|
1241
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1242
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1243
|
+
]
|
|
1244
|
+
] = None,
|
|
1245
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1246
|
+
_content_type: Optional[StrictStr] = None,
|
|
1247
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1248
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1249
|
+
) -> RESTResponseType:
|
|
1250
|
+
"""Returns all storefront product references relevant to the specified query parameters.
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
:param storefront_id: Storefront identifier. (required)
|
|
1254
|
+
:type storefront_id: int
|
|
1255
|
+
:param product_reference: Product reference filter. Product reference is an external reference to Customer's Canvas product, e.g online store product identifier.
|
|
1256
|
+
:type product_reference: str
|
|
1257
|
+
:param product_specification_id: Customer's Canvas product specification filter.
|
|
1258
|
+
:type product_specification_id: int
|
|
1259
|
+
:param product_id: Customer's Canvas product filter.
|
|
1260
|
+
:type product_id: int
|
|
1261
|
+
:param product_link_id: Customer's Canvas product link filter.
|
|
1262
|
+
:type product_link_id: int
|
|
1263
|
+
:param product_bundle_id: Customer's Canvas product bundle filter.
|
|
1264
|
+
:type product_bundle_id: int
|
|
1265
|
+
:param skip: Defines page start offset from beginning of sorted result list.
|
|
1266
|
+
:type skip: int
|
|
1267
|
+
:param take: Defines page length (how many consequent items of sorted result list should be taken).
|
|
1268
|
+
:type take: int
|
|
1269
|
+
:param sorting: Defines sorting order of result list e.g.: \"Title ASC, LastModified DESC\".
|
|
1270
|
+
:type sorting: str
|
|
1271
|
+
:param search: Search string for partial match.
|
|
1272
|
+
:type search: str
|
|
1273
|
+
:param sku: SKU filter.
|
|
1274
|
+
:type sku: str
|
|
1275
|
+
:param tags: List of tags that product should have.
|
|
1276
|
+
:type tags: List[str]
|
|
1277
|
+
:param custom_fields: Serialized custom fields dictionary filter. For example: {\"public\":\"true\",\"name\":\"my item\"}.
|
|
1278
|
+
:type custom_fields: str
|
|
1279
|
+
:param tenant_id: Tenant identifier.
|
|
1280
|
+
:type tenant_id: int
|
|
1281
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1282
|
+
number provided, it will be total request
|
|
1283
|
+
timeout. It can also be a pair (tuple) of
|
|
1284
|
+
(connection, read) timeouts.
|
|
1285
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1286
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1287
|
+
request; this effectively ignores the
|
|
1288
|
+
authentication in the spec for a single request.
|
|
1289
|
+
:type _request_auth: dict, optional
|
|
1290
|
+
:param _content_type: force content-type for the request.
|
|
1291
|
+
:type _content_type: str, Optional
|
|
1292
|
+
:param _headers: set to override the headers for a single
|
|
1293
|
+
request; this effectively ignores the headers
|
|
1294
|
+
in the spec for a single request.
|
|
1295
|
+
:type _headers: dict, optional
|
|
1296
|
+
:param _host_index: set to override the host_index for a single
|
|
1297
|
+
request; this effectively ignores the host_index
|
|
1298
|
+
in the spec for a single request.
|
|
1299
|
+
:type _host_index: int, optional
|
|
1300
|
+
:return: Returns the result object.
|
|
1301
|
+
""" # noqa: E501
|
|
1302
|
+
|
|
1303
|
+
_param = self._product_references_management_get_all_serialize(
|
|
1304
|
+
storefront_id=storefront_id,
|
|
1305
|
+
product_reference=product_reference,
|
|
1306
|
+
product_specification_id=product_specification_id,
|
|
1307
|
+
product_id=product_id,
|
|
1308
|
+
product_link_id=product_link_id,
|
|
1309
|
+
product_bundle_id=product_bundle_id,
|
|
1310
|
+
skip=skip,
|
|
1311
|
+
take=take,
|
|
1312
|
+
sorting=sorting,
|
|
1313
|
+
search=search,
|
|
1314
|
+
sku=sku,
|
|
1315
|
+
tags=tags,
|
|
1316
|
+
custom_fields=custom_fields,
|
|
1317
|
+
tenant_id=tenant_id,
|
|
1318
|
+
_request_auth=_request_auth,
|
|
1319
|
+
_content_type=_content_type,
|
|
1320
|
+
_headers=_headers,
|
|
1321
|
+
_host_index=_host_index
|
|
1322
|
+
)
|
|
1323
|
+
|
|
1324
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1325
|
+
'200': "PagedOfProductReferenceDto",
|
|
1326
|
+
'409': "GeneralConflictDto",
|
|
1327
|
+
'401': None,
|
|
1328
|
+
'403': None,
|
|
1329
|
+
}
|
|
1330
|
+
response_data = await self.api_client.call_api(
|
|
1331
|
+
*_param,
|
|
1332
|
+
_request_timeout=_request_timeout
|
|
1333
|
+
)
|
|
1334
|
+
return response_data.response
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
def _product_references_management_get_all_serialize(
|
|
1338
|
+
self,
|
|
1339
|
+
storefront_id,
|
|
1340
|
+
product_reference,
|
|
1341
|
+
product_specification_id,
|
|
1342
|
+
product_id,
|
|
1343
|
+
product_link_id,
|
|
1344
|
+
product_bundle_id,
|
|
1345
|
+
skip,
|
|
1346
|
+
take,
|
|
1347
|
+
sorting,
|
|
1348
|
+
search,
|
|
1349
|
+
sku,
|
|
1350
|
+
tags,
|
|
1351
|
+
custom_fields,
|
|
1352
|
+
tenant_id,
|
|
1353
|
+
_request_auth,
|
|
1354
|
+
_content_type,
|
|
1355
|
+
_headers,
|
|
1356
|
+
_host_index,
|
|
1357
|
+
) -> RequestSerialized:
|
|
1358
|
+
|
|
1359
|
+
_host = None
|
|
1360
|
+
|
|
1361
|
+
_collection_formats: Dict[str, str] = {
|
|
1362
|
+
'tags': 'multi',
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
_path_params: Dict[str, str] = {}
|
|
1366
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1367
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1368
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1369
|
+
_files: Dict[
|
|
1370
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1371
|
+
] = {}
|
|
1372
|
+
_body_params: Optional[bytes] = None
|
|
1373
|
+
|
|
1374
|
+
# process the path parameters
|
|
1375
|
+
# process the query parameters
|
|
1376
|
+
if product_reference is not None:
|
|
1377
|
+
|
|
1378
|
+
_query_params.append(('productReference', product_reference))
|
|
1379
|
+
|
|
1380
|
+
if product_specification_id is not None:
|
|
1381
|
+
|
|
1382
|
+
_query_params.append(('productSpecificationId', product_specification_id))
|
|
1383
|
+
|
|
1384
|
+
if product_id is not None:
|
|
1385
|
+
|
|
1386
|
+
_query_params.append(('productId', product_id))
|
|
1387
|
+
|
|
1388
|
+
if product_link_id is not None:
|
|
1389
|
+
|
|
1390
|
+
_query_params.append(('productLinkId', product_link_id))
|
|
1391
|
+
|
|
1392
|
+
if product_bundle_id is not None:
|
|
1393
|
+
|
|
1394
|
+
_query_params.append(('productBundleId', product_bundle_id))
|
|
1395
|
+
|
|
1396
|
+
if skip is not None:
|
|
1397
|
+
|
|
1398
|
+
_query_params.append(('skip', skip))
|
|
1399
|
+
|
|
1400
|
+
if take is not None:
|
|
1401
|
+
|
|
1402
|
+
_query_params.append(('take', take))
|
|
1403
|
+
|
|
1404
|
+
if sorting is not None:
|
|
1405
|
+
|
|
1406
|
+
_query_params.append(('sorting', sorting))
|
|
1407
|
+
|
|
1408
|
+
if search is not None:
|
|
1409
|
+
|
|
1410
|
+
_query_params.append(('search', search))
|
|
1411
|
+
|
|
1412
|
+
if sku is not None:
|
|
1413
|
+
|
|
1414
|
+
_query_params.append(('sku', sku))
|
|
1415
|
+
|
|
1416
|
+
if tags is not None:
|
|
1417
|
+
|
|
1418
|
+
_query_params.append(('tags', tags))
|
|
1419
|
+
|
|
1420
|
+
if custom_fields is not None:
|
|
1421
|
+
|
|
1422
|
+
_query_params.append(('customFields', custom_fields))
|
|
1423
|
+
|
|
1424
|
+
if storefront_id is not None:
|
|
1425
|
+
|
|
1426
|
+
_query_params.append(('storefrontId', storefront_id))
|
|
1427
|
+
|
|
1428
|
+
if tenant_id is not None:
|
|
1429
|
+
|
|
1430
|
+
_query_params.append(('tenantId', tenant_id))
|
|
1431
|
+
|
|
1432
|
+
# process the header parameters
|
|
1433
|
+
# process the form parameters
|
|
1434
|
+
# process the body parameter
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
# set the HTTP header `Accept`
|
|
1438
|
+
if 'Accept' not in _header_params:
|
|
1439
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1440
|
+
[
|
|
1441
|
+
'application/json'
|
|
1442
|
+
]
|
|
1443
|
+
)
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
# authentication setting
|
|
1447
|
+
_auth_settings: List[str] = [
|
|
1448
|
+
'ApiKey',
|
|
1449
|
+
'OAuth2ClientCredentials',
|
|
1450
|
+
'OAuth2Implicit',
|
|
1451
|
+
'Bearer'
|
|
1452
|
+
]
|
|
1453
|
+
|
|
1454
|
+
return self.api_client.param_serialize(
|
|
1455
|
+
method='GET',
|
|
1456
|
+
resource_path='/api/backoffice/v1/product-references',
|
|
1457
|
+
path_params=_path_params,
|
|
1458
|
+
query_params=_query_params,
|
|
1459
|
+
header_params=_header_params,
|
|
1460
|
+
body=_body_params,
|
|
1461
|
+
post_params=_form_params,
|
|
1462
|
+
files=_files,
|
|
1463
|
+
auth_settings=_auth_settings,
|
|
1464
|
+
collection_formats=_collection_formats,
|
|
1465
|
+
_host=_host,
|
|
1466
|
+
_request_auth=_request_auth
|
|
1467
|
+
)
|
|
1468
|
+
|
|
1469
|
+
|