Client   F
last analyzed

Complexity

Total Complexity 217

Size/Duplication

Total Lines 3095
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 227
c 0
b 0
f 0
dl 0
loc 3095
rs 2
wmc 217

216 Methods

Rating   Name   Duplication   Size   Complexity  
A patchOrderStatus() 0 3 1
A createOrder() 0 3 1
A getCustomer() 0 3 1
A deleteOrderExternalService() 0 3 1
A createCustomer() 0 3 1
A getCurrencies() 0 3 1
A patchMediaFile() 0 3 1
A deleteMediaFile() 0 3 1
A listOrders() 0 3 1
A getOrderItems() 0 3 1
A getOrderItem() 0 3 1
A putMediaFile() 0 3 1
A patchOrderExternalService() 0 3 1
A putOrderExternalService() 0 3 1
A getCurrency() 0 3 1
A deleteOrder() 0 3 1
A getCustomerGroups() 0 3 1
A removeCommentFromOrder() 0 3 1
A getCustomersTag() 0 3 1
A patchOrderAddress() 0 3 1
A patchCustomerAddress() 0 3 1
A putCustomerAddress() 0 3 1
A putCustomer() 0 3 1
A getMediaFile() 0 3 1
A addCommentToOrder() 0 3 1
A patchCustomer() 0 3 1
A getOrder() 0 3 1
A deleteCustomer() 0 3 1
A patchCommentToOrder() 0 3 1
A getOrderStatuses() 0 3 1
A getCustomerExternalServices() 0 3 1
A getCustomerTag() 0 3 1
A getOrderAddress() 0 3 1
A getOrderComments() 0 3 1
A createOrderExternalService() 0 3 1
A getOrderComment() 0 3 1
A createOrderItem() 0 3 1
A putOrderStatus() 0 3 1
A updateCommentToOrder() 0 3 1
A putOrderItem() 0 3 1
A removeAddressFromCustomer() 0 3 1
A deleteOrderAddress() 0 3 1
A getOrderExternalService() 0 3 1
A patchOrder() 0 3 1
A getPricelists() 0 3 1
A createOrderStatus() 0 3 1
A listCustomers() 0 3 1
A removeTagFromCustomer() 0 3 1
A getCustomerAddress() 0 3 1
A patchOrderItem() 0 3 1
A putOrder() 0 3 1
A deleteOrderStatus() 0 3 1
A getCustomerExternalService() 0 3 1
A addTagToCustomer() 0 3 1
A putOrderAddress() 0 3 1
A listOrderAddresses() 0 3 1
A getPaymentMethods() 0 3 1
A getMediaFiles() 0 3 1
A getCustomersTags() 0 3 1
A getCustomerTags() 0 3 1
A createMediaFile() 0 3 1
A getOrderStatus() 0 3 1
A getOrderExternalServices() 0 3 1
A getPaymentMethod() 0 3 1
A deleteOrderItem() 0 3 1
A generateFetchAccessToken() 0 3 1
A patchProductCategory() 0 3 1
A patchProductsVariantsPricelistVolumePrice() 0 3 1
A deleteProductManufacturer() 0 3 1
A patchProductsVatRate() 0 3 1
A putProductBundledProductsPricelistPrice() 0 3 1
A listProductsLanguages() 0 3 1
A getStockLocation() 0 3 1
A getProductsLanguage() 0 3 1
A listVatRates() 0 3 1
A getWebHooks() 0 3 1
A createProductsLanguage() 0 3 1
A getProductUnit() 0 3 1
A listProductTagLinks() 0 3 1
A createProductTagOption() 0 3 1
A listProductsVariants() 0 3 1
A getProductMetaDataType() 0 3 1
A getProductsVariantsPricelistVolumePrice() 0 3 1
A getProductsVariantsAttributeValue() 0 3 1
A getProductsCategoryLink() 0 3 1
A deleteWebHook() 0 3 1
A getProductsAttribute() 0 3 1
A listProductsVariantsPricelistVolumePrices() 0 3 1
A listProductStockStatses() 0 3 1
A listProductManufacturers() 0 3 1
A createProductsMetaData() 0 3 1
A deleteAttribute() 0 3 1
A getShop() 0 3 1
A patchProductTag() 0 3 1
A deleteProductCategory() 0 3 1
A listProductBundledProductsPricelistPrices() 0 3 1
A createAttribute() 0 3 1
A getProductsTag() 0 3 1
A putProductsVariantsPricelistPrice() 0 3 1
A createProductVariantPricelistVolumePrice() 0 3 1
A getProductsVatRate() 0 3 1
A getProductCategory() 0 3 1
A putProductsBundledProduct() 0 3 1
A putStockLocation() 0 3 1
A getProductsVariant() 0 3 1
A getProductsVariantsAttribute() 0 3 1
A createProductVatRate() 0 3 1
A deleteProductsMetaData() 0 3 1
A patchProductsCategoryLink() 0 3 1
A listProductUnits() 0 3 1
A listProductsCategoryLinks() 0 3 1
A createProductManufacturers() 0 3 1
A getProductTagLink() 0 3 1
A getProductManufacturer() 0 3 1
A createProductBundledProduct() 0 3 1
A putProductsVatRate() 0 3 1
A putProductsMediaFileLink() 0 3 1
A patchProductsMediaFileLink() 0 3 1
A deleteProductsVariantsPricelistPrice() 0 3 1
A putProductsCategoryLink() 0 3 1
A getProductBundledProductsPricelistPrice() 0 3 1
A getProductVariantStock() 0 3 1
A createProduct() 0 3 1
A deleteProductsVatRate() 0 3 1
A createProductCategory() 0 3 1
A patchProductManufacturer() 0 3 1
A getPricelist() 0 3 1
A putProductStockStatus() 0 3 1
A getProductsTags() 0 3 1
A patchProductsVariant() 0 3 1
A createProductStockStatus() 0 3 1
A putProductMetaDataType() 0 3 1
A createProductsMediaFileLink() 0 3 1
A patchProductsBundledProduct() 0 3 1
A patchProductMetaDataType() 0 3 1
A createProductMetaDataType() 0 3 1
A putProductsVariantsPricelistVolumePrice() 0 3 1
A deleteProductStockStatus() 0 3 1
A listProductsVariantsStocks() 0 3 1
A listProducts() 0 3 1
A patchProductBundledProductsPricelistPrice() 0 3 1
A patchProductsVariantsPricelistPrice() 0 3 1
A deleteProductsCategoryLink() 0 3 1
A listProductsVariantsAttributes() 0 3 1
A patchPricelist() 0 3 1
A listProductsAttributes() 0 3 1
A createProductTagLink() 0 3 1
A deleteProductTagOption() 0 3 1
A deleteStockLocation() 0 3 1
A createProductBundleProductPricelistPrice() 0 3 1
A putProductsMetaData() 0 3 1
A getVatRate() 0 3 1
A putPricelist() 0 3 1
A getProduct() 0 3 1
A getProductsBundledProducts() 0 3 1
A listProductMetaDataTypes() 0 3 1
A putProductTagOption() 0 3 1
A putProduct() 0 3 1
A putProductManufacturer() 0 3 1
A patchAttribute() 0 3 1
A deleteProductMetaDataType() 0 3 1
A putProductTag() 0 3 1
A patchStockLocation() 0 3 1
A deleteProductTag() 0 3 1
A patchProductsVariantsAttributeValues() 0 3 1
A getProductsMediaFileLink() 0 3 1
A deletePricelist() 0 3 1
A putWebHook() 0 3 1
A deleteProductBundledProductsPricelistPrice() 0 3 1
A createProductsVariantsAttributeValues() 0 3 1
A patchProduct() 0 3 1
A getShippingMethods() 0 3 1
A putProductCategory() 0 3 1
A deleteProductsVariantsPricelistVolumePrice() 0 3 1
A putProductsVariant() 0 3 1
A listProductsMetaData() 0 3 1
A getProductsTagOptions() 0 3 1
A patchProductTagOption() 0 3 1
A listProductsBundledProducts() 0 3 1
A deleteProductTagLink() 0 3 1
A createWebHook() 0 3 1
A getProductTagOptions() 0 3 1
A getWebHook() 0 3 1
A patchProductStockStatus() 0 3 1
A putAttribute() 0 3 1
A putProductVariantStock() 0 3 1
A create() 0 14 2
A deleteProduct() 0 3 1
A getProductsMetaData() 0 3 1
A listProductsVariantsPricelistPrices() 0 3 1
A getShippingMethod() 0 3 1
A getProductStockStatus() 0 3 1
A patchProductsMetaData() 0 3 1
A listProductCategories() 0 3 1
A createProductTag() 0 3 1
A listStockLocations() 0 3 1
A listProductsVatRates() 0 3 1
A putProductsLanguage() 0 3 1
A deleteProductsBundledProduct() 0 3 1
A deleteProductVariantStocks() 0 3 1
A putProductsVariantsAttributeValues() 0 3 1
A deleteProductsLanguage() 0 3 1
A listProductsVariantsAttributeValues() 0 3 1
A createProductsCategoryLink() 0 3 1
A createProductVariantPricelistPrice() 0 3 1
A deleteAttributeValue() 0 3 1
A deleteProductsMediaFileLink() 0 3 1
A deleteProductsVariant() 0 3 1
A patchProductsLanguage() 0 3 1
A createPricelist() 0 3 1
A createProductVariant() 0 3 1
A getProductsVariantsPricelistPrice() 0 3 1
A getShippingTrackingTypes() 0 3 1
A patchWebHook() 0 3 1
A listProductsMediaFileLinks() 0 3 1
A createStockLocation() 0 3 1

How to fix   Complexity   

Complex Class

Complex classes like Client often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use Client, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
namespace Starweb\Api\Generated;
4
5
class Client extends \Jane\OpenApiRuntime\Client\Psr7HttplugClient
0 ignored issues
show
Deprecated Code introduced by
The class Jane\OpenApiRuntime\Client\Psr7HttplugClient has been deprecated: since Jane 5.1, use Psr18Client instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

5
class Client extends /** @scrutinizer ignore-deprecated */ \Jane\OpenApiRuntime\Client\Psr7HttplugClient
Loading history...
6
{
7
    /**
8
     * Create a token. Retrieves the create `Token` object.
9
     *
10
     * @param \Starweb\Api\Generated\Model\ClientCredentialModel $requestBody 
11
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
12
     * @throws \Starweb\Api\Generated\Exception\GenerateFetchAccessTokenBadRequestException
13
     *
14
     * @return null|\Starweb\Api\Generated\Model\TokenModel|\Psr\Http\Message\ResponseInterface
15
     */
16
    public function generateFetchAccessToken(\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody, string $fetch = self::FETCH_OBJECT)
17
    {
18
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GenerateFetchAccessToken($requestBody), $fetch);
19
    }
20
    /**
21
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
22
     *
23
     * @return null|\Starweb\Api\Generated\Model\CurrencyCollection|\Psr\Http\Message\ResponseInterface
24
     */
25
    public function getCurrencies(string $fetch = self::FETCH_OBJECT)
26
    {
27
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCurrencies(), $fetch);
28
    }
29
    /**
30
     * Retrieves the details of a currency
31
     *
32
     * @param string $currencyCode The currency code
33
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
34
     * @throws \Starweb\Api\Generated\Exception\GetCurrencyNotFoundException
35
     *
36
     * @return null|\Starweb\Api\Generated\Model\CurrencyModelItem|\Psr\Http\Message\ResponseInterface
37
     */
38
    public function getCurrency(string $currencyCode, string $fetch = self::FETCH_OBJECT)
39
    {
40
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCurrency($currencyCode), $fetch);
41
    }
42
    /**
43
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
44
     *
45
     * @return null|\Starweb\Api\Generated\Model\CustomerTagModelCollection|\Psr\Http\Message\ResponseInterface
46
     */
47
    public function getCustomersTags(string $fetch = self::FETCH_OBJECT)
48
    {
49
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomersTags(), $fetch);
50
    }
51
    /**
52
     * Retrieves a `Tag` object
53
     *
54
     * @param int $tagId The tag id
55
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
56
     * @throws \Starweb\Api\Generated\Exception\GetCustomersTagNotFoundException
57
     *
58
     * @return null|\Starweb\Api\Generated\Model\CustomerTagModelItem|\Psr\Http\Message\ResponseInterface
59
     */
60
    public function getCustomersTag(int $tagId, string $fetch = self::FETCH_OBJECT)
61
    {
62
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomersTag($tagId), $fetch);
63
    }
64
    /**
65
     * Returns a list of customers
66
     *
67
     * @param array $queryParameters {
68
     *     @var int $page The page of customers to return
69
     *     @var string $sortBy Sort the result using a specified field. customerId is default. Valid options are: customerId
70
     *     @var string $sortOrder ASC for an ascending sort order; or DESC for a descending sort order. DESC is default
71
     *     @var string $createdSince Use this to only fetch customers that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)
72
     *     @var string $updatedSince Use this to only fetch customers that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)
73
     *     @var bool $includeWithoutAccount Use this to also include customers without an account
74
     *     @var string $include If you want to include child data in the result. Example: ?include=tags (to include customer tags); ?include=tags,addresses (to include both customer tags and addresses). Available includes: tags, externalServices, addresses
75
     * }
76
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
77
     * @throws \Starweb\Api\Generated\Exception\ListCustomersBadRequestException
78
     *
79
     * @return null|\Starweb\Api\Generated\Model\CustomerModelCollection|\Psr\Http\Message\ResponseInterface
80
     */
81
    public function listCustomers(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
82
    {
83
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListCustomers($queryParameters), $fetch);
84
    }
85
    /**
86
     * Creates a `Customer` object
87
     *
88
     * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody 
89
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
90
     * @throws \Starweb\Api\Generated\Exception\CreateCustomerBadRequestException
91
     *
92
     * @return null|\Starweb\Api\Generated\Model\CustomerCreatedModelItem|\Psr\Http\Message\ResponseInterface
93
     */
94
    public function createCustomer(\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT)
95
    {
96
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateCustomer($requestBody), $fetch);
97
    }
98
    /**
99
     * Delete a customer permanently!
100
     *
101
     * @param int $customerId The customers id
102
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
103
     * @throws \Starweb\Api\Generated\Exception\DeleteCustomerNotFoundException
104
     *
105
     * @return null|\Psr\Http\Message\ResponseInterface
106
     */
107
    public function deleteCustomer(int $customerId, string $fetch = self::FETCH_OBJECT)
108
    {
109
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteCustomer($customerId), $fetch);
110
    }
111
    /**
112
     * Retrieves a `Customer` object
113
     *
114
     * @param int $customerId The customers id
115
     * @param array $queryParameters {
116
     *     @var string $include If you want to include child data in the result. Example: ?include=tags (to include customer tags); ?include=tags,addresses (to include both customer tags and addresses). Available includes: tags, externalServices, addresses
117
     * }
118
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
119
     * @throws \Starweb\Api\Generated\Exception\GetCustomerNotFoundException
120
     *
121
     * @return null|\Starweb\Api\Generated\Model\CustomerModelItem|\Psr\Http\Message\ResponseInterface
122
     */
123
    public function getCustomer(int $customerId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
124
    {
125
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomer($customerId, $queryParameters), $fetch);
126
    }
127
    /**
128
     * Updates a customer. Retrieves the updated `Customer` object
129
     *
130
     * @param int $customerId The customers id
131
     * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody 
132
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
133
     * @throws \Starweb\Api\Generated\Exception\PatchCustomerBadRequestException
134
     * @throws \Starweb\Api\Generated\Exception\PatchCustomerNotFoundException
135
     *
136
     * @return null|\Starweb\Api\Generated\Model\CustomerModelItem|\Psr\Http\Message\ResponseInterface
137
     */
138
    public function patchCustomer(int $customerId, \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT)
139
    {
140
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchCustomer($customerId, $requestBody), $fetch);
141
    }
142
    /**
143
     * Updates a customer. Retrieves the updated `Customer` object
144
     *
145
     * @param int $customerId The customers id
146
     * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody 
147
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
148
     * @throws \Starweb\Api\Generated\Exception\PutCustomerBadRequestException
149
     * @throws \Starweb\Api\Generated\Exception\PutCustomerNotFoundException
150
     *
151
     * @return null|\Starweb\Api\Generated\Model\CustomerModelItem|\Psr\Http\Message\ResponseInterface
152
     */
153
    public function putCustomer(int $customerId, \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT)
154
    {
155
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutCustomer($customerId, $requestBody), $fetch);
156
    }
157
    /**
158
     * Returns a list of external services for a customer
159
     *
160
     * @param int $customerId The customers id
161
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
162
     *
163
     * @return null|\Starweb\Api\Generated\Model\CustomerExternalServicesModelCollection|\Psr\Http\Message\ResponseInterface
164
     */
165
    public function getCustomerExternalServices(int $customerId, string $fetch = self::FETCH_OBJECT)
166
    {
167
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerExternalServices($customerId), $fetch);
168
    }
169
    /**
170
     * Retrieves a `CustomerExternalService` object
171
     *
172
     * @param int $customerId The customers id
173
     * @param string $serviceName The service name
174
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
175
     * @throws \Starweb\Api\Generated\Exception\GetCustomerExternalServiceNotFoundException
176
     *
177
     * @return null|\Starweb\Api\Generated\Model\CustomerExternalServicesModelItem|\Psr\Http\Message\ResponseInterface
178
     */
179
    public function getCustomerExternalService(int $customerId, string $serviceName, string $fetch = self::FETCH_OBJECT)
180
    {
181
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerExternalService($customerId, $serviceName), $fetch);
182
    }
183
    /**
184
     * Returns a list of customer tags
185
     *
186
     * @param int $customerId The customers id
187
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
188
     *
189
     * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelCollection|\Psr\Http\Message\ResponseInterface
190
     */
191
    public function getCustomerTags(int $customerId, string $fetch = self::FETCH_OBJECT)
192
    {
193
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerTags($customerId), $fetch);
194
    }
195
    /**
196
     * Add a tag to a customer. Retrieves the created `CustomerTag` object
197
     *
198
     * @param int $customerId The customers id
199
     * @param \Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody 
200
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
201
     * @throws \Starweb\Api\Generated\Exception\AddTagToCustomerBadRequestException
202
     *
203
     * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelItem|\Psr\Http\Message\ResponseInterface
204
     */
205
    public function addTagToCustomer(int $customerId, \Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody, string $fetch = self::FETCH_OBJECT)
206
    {
207
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\AddTagToCustomer($customerId, $requestBody), $fetch);
208
    }
209
    /**
210
     * Deletes a customer tag permanently.
211
     *
212
     * @param int $customerId The customers id
213
     * @param int $tagId The customer tag id
214
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
215
     * @throws \Starweb\Api\Generated\Exception\RemoveTagFromCustomerNotFoundException
216
     *
217
     * @return null|\Psr\Http\Message\ResponseInterface
218
     */
219
    public function removeTagFromCustomer(int $customerId, int $tagId, string $fetch = self::FETCH_OBJECT)
220
    {
221
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\RemoveTagFromCustomer($customerId, $tagId), $fetch);
222
    }
223
    /**
224
     * Retrieves a `CustomerTag` object
225
     *
226
     * @param int $customerId The customers id
227
     * @param int $tagId The customer tag id
228
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
229
     * @throws \Starweb\Api\Generated\Exception\GetCustomerTagNotFoundException
230
     *
231
     * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelItem|\Psr\Http\Message\ResponseInterface
232
     */
233
    public function getCustomerTag(int $customerId, int $tagId, string $fetch = self::FETCH_OBJECT)
234
    {
235
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerTag($customerId, $tagId), $fetch);
236
    }
237
    /**
238
     * Returns a list of addresses for a customer
239
     *
240
     * @param int $customerId The customers id
241
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
242
     *
243
     * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelCollection|\Psr\Http\Message\ResponseInterface
244
     */
245
    public function getCustomerGroups(int $customerId, string $fetch = self::FETCH_OBJECT)
246
    {
247
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerGroups($customerId), $fetch);
248
    }
249
    /**
250
     * Delete a customer address permanently.
251
     *
252
     * @param int $customerId The customers id
253
     * @param string $addressType The customer address type
254
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
255
     * @throws \Starweb\Api\Generated\Exception\RemoveAddressFromCustomerForbiddenException
256
     * @throws \Starweb\Api\Generated\Exception\RemoveAddressFromCustomerNotFoundException
257
     *
258
     * @return null|\Psr\Http\Message\ResponseInterface
259
     */
260
    public function removeAddressFromCustomer(int $customerId, string $addressType, string $fetch = self::FETCH_OBJECT)
261
    {
262
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\RemoveAddressFromCustomer($customerId, $addressType), $fetch);
263
    }
264
    /**
265
     * Retrieves a `CustomerAddress` object
266
     *
267
     * @param int $customerId The customers id
268
     * @param string $addressType The customer address type
269
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
270
     * @throws \Starweb\Api\Generated\Exception\GetCustomerAddressNotFoundException
271
     *
272
     * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem|\Psr\Http\Message\ResponseInterface
273
     */
274
    public function getCustomerAddress(int $customerId, string $addressType, string $fetch = self::FETCH_OBJECT)
275
    {
276
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerAddress($customerId, $addressType), $fetch);
277
    }
278
    /**
279
     * Updates a customer address. Retrieves the updated `CustomerAddress` object
280
     *
281
     * @param int $customerId The customers id
282
     * @param string $addressType The customer address type
283
     * @param \Starweb\Api\Generated\Model\AddressModel $requestBody 
284
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
285
     * @throws \Starweb\Api\Generated\Exception\PatchCustomerAddressBadRequestException
286
     * @throws \Starweb\Api\Generated\Exception\PatchCustomerAddressNotFoundException
287
     *
288
     * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem|\Psr\Http\Message\ResponseInterface
289
     */
290
    public function patchCustomerAddress(int $customerId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT)
291
    {
292
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchCustomerAddress($customerId, $addressType, $requestBody), $fetch);
293
    }
294
    /**
295
     * Updates a customer address. Retrieves the updated `CustomerAddress` object
296
     *
297
     * @param int $customerId The customers id
298
     * @param string $addressType The customer address type
299
     * @param \Starweb\Api\Generated\Model\AddressModel $requestBody 
300
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
301
     * @throws \Starweb\Api\Generated\Exception\PutCustomerAddressBadRequestException
302
     * @throws \Starweb\Api\Generated\Exception\PutCustomerAddressNotFoundException
303
     *
304
     * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem|\Psr\Http\Message\ResponseInterface
305
     */
306
    public function putCustomerAddress(int $customerId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT)
307
    {
308
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutCustomerAddress($customerId, $addressType, $requestBody), $fetch);
309
    }
310
    /**
311
     * Returns a list of media file‚
312
     *
313
     * @param array $queryParameters {
314
     *     @var int $page The page of media files to return
315
     * }
316
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
317
     *
318
     * @return null|\Starweb\Api\Generated\Model\MediaFileModelCollection|\Psr\Http\Message\ResponseInterface
319
     */
320
    public function getMediaFiles(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
321
    {
322
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetMediaFiles($queryParameters), $fetch);
323
    }
324
    /**
325
     * Creates a new `Media File` object
326
     *
327
     * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody 
328
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
329
     * @throws \Starweb\Api\Generated\Exception\CreateMediaFileBadRequestException
330
     *
331
     * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface
332
     */
333
    public function createMediaFile(\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody, string $fetch = self::FETCH_OBJECT)
334
    {
335
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateMediaFile($requestBody), $fetch);
336
    }
337
    /**
338
     * Delete a media file permanently.
339
     *
340
     * @param int $mediaFileId The media files id
341
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
342
     * @throws \Starweb\Api\Generated\Exception\DeleteMediaFileNotFoundException
343
     *
344
     * @return null|\Psr\Http\Message\ResponseInterface
345
     */
346
    public function deleteMediaFile(int $mediaFileId, string $fetch = self::FETCH_OBJECT)
347
    {
348
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteMediaFile($mediaFileId), $fetch);
349
    }
350
    /**
351
     * Retrieve a `MediaFile` object
352
     *
353
     * @param int $mediaFileId The media files id
354
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
355
     * @throws \Starweb\Api\Generated\Exception\GetMediaFileNotFoundException
356
     *
357
     * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface
358
     */
359
    public function getMediaFile(int $mediaFileId, string $fetch = self::FETCH_OBJECT)
360
    {
361
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetMediaFile($mediaFileId), $fetch);
362
    }
363
    /**
364
     * Updates a media file. Retrieves the updated `MediaFile` object
365
     *
366
     * @param int $mediaFileId The media files id
367
     * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody 
368
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
369
     * @throws \Starweb\Api\Generated\Exception\PatchMediaFileBadRequestException
370
     * @throws \Starweb\Api\Generated\Exception\PatchMediaFileNotFoundException
371
     *
372
     * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface
373
     */
374
    public function patchMediaFile(int $mediaFileId, \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody, string $fetch = self::FETCH_OBJECT)
375
    {
376
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchMediaFile($mediaFileId, $requestBody), $fetch);
377
    }
378
    /**
379
     * Updates a media file. Retrieves the updated `MediaFile` object
380
     *
381
     * @param int $mediaFileId The media files id
382
     * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody 
383
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
384
     * @throws \Starweb\Api\Generated\Exception\PutMediaFileBadRequestException
385
     * @throws \Starweb\Api\Generated\Exception\PutMediaFileNotFoundException
386
     *
387
     * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface
388
     */
389
    public function putMediaFile(int $mediaFileId, \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody, string $fetch = self::FETCH_OBJECT)
390
    {
391
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutMediaFile($mediaFileId, $requestBody), $fetch);
392
    }
393
    /**
394
     * Returns a list of orders.
395
     *
396
     * @param array $queryParameters {
397
     *     @var int $page The page of orders to return
398
     *     @var bool $includeNonCompletePayments Set to true if you want to fetch orders that has not been completed yet. An order is ”completed” when the payment step has been completed successfully.
399
     *     @var string $filterQuery A filter query to filter the fetched orders by. Will search in fields such as: customer/company name, order items sku and description, etc
400
     *     @var int $filterPaymentMethodId Only fetch orders with a certain payment method Id
401
     *     @var int $filterShippingMethodId Only fetch orders with a certain shipping method Id
402
     *     @var string $ordersCreatedAfter Only fetch orders created after this timestamp (The time should be formatted using ISO-8601 and url encoded)
403
     *     @var string $ordersCreatedBefore Only fetch orders created before this timestamp (The time should be formatted using ISO-8601 and url encoded)
404
     *     @var int $statusFilter Only fetch orders with the specifiec order status. Use order status ID
405
     *     @var string $sortBy Sort the result using a specified field. orderId is default
406
     *     @var string $sortOrder ASC for an ascending sort order; or DESC for a descending sort order. DESC is default
407
     *     @var string $include If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). Available includes: items, externalServices, status, customer, addresses
408
     * }
409
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
410
     * @throws \Starweb\Api\Generated\Exception\ListOrdersBadRequestException
411
     *
412
     * @return null|\Starweb\Api\Generated\Model\OrderModelCollection|\Psr\Http\Message\ResponseInterface
413
     */
414
    public function listOrders(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
415
    {
416
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListOrders($queryParameters), $fetch);
417
    }
418
    /**
419
     * Create an order. Retrieves the create `Order` object
420
     *
421
     * @param \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody 
422
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
423
     * @throws \Starweb\Api\Generated\Exception\CreateOrderBadRequestException
424
     *
425
     * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface
426
     */
427
    public function createOrder(\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT)
428
    {
429
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrder($requestBody), $fetch);
430
    }
431
    /**
432
     * Delete an order permanently
433
     *
434
     * @param int $orderId The orders id
435
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
436
     * @throws \Starweb\Api\Generated\Exception\DeleteOrderNotFoundException
437
     *
438
     * @return null|\Psr\Http\Message\ResponseInterface
439
     */
440
    public function deleteOrder(int $orderId, string $fetch = self::FETCH_OBJECT)
441
    {
442
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrder($orderId), $fetch);
443
    }
444
    /**
445
     * Retrieve an `Order` object
446
     *
447
     * @param int $orderId The orders id
448
     * @param array $queryParameters {
449
     *     @var string $include If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). Available includes: items, externalServices, status, customer, addresses
450
     * }
451
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
452
     * @throws \Starweb\Api\Generated\Exception\GetOrderNotFoundException
453
     *
454
     * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface
455
     */
456
    public function getOrder(int $orderId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
457
    {
458
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrder($orderId, $queryParameters), $fetch);
459
    }
460
    /**
461
     * Updates an order. Retrieves the updated `Order` object
462
     *
463
     * @param int $orderId The orders id
464
     * @param \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody 
465
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
466
     * @throws \Starweb\Api\Generated\Exception\PatchOrderBadRequestException
467
     * @throws \Starweb\Api\Generated\Exception\PatchOrderNotFoundException
468
     *
469
     * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface
470
     */
471
    public function patchOrder(int $orderId, \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT)
472
    {
473
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrder($orderId, $requestBody), $fetch);
474
    }
475
    /**
476
     * Updates an order. Retrieves the updated `Order` object
477
     *
478
     * @param int $orderId The orders id
479
     * @param \Starweb\Api\Generated\Model\OrderPutModel $requestBody 
480
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
481
     * @throws \Starweb\Api\Generated\Exception\PutOrderBadRequestException
482
     * @throws \Starweb\Api\Generated\Exception\PutOrderNotFoundException
483
     *
484
     * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface
485
     */
486
    public function putOrder(int $orderId, \Starweb\Api\Generated\Model\OrderPutModel $requestBody, string $fetch = self::FETCH_OBJECT)
487
    {
488
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrder($orderId, $requestBody), $fetch);
489
    }
490
    /**
491
     * Returns a list o order addresses
492
     *
493
     * @param int $orderId The orders id
494
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
495
     *
496
     * @return null|\Starweb\Api\Generated\Model\OrderAddressCollection|\Psr\Http\Message\ResponseInterface
497
     */
498
    public function listOrderAddresses(int $orderId, string $fetch = self::FETCH_OBJECT)
499
    {
500
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListOrderAddresses($orderId), $fetch);
501
    }
502
    /**
503
     * Delete an order address permanently.
504
     *
505
     * @param int $orderId The orders id
506
     * @param string $addressType The order address type
507
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
508
     * @throws \Starweb\Api\Generated\Exception\DeleteOrderAddressNotFoundException
509
     *
510
     * @return null|\Psr\Http\Message\ResponseInterface
511
     */
512
    public function deleteOrderAddress(int $orderId, string $addressType, string $fetch = self::FETCH_OBJECT)
513
    {
514
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderAddress($orderId, $addressType), $fetch);
515
    }
516
    /**
517
     * Retrieves the `OrderAddress` object
518
     *
519
     * @param int $orderId The orders id
520
     * @param string $addressType The order address type
521
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
522
     * @throws \Starweb\Api\Generated\Exception\GetOrderAddressNotFoundException
523
     *
524
     * @return null|\Starweb\Api\Generated\Model\AddressModelItem|\Psr\Http\Message\ResponseInterface
525
     */
526
    public function getOrderAddress(int $orderId, string $addressType, string $fetch = self::FETCH_OBJECT)
527
    {
528
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderAddress($orderId, $addressType), $fetch);
529
    }
530
    /**
531
     * Updates an order adress. Retrieves the updated `OrderAddress` object
532
     *
533
     * @param int $orderId The orders id
534
     * @param string $addressType The order address type
535
     * @param \Starweb\Api\Generated\Model\AddressModel $requestBody 
536
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
537
     * @throws \Starweb\Api\Generated\Exception\PatchOrderAddressBadRequestException
538
     * @throws \Starweb\Api\Generated\Exception\PatchOrderAddressNotFoundException
539
     *
540
     * @return null|\Starweb\Api\Generated\Model\AddressModelItem|\Psr\Http\Message\ResponseInterface
541
     */
542
    public function patchOrderAddress(int $orderId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT)
543
    {
544
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderAddress($orderId, $addressType, $requestBody), $fetch);
545
    }
546
    /**
547
     * Updates an order adress. Retrieves the updated `OrderAddress` object
548
     *
549
     * @param int $orderId The orders id
550
     * @param string $addressType The order address type
551
     * @param \Starweb\Api\Generated\Model\AddressModel $requestBody 
552
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
553
     * @throws \Starweb\Api\Generated\Exception\PutOrderAddressBadRequestException
554
     * @throws \Starweb\Api\Generated\Exception\PutOrderAddressNotFoundException
555
     *
556
     * @return null|\Starweb\Api\Generated\Model\AddressModelItem|\Psr\Http\Message\ResponseInterface
557
     */
558
    public function putOrderAddress(int $orderId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT)
559
    {
560
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderAddress($orderId, $addressType, $requestBody), $fetch);
561
    }
562
    /**
563
     * Returns a list of order comments.
564
     *
565
     * @param int $orderId The orders id
566
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
567
     *
568
     * @return null|\Starweb\Api\Generated\Model\OrderCommentModelCollection|\Psr\Http\Message\ResponseInterface
569
     */
570
    public function getOrderComments(int $orderId, string $fetch = self::FETCH_OBJECT)
571
    {
572
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderComments($orderId), $fetch);
573
    }
574
    /**
575
     * Add a comment to an order. Retrieves the created `OrderComment` object
576
     *
577
     * @param int $orderId The orders id
578
     * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody 
579
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
580
     * @throws \Starweb\Api\Generated\Exception\AddCommentToOrderBadRequestException
581
     *
582
     * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface
583
     */
584
    public function addCommentToOrder(int $orderId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody, string $fetch = self::FETCH_OBJECT)
585
    {
586
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\AddCommentToOrder($orderId, $requestBody), $fetch);
587
    }
588
    /**
589
     * Deletes an order comment permanently.
590
     *
591
     * @param int $orderId The orders id
592
     * @param int $commentId The order comments id
593
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
594
     * @throws \Starweb\Api\Generated\Exception\RemoveCommentFromOrderNotFoundException
595
     *
596
     * @return null|\Psr\Http\Message\ResponseInterface
597
     */
598
    public function removeCommentFromOrder(int $orderId, int $commentId, string $fetch = self::FETCH_OBJECT)
599
    {
600
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\RemoveCommentFromOrder($orderId, $commentId), $fetch);
601
    }
602
    /**
603
     * Retrieves the `OrderComment` object
604
     *
605
     * @param int $orderId The orders id
606
     * @param int $commentId The order comments id
607
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
608
     * @throws \Starweb\Api\Generated\Exception\GetOrderCommentNotFoundException
609
     *
610
     * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface
611
     */
612
    public function getOrderComment(int $orderId, int $commentId, string $fetch = self::FETCH_OBJECT)
613
    {
614
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderComment($orderId, $commentId), $fetch);
615
    }
616
    /**
617
     * Update a comment for an order. Retrieves the created `OrderComment` object
618
     *
619
     * @param int $orderId The orders id
620
     * @param int $commentId The order comments id
621
     * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody 
622
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
623
     * @throws \Starweb\Api\Generated\Exception\PatchCommentToOrderBadRequestException
624
     *
625
     * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface
626
     */
627
    public function patchCommentToOrder(int $orderId, int $commentId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody, string $fetch = self::FETCH_OBJECT)
628
    {
629
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchCommentToOrder($orderId, $commentId, $requestBody), $fetch);
630
    }
631
    /**
632
     * Update a comment for an order. Retrieves the created `OrderComment` object
633
     *
634
     * @param int $orderId The orders id
635
     * @param int $commentId The order comments id
636
     * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody 
637
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
638
     * @throws \Starweb\Api\Generated\Exception\UpdateCommentToOrderBadRequestException
639
     *
640
     * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface
641
     */
642
    public function updateCommentToOrder(int $orderId, int $commentId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody, string $fetch = self::FETCH_OBJECT)
643
    {
644
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\UpdateCommentToOrder($orderId, $commentId, $requestBody), $fetch);
645
    }
646
    /**
647
     * Returns a list of order external services.
648
     *
649
     * @param int $orderId The orders id
650
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
651
     *
652
     * @return null|\Starweb\Api\Generated\Model\OrderExternalServiceModelCollection|\Psr\Http\Message\ResponseInterface
653
     */
654
    public function getOrderExternalServices(int $orderId, string $fetch = self::FETCH_OBJECT)
655
    {
656
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderExternalServices($orderId), $fetch);
657
    }
658
    /**
659
    * Create an order external service. Retrieves the created `OrderExternalService`
660
                                       object
661
    *
662
    * @param int $orderId The orders id
663
    * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody 
664
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
665
    * @throws \Starweb\Api\Generated\Exception\CreateOrderExternalServiceBadRequestException
666
    *
667
    * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface
668
    */
669
    public function createOrderExternalService(int $orderId, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody, string $fetch = self::FETCH_OBJECT)
670
    {
671
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderExternalService($orderId, $requestBody), $fetch);
672
    }
673
    /**
674
     * Deletes an order external service permanently
675
     *
676
     * @param int $orderId The orders id
677
     * @param string $serviceName The service name
678
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
679
     * @throws \Starweb\Api\Generated\Exception\DeleteOrderExternalServiceNotFoundException
680
     *
681
     * @return null|\Psr\Http\Message\ResponseInterface
682
     */
683
    public function deleteOrderExternalService(int $orderId, string $serviceName, string $fetch = self::FETCH_OBJECT)
684
    {
685
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderExternalService($orderId, $serviceName), $fetch);
686
    }
687
    /**
688
     * Retrieves the `OrderExternalService` object
689
     *
690
     * @param int $orderId The orders id
691
     * @param string $serviceName The service name
692
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
693
     * @throws \Starweb\Api\Generated\Exception\GetOrderExternalServiceNotFoundException
694
     *
695
     * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface
696
     */
697
    public function getOrderExternalService(int $orderId, string $serviceName, string $fetch = self::FETCH_OBJECT)
698
    {
699
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderExternalService($orderId, $serviceName), $fetch);
700
    }
701
    /**
702
    * Updates an order external service. 
703
                       Retrieves the updated `OrderExternalService` object
704
    *
705
    * @param int $orderId The orders id
706
    * @param string $serviceName The service name
707
    * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody 
708
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
709
    * @throws \Starweb\Api\Generated\Exception\PatchOrderExternalServiceBadRequestException
710
    * @throws \Starweb\Api\Generated\Exception\PatchOrderExternalServiceNotFoundException
711
    *
712
    * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface
713
    */
714
    public function patchOrderExternalService(int $orderId, string $serviceName, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody, string $fetch = self::FETCH_OBJECT)
715
    {
716
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderExternalService($orderId, $serviceName, $requestBody), $fetch);
717
    }
718
    /**
719
    * Updates an order external service. 
720
                       Retrieves the updated `OrderExternalService` object
721
    *
722
    * @param int $orderId The orders id
723
    * @param string $serviceName The service name
724
    * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody 
725
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
726
    * @throws \Starweb\Api\Generated\Exception\PutOrderExternalServiceBadRequestException
727
    * @throws \Starweb\Api\Generated\Exception\PutOrderExternalServiceNotFoundException
728
    *
729
    * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface
730
    */
731
    public function putOrderExternalService(int $orderId, string $serviceName, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody, string $fetch = self::FETCH_OBJECT)
732
    {
733
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderExternalService($orderId, $serviceName, $requestBody), $fetch);
734
    }
735
    /**
736
     * Returns a list of order items
737
     *
738
     * @param int $orderId The orders id
739
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
740
     *
741
     * @return null|\Starweb\Api\Generated\Model\OrderItemModelCollection|\Psr\Http\Message\ResponseInterface
742
     */
743
    public function getOrderItems(int $orderId, string $fetch = self::FETCH_OBJECT)
744
    {
745
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItems($orderId), $fetch);
746
    }
747
    /**
748
     * Create an order item. Retrieves the create `OrderItem` object
749
     *
750
     * @param int $orderId The orders id
751
     * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody 
752
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
753
     * @throws \Starweb\Api\Generated\Exception\CreateOrderItemBadRequestException
754
     *
755
     * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface
756
     */
757
    public function createOrderItem(int $orderId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody, string $fetch = self::FETCH_OBJECT)
758
    {
759
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderItem($orderId, $requestBody), $fetch);
760
    }
761
    /**
762
     * Delete the order item permanently.
763
     *
764
     * @param int $orderId The orders id
765
     * @param int $orderItemId The order item id
766
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
767
     * @throws \Starweb\Api\Generated\Exception\DeleteOrderItemNotFoundException
768
     *
769
     * @return null|\Psr\Http\Message\ResponseInterface
770
     */
771
    public function deleteOrderItem(int $orderId, int $orderItemId, string $fetch = self::FETCH_OBJECT)
772
    {
773
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderItem($orderId, $orderItemId), $fetch);
774
    }
775
    /**
776
     * Retrieves the `OrderItem` object
777
     *
778
     * @param int $orderId The orders id
779
     * @param int $orderItemId The order item id
780
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
781
     * @throws \Starweb\Api\Generated\Exception\GetOrderItemNotFoundException
782
     *
783
     * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface
784
     */
785
    public function getOrderItem(int $orderId, int $orderItemId, string $fetch = self::FETCH_OBJECT)
786
    {
787
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItem($orderId, $orderItemId), $fetch);
788
    }
789
    /**
790
     * Updates an order item. Retrieves the updated `OrderItem` object
791
     *
792
     * @param int $orderId The orders id
793
     * @param int $orderItemId The order item id
794
     * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody 
795
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
796
     * @throws \Starweb\Api\Generated\Exception\PatchOrderItemBadRequestException
797
     * @throws \Starweb\Api\Generated\Exception\PatchOrderItemNotFoundException
798
     *
799
     * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface
800
     */
801
    public function patchOrderItem(int $orderId, int $orderItemId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody, string $fetch = self::FETCH_OBJECT)
802
    {
803
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderItem($orderId, $orderItemId, $requestBody), $fetch);
804
    }
805
    /**
806
     * Updates an order item. Retrieves the updated `OrderItem` object
807
     *
808
     * @param int $orderId The orders id
809
     * @param int $orderItemId The order item id
810
     * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody 
811
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
812
     * @throws \Starweb\Api\Generated\Exception\PutOrderItemBadRequestException
813
     * @throws \Starweb\Api\Generated\Exception\PutOrderItemNotFoundException
814
     *
815
     * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface
816
     */
817
    public function putOrderItem(int $orderId, int $orderItemId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody, string $fetch = self::FETCH_OBJECT)
818
    {
819
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderItem($orderId, $orderItemId, $requestBody), $fetch);
820
    }
821
    /**
822
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
823
     *
824
     * @return null|\Starweb\Api\Generated\Model\OrderStatusModelCollection|\Psr\Http\Message\ResponseInterface
825
     */
826
    public function getOrderStatuses(string $fetch = self::FETCH_OBJECT)
827
    {
828
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderStatuses(), $fetch);
829
    }
830
    /**
831
     * Create an order status. Retrieves the created `OrderStatus` object
832
     *
833
     * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody 
834
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
835
     * @throws \Starweb\Api\Generated\Exception\CreateOrderStatusBadRequestException
836
     *
837
     * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface
838
     */
839
    public function createOrderStatus(\Starweb\Api\Generated\Model\OrderStatusModel $requestBody, string $fetch = self::FETCH_OBJECT)
840
    {
841
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderStatus($requestBody), $fetch);
842
    }
843
    /**
844
    * Deletes an order status. Retrieves the updated `OrderItem` object. 
845
                       NB! You are not allowed to delete order statuses that is in use by an order, or standard order statuses (all statuses with an idCode set)
846
    *
847
    * @param int $orderStatusId The order status id
848
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
849
    * @throws \Starweb\Api\Generated\Exception\DeleteOrderStatusForbiddenException
850
    * @throws \Starweb\Api\Generated\Exception\DeleteOrderStatusNotFoundException
851
    *
852
    * @return null|\Psr\Http\Message\ResponseInterface
853
    */
854
    public function deleteOrderStatus(int $orderStatusId, string $fetch = self::FETCH_OBJECT)
855
    {
856
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderStatus($orderStatusId), $fetch);
857
    }
858
    /**
859
     * Retrieves the `OrderStatus` object
860
     *
861
     * @param int $orderStatusId The order status id
862
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
863
     * @throws \Starweb\Api\Generated\Exception\GetOrderStatusNotFoundException
864
     *
865
     * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface
866
     */
867
    public function getOrderStatus(int $orderStatusId, string $fetch = self::FETCH_OBJECT)
868
    {
869
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderStatus($orderStatusId), $fetch);
870
    }
871
    /**
872
    * Updates an order status. Retrieves the updated `Orderstatus` object. 
873
                       NB! You are not allowed to update standard order statuses (all statuses with an idCode set)
874
    *
875
    * @param int $orderStatusId The order status id
876
    * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody 
877
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
878
    * @throws \Starweb\Api\Generated\Exception\PatchOrderStatusBadRequestException
879
    * @throws \Starweb\Api\Generated\Exception\PatchOrderStatusForbiddenException
880
    * @throws \Starweb\Api\Generated\Exception\PatchOrderStatusNotFoundException
881
    *
882
    * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface
883
    */
884
    public function patchOrderStatus(int $orderStatusId, \Starweb\Api\Generated\Model\OrderStatusModel $requestBody, string $fetch = self::FETCH_OBJECT)
885
    {
886
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderStatus($orderStatusId, $requestBody), $fetch);
887
    }
888
    /**
889
    * Updates an order status. Retrieves the updated `Orderstatus` object. 
890
                   NB! You are not allowed to update standard order statuses (all statuses with an idCode set)
891
    *
892
    * @param int $orderStatusId The order status id
893
    * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody 
894
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
895
    * @throws \Starweb\Api\Generated\Exception\PutOrderStatusBadRequestException
896
    * @throws \Starweb\Api\Generated\Exception\PutOrderStatusForbiddenException
897
    * @throws \Starweb\Api\Generated\Exception\PutOrderStatusNotFoundException
898
    *
899
    * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface
900
    */
901
    public function putOrderStatus(int $orderStatusId, \Starweb\Api\Generated\Model\OrderStatusModel $requestBody, string $fetch = self::FETCH_OBJECT)
902
    {
903
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderStatus($orderStatusId, $requestBody), $fetch);
904
    }
905
    /**
906
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
907
     *
908
     * @return null|\Starweb\Api\Generated\Model\PaymentMethodModelCollection|\Psr\Http\Message\ResponseInterface
909
     */
910
    public function getPaymentMethods(string $fetch = self::FETCH_OBJECT)
911
    {
912
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPaymentMethods(), $fetch);
913
    }
914
    /**
915
     * Retrieves a `PaymentMethod` object
916
     *
917
     * @param int $paymentMethodId The payment method id
918
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
919
     * @throws \Starweb\Api\Generated\Exception\GetPaymentMethodNotFoundException
920
     *
921
     * @return null|\Starweb\Api\Generated\Model\PaymentMethodModelItem|\Psr\Http\Message\ResponseInterface
922
     */
923
    public function getPaymentMethod(int $paymentMethodId, string $fetch = self::FETCH_OBJECT)
924
    {
925
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPaymentMethod($paymentMethodId), $fetch);
926
    }
927
    /**
928
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
929
     *
930
     * @return null|\Starweb\Api\Generated\Model\PricelistModelCollection|\Psr\Http\Message\ResponseInterface
931
     */
932
    public function getPricelists(string $fetch = self::FETCH_OBJECT)
933
    {
934
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPricelists(), $fetch);
935
    }
936
    /**
937
     * Create a pricelist. Retrieves the created `Pricelist` object
938
     *
939
     * @param mixed $requestBody 
940
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
941
     * @throws \Starweb\Api\Generated\Exception\CreatePricelistBadRequestException
942
     *
943
     * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface
944
     */
945
    public function createPricelist(mixed $requestBody, string $fetch = self::FETCH_OBJECT)
0 ignored issues
show
Bug introduced by
The type Starweb\Api\Generated\mixed was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
946
    {
947
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreatePricelist($requestBody), $fetch);
948
    }
949
    /**
950
     * Delete a pricelist permanently. The master pricelist can not be deleted and will return an error `403`
951
     *
952
     * @param int $pricelistId The pricelist id
953
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
954
     * @throws \Starweb\Api\Generated\Exception\DeletePricelistNotFoundException
955
     * @throws \Starweb\Api\Generated\Exception\DeletePricelistForbiddenException
956
     *
957
     * @return null|\Psr\Http\Message\ResponseInterface
958
     */
959
    public function deletePricelist(int $pricelistId, string $fetch = self::FETCH_OBJECT)
960
    {
961
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeletePricelist($pricelistId), $fetch);
962
    }
963
    /**
964
     * Retrieves a `Pricelist` object
965
     *
966
     * @param int $pricelistId The pricelist id
967
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
968
     * @throws \Starweb\Api\Generated\Exception\GetPricelistNotFoundException
969
     *
970
     * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface
971
     */
972
    public function getPricelist(int $pricelistId, string $fetch = self::FETCH_OBJECT)
973
    {
974
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPricelist($pricelistId), $fetch);
975
    }
976
    /**
977
     * Update a pricelist. Retrieves the updated `Pricelist` object
978
     *
979
     * @param int $pricelistId The pricelist id
980
     * @param mixed $requestBody 
981
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
982
     * @throws \Starweb\Api\Generated\Exception\PatchPricelistBadRequestException
983
     * @throws \Starweb\Api\Generated\Exception\PatchPricelistNotFoundException
984
     *
985
     * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface
986
     */
987
    public function patchPricelist(int $pricelistId, mixed $requestBody, string $fetch = self::FETCH_OBJECT)
988
    {
989
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchPricelist($pricelistId, $requestBody), $fetch);
990
    }
991
    /**
992
     * Update a pricelist. Retrieves the updated `Pricelist` object
993
     *
994
     * @param int $pricelistId The pricelist id
995
     * @param mixed $requestBody 
996
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
997
     * @throws \Starweb\Api\Generated\Exception\PutPricelistBadRequestException
998
     * @throws \Starweb\Api\Generated\Exception\PutPricelistNotFoundException
999
     *
1000
     * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface
1001
     */
1002
    public function putPricelist(int $pricelistId, mixed $requestBody, string $fetch = self::FETCH_OBJECT)
1003
    {
1004
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutPricelist($pricelistId, $requestBody), $fetch);
1005
    }
1006
    /**
1007
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1008
     * @throws \Starweb\Api\Generated\Exception\ListVatRatesBadRequestException
1009
     *
1010
     * @return null|\Starweb\Api\Generated\Model\VatRateModelCollection|\Psr\Http\Message\ResponseInterface
1011
     */
1012
    public function listVatRates(string $fetch = self::FETCH_OBJECT)
1013
    {
1014
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListVatRates(), $fetch);
1015
    }
1016
    /**
1017
     * Retrieves the `VatRate` object.
1018
     *
1019
     * @param string $countryCode The country code for the vat rates to fetch
1020
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1021
     * @throws \Starweb\Api\Generated\Exception\GetVatRateNotFoundException
1022
     *
1023
     * @return null|\Starweb\Api\Generated\Model\VatRateModelItem|\Psr\Http\Message\ResponseInterface
1024
     */
1025
    public function getVatRate(string $countryCode, string $fetch = self::FETCH_OBJECT)
1026
    {
1027
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetVatRate($countryCode), $fetch);
1028
    }
1029
    /**
1030
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1031
     * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsAttributesBadRequestException
1032
     *
1033
     * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection|\Psr\Http\Message\ResponseInterface
1034
     */
1035
    public function listProductsVariantsAttributes(string $fetch = self::FETCH_OBJECT)
1036
    {
1037
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsAttributes(), $fetch);
1038
    }
1039
    /**
1040
    * Creates a product variant attribute. 
1041
                       Retrieves the created `ProductVariantAttribute` object.
1042
    *
1043
    * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody 
1044
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1045
    * @throws \Starweb\Api\Generated\Exception\CreateAttributeBadRequestException
1046
    *
1047
    * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface
1048
    */
1049
    public function createAttribute(\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1050
    {
1051
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateAttribute($requestBody), $fetch);
1052
    }
1053
    /**
1054
     * Deletes the product variant attribute permanently.
1055
     *
1056
     * @param int $attributeId The attribute value id
1057
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1058
     * @throws \Starweb\Api\Generated\Exception\DeleteAttributeNotFoundException
1059
     *
1060
     * @return null|\Psr\Http\Message\ResponseInterface
1061
     */
1062
    public function deleteAttribute(int $attributeId, string $fetch = self::FETCH_OBJECT)
1063
    {
1064
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteAttribute($attributeId), $fetch);
1065
    }
1066
    /**
1067
     * Retrieves the `ProductVariantAttribute` object.
1068
     *
1069
     * @param int $attributeId The attribute value id
1070
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1071
     * @throws \Starweb\Api\Generated\Exception\GetProductsVariantsAttributeNotFoundException
1072
     *
1073
     * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface
1074
     */
1075
    public function getProductsVariantsAttribute(int $attributeId, string $fetch = self::FETCH_OBJECT)
1076
    {
1077
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsAttribute($attributeId), $fetch);
1078
    }
1079
    /**
1080
    * Updates a product variant attribute.
1081
                       Retrieves the updated `ProductVariantAttribute` object.
1082
    *
1083
    * @param int $attributeId The attribute value id
1084
    * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody 
1085
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1086
    * @throws \Starweb\Api\Generated\Exception\PatchAttributeBadRequestException
1087
    *
1088
    * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface
1089
    */
1090
    public function patchAttribute(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1091
    {
1092
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchAttribute($attributeId, $requestBody), $fetch);
1093
    }
1094
    /**
1095
    * Updates a product variant attribute.
1096
                       Retrieves the updated `ProductVariantAttribute` object.
1097
    *
1098
    * @param int $attributeId The attribute value id
1099
    * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody 
1100
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1101
    * @throws \Starweb\Api\Generated\Exception\PutAttributeBadRequestException
1102
    *
1103
    * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface
1104
    */
1105
    public function putAttribute(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1106
    {
1107
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutAttribute($attributeId, $requestBody), $fetch);
1108
    }
1109
    /**
1110
     * Returns a list of product variant attribute values.
1111
     *
1112
     * @param int $attributeId The attribute id
1113
     * @param array $queryParameters {
1114
     *     @var string $include If you want to include child data in the result. Example: ?include=attribute (to include the attribute the values belongs to). Available includes: attribute
1115
     * }
1116
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1117
     * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsAttributeValuesBadRequestException
1118
     *
1119
     * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface
1120
     */
1121
    public function listProductsVariantsAttributeValues(int $attributeId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1122
    {
1123
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsAttributeValues($attributeId, $queryParameters), $fetch);
1124
    }
1125
    /**
1126
    * Creates a product variant attribute value.
1127
                       Retrieves the created `ProductVariantAttributeValue` object.
1128
    *
1129
    * @param int $attributeId The attribute id
1130
    * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody 
1131
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1132
    * @throws \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException
1133
    *
1134
    * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface
1135
    */
1136
    public function createProductsVariantsAttributeValues(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1137
    {
1138
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsVariantsAttributeValues($attributeId, $requestBody), $fetch);
1139
    }
1140
    /**
1141
     * Delete a product variant attribute value permanently.
1142
     *
1143
     * @param int $attributeId The attribute id
1144
     * @param int $attributeValueId The attribe value id
1145
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1146
     * @throws \Starweb\Api\Generated\Exception\DeleteAttributeValueNotFoundException
1147
     *
1148
     * @return null|\Psr\Http\Message\ResponseInterface
1149
     */
1150
    public function deleteAttributeValue(int $attributeId, int $attributeValueId, string $fetch = self::FETCH_OBJECT)
1151
    {
1152
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteAttributeValue($attributeId, $attributeValueId), $fetch);
1153
    }
1154
    /**
1155
     * Retrieves the `ProductVariantAttributeValue` object.
1156
     *
1157
     * @param int $attributeId The attribute id
1158
     * @param int $attributeValueId The attribe value id
1159
     * @param array $queryParameters {
1160
     *     @var string $include If you want to include child data in the result. Example: ?include=attribute (to include the attribute the values belongs to). Available includes: attribute
1161
     * }
1162
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1163
     * @throws \Starweb\Api\Generated\Exception\GetProductsVariantsAttributeValueNotFoundException
1164
     *
1165
     * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface
1166
     */
1167
    public function getProductsVariantsAttributeValue(int $attributeId, int $attributeValueId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1168
    {
1169
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsAttributeValue($attributeId, $attributeValueId, $queryParameters), $fetch);
1170
    }
1171
    /**
1172
    * Updates a product variant attribute value.
1173
                       Retrieves the updated`ProductVariantAttributeValue` object.
1174
    *
1175
    * @param int $attributeId The attribute id
1176
    * @param int $attributeValueId The attribe value id
1177
    * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody 
1178
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1179
    * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException
1180
    *
1181
    * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface
1182
    */
1183
    public function patchProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1184
    {
1185
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsAttributeValues($attributeId, $attributeValueId, $requestBody), $fetch);
1186
    }
1187
    /**
1188
    * Updates a product variant attribute value.
1189
                       Retrieves the updated`ProductVariantAttributeValue` object.
1190
    *
1191
    * @param int $attributeId The attribute id
1192
    * @param int $attributeValueId The attribe value id
1193
    * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody 
1194
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1195
    * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException
1196
    *
1197
    * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface
1198
    */
1199
    public function putProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1200
    {
1201
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsAttributeValues($attributeId, $attributeValueId, $requestBody), $fetch);
1202
    }
1203
    /**
1204
     * Returns a list of product categories
1205
     *
1206
     * @param array $queryParameters {
1207
     *     @var int $page The page of categories to return
1208
     *     @var string $externalId Use to fetch categories with a specific external id
1209
     *     @var int $parent Use to fetch only categories with this parentId
1210
     *     @var bool $filterVisible Only fetch categories visible to visitors
1211
     *     @var string $include If you want to include child data in the result. Example: ?include=languages (to include language based data such as category names, description, etc). Available includes: languages
1212
     * }
1213
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1214
     * @throws \Starweb\Api\Generated\Exception\ListProductCategoriesBadRequestException
1215
     *
1216
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelCollection|\Psr\Http\Message\ResponseInterface
1217
     */
1218
    public function listProductCategories(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1219
    {
1220
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductCategories($queryParameters), $fetch);
1221
    }
1222
    /**
1223
     * Create a product category. Retrieves the created `ProductCategory` object
1224
     *
1225
     * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody 
1226
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1227
     * @throws \Starweb\Api\Generated\Exception\CreateProductCategoryBadRequestException
1228
     *
1229
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface
1230
     */
1231
    public function createProductCategory(\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1232
    {
1233
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductCategory($requestBody), $fetch);
1234
    }
1235
    /**
1236
     * Delete a product category permanently
1237
     *
1238
     * @param int $categoryId The product category id
1239
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1240
     * @throws \Starweb\Api\Generated\Exception\DeleteProductCategoryNotFoundException
1241
     *
1242
     * @return null|\Psr\Http\Message\ResponseInterface
1243
     */
1244
    public function deleteProductCategory(int $categoryId, string $fetch = self::FETCH_OBJECT)
1245
    {
1246
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductCategory($categoryId), $fetch);
1247
    }
1248
    /**
1249
     * Retrieves a `ProductCategory` object
1250
     *
1251
     * @param int $categoryId The product category id
1252
     * @param array $queryParameters {
1253
     *     @var string $include If you want to include child data in the result. Example: ?include=languages (to include language based data such as category names, description, etc). Available includes: languages
1254
     * }
1255
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1256
     * @throws \Starweb\Api\Generated\Exception\GetProductCategoryNotFoundException
1257
     *
1258
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface
1259
     */
1260
    public function getProductCategory(int $categoryId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1261
    {
1262
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductCategory($categoryId, $queryParameters), $fetch);
1263
    }
1264
    /**
1265
     * Update a product category. Retrieves the updated `ProductCategory` object
1266
     *
1267
     * @param int $categoryId The product category id
1268
     * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody 
1269
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1270
     * @throws \Starweb\Api\Generated\Exception\PatchProductCategoryBadRequestException
1271
     * @throws \Starweb\Api\Generated\Exception\PatchProductCategoryNotFoundException
1272
     *
1273
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface
1274
     */
1275
    public function patchProductCategory(int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1276
    {
1277
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductCategory($categoryId, $requestBody), $fetch);
1278
    }
1279
    /**
1280
     * Update a product category. Retrieves the updated `ProductCategory` object
1281
     *
1282
     * @param int $categoryId The product category id
1283
     * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody 
1284
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1285
     * @throws \Starweb\Api\Generated\Exception\PutProductCategoryBadRequestException
1286
     * @throws \Starweb\Api\Generated\Exception\PutProductCategoryNotFoundException
1287
     *
1288
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface
1289
     */
1290
    public function putProductCategory(int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1291
    {
1292
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductCategory($categoryId, $requestBody), $fetch);
1293
    }
1294
    /**
1295
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1296
     * @throws \Starweb\Api\Generated\Exception\ListProductManufacturersBadRequestException
1297
     *
1298
     * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelCollection|\Psr\Http\Message\ResponseInterface
1299
     */
1300
    public function listProductManufacturers(string $fetch = self::FETCH_OBJECT)
1301
    {
1302
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductManufacturers(), $fetch);
1303
    }
1304
    /**
1305
     * Creates a product manufacturer.
1306
     *
1307
     * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody 
1308
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1309
     * @throws \Starweb\Api\Generated\Exception\CreateProductManufacturersBadRequestException
1310
     *
1311
     * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelCollection|\Psr\Http\Message\ResponseInterface
1312
     */
1313
    public function createProductManufacturers(\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT)
1314
    {
1315
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturers($requestBody), $fetch);
1316
    }
1317
    /**
1318
     * Deletes the `ProductManufacturer` object.
1319
     *
1320
     * @param int $manufacturerId The manufacturers id
1321
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1322
     * @throws \Starweb\Api\Generated\Exception\DeleteProductManufacturerNotFoundException
1323
     *
1324
     * @return null|\Psr\Http\Message\ResponseInterface
1325
     */
1326
    public function deleteProductManufacturer(int $manufacturerId, string $fetch = self::FETCH_OBJECT)
1327
    {
1328
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductManufacturer($manufacturerId), $fetch);
1329
    }
1330
    /**
1331
     * Retrieves the `ProductManufacturer` object.
1332
     *
1333
     * @param int $manufacturerId The manufacturers id
1334
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1335
     * @throws \Starweb\Api\Generated\Exception\GetProductManufacturerNotFoundException
1336
     *
1337
     * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface
1338
     */
1339
    public function getProductManufacturer(int $manufacturerId, string $fetch = self::FETCH_OBJECT)
1340
    {
1341
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductManufacturer($manufacturerId), $fetch);
1342
    }
1343
    /**
1344
     * Updates the `ProductManufacturer` object.
1345
     *
1346
     * @param int $manufacturerId The manufacturers id
1347
     * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody 
1348
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1349
     * @throws \Starweb\Api\Generated\Exception\PatchProductManufacturerNotFoundException
1350
     *
1351
     * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface
1352
     */
1353
    public function patchProductManufacturer(int $manufacturerId, \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT)
1354
    {
1355
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductManufacturer($manufacturerId, $requestBody), $fetch);
1356
    }
1357
    /**
1358
     * Updates the `ProductManufacturer` object.
1359
     *
1360
     * @param int $manufacturerId The manufacturers id
1361
     * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody 
1362
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1363
     * @throws \Starweb\Api\Generated\Exception\PutProductManufacturerNotFoundException
1364
     *
1365
     * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface
1366
     */
1367
    public function putProductManufacturer(int $manufacturerId, \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT)
1368
    {
1369
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductManufacturer($manufacturerId, $requestBody), $fetch);
1370
    }
1371
    /**
1372
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1373
     * @throws \Starweb\Api\Generated\Exception\ListProductUnitsBadRequestException
1374
     *
1375
     * @return null|\Starweb\Api\Generated\Model\ProductUnitModelCollection|\Psr\Http\Message\ResponseInterface
1376
     */
1377
    public function listProductUnits(string $fetch = self::FETCH_OBJECT)
1378
    {
1379
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductUnits(), $fetch);
1380
    }
1381
    /**
1382
     * Retrieves the `ProductUnit` object.
1383
     *
1384
     * @param int $unitId The units id
1385
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1386
     * @throws \Starweb\Api\Generated\Exception\GetProductUnitNotFoundException
1387
     *
1388
     * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface
1389
     */
1390
    public function getProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT)
1391
    {
1392
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductUnit($unitId), $fetch);
1393
    }
1394
    /**
1395
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1396
     * @throws \Starweb\Api\Generated\Exception\ListProductMetaDataTypesBadRequestException
1397
     *
1398
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelCollection|\Psr\Http\Message\ResponseInterface
1399
     */
1400
    public function listProductMetaDataTypes(string $fetch = self::FETCH_OBJECT)
1401
    {
1402
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductMetaDataTypes(), $fetch);
1403
    }
1404
    /**
1405
     * Create a product meta data type. Retrieves the created `ProductMetaDataType` object
1406
     *
1407
     * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody 
1408
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1409
     * @throws \Starweb\Api\Generated\Exception\CreateProductMetaDataTypeBadRequestException
1410
     *
1411
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface
1412
     */
1413
    public function createProductMetaDataType(\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1414
    {
1415
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductMetaDataType($requestBody), $fetch);
1416
    }
1417
    /**
1418
     * Delete a product meta data type permanently
1419
     *
1420
     * @param int $metaDataTypeId The meta data types id
1421
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1422
     * @throws \Starweb\Api\Generated\Exception\DeleteProductMetaDataTypeNotFoundException
1423
     *
1424
     * @return null|\Psr\Http\Message\ResponseInterface
1425
     */
1426
    public function deleteProductMetaDataType(int $metaDataTypeId, string $fetch = self::FETCH_OBJECT)
1427
    {
1428
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductMetaDataType($metaDataTypeId), $fetch);
1429
    }
1430
    /**
1431
     * Retrieves the `ProductMetaDataType` object.
1432
     *
1433
     * @param int $metaDataTypeId The meta data types id
1434
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1435
     * @throws \Starweb\Api\Generated\Exception\GetProductMetaDataTypeNotFoundException
1436
     *
1437
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface
1438
     */
1439
    public function getProductMetaDataType(int $metaDataTypeId, string $fetch = self::FETCH_OBJECT)
1440
    {
1441
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductMetaDataType($metaDataTypeId), $fetch);
1442
    }
1443
    /**
1444
     * Update a product meta data type. Retrieves the updated `ProductMetaDataType` object
1445
     *
1446
     * @param int $metaDataTypeId The meta data types id
1447
     * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody 
1448
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1449
     * @throws \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeBadRequestException
1450
     * @throws \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeNotFoundException
1451
     *
1452
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface
1453
     */
1454
    public function patchProductMetaDataType(int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1455
    {
1456
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductMetaDataType($metaDataTypeId, $requestBody), $fetch);
1457
    }
1458
    /**
1459
     * Update a product meta data type. Retrieves the updated `ProductMetaDataType` object
1460
     *
1461
     * @param int $metaDataTypeId The meta data types id
1462
     * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody 
1463
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1464
     * @throws \Starweb\Api\Generated\Exception\PutProductMetaDataTypeBadRequestException
1465
     * @throws \Starweb\Api\Generated\Exception\PutProductMetaDataTypeNotFoundException
1466
     *
1467
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface
1468
     */
1469
    public function putProductMetaDataType(int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1470
    {
1471
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductMetaDataType($metaDataTypeId, $requestBody), $fetch);
1472
    }
1473
    /**
1474
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1475
     * @throws \Starweb\Api\Generated\Exception\ListProductStockStatsesBadRequestException
1476
     *
1477
     * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelCollection|\Psr\Http\Message\ResponseInterface
1478
     */
1479
    public function listProductStockStatses(string $fetch = self::FETCH_OBJECT)
1480
    {
1481
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductStockStatses(), $fetch);
1482
    }
1483
    /**
1484
     * Create a product stock status. Retrieves the created `ProductStockStatus` object.
1485
     *
1486
     * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody 
1487
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1488
     * @throws \Starweb\Api\Generated\Exception\CreateProductStockStatusBadRequestException
1489
     *
1490
     * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface
1491
     */
1492
    public function createProductStockStatus(\Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody, string $fetch = self::FETCH_OBJECT)
1493
    {
1494
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductStockStatus($requestBody), $fetch);
1495
    }
1496
    /**
1497
     * Deletes a product stock status permanently.
1498
     *
1499
     * @param int $stockStatusId The stock status id
1500
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1501
     * @throws \Starweb\Api\Generated\Exception\DeleteProductStockStatusNotFoundException
1502
     *
1503
     * @return null|\Psr\Http\Message\ResponseInterface
1504
     */
1505
    public function deleteProductStockStatus(int $stockStatusId, string $fetch = self::FETCH_OBJECT)
1506
    {
1507
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductStockStatus($stockStatusId), $fetch);
1508
    }
1509
    /**
1510
     * Retrieves the `ProductStockStatus` object.
1511
     *
1512
     * @param int $stockStatusId The stock status id
1513
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1514
     * @throws \Starweb\Api\Generated\Exception\GetProductStockStatusNotFoundException
1515
     *
1516
     * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface
1517
     */
1518
    public function getProductStockStatus(int $stockStatusId, string $fetch = self::FETCH_OBJECT)
1519
    {
1520
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductStockStatus($stockStatusId), $fetch);
1521
    }
1522
    /**
1523
     * Updates a product stock status. Retrieves the update `ProductStockStatus` object.
1524
     *
1525
     * @param int $stockStatusId The stock status id
1526
     * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody 
1527
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1528
     * @throws \Starweb\Api\Generated\Exception\PatchProductStockStatusBadRequestException
1529
     * @throws \Starweb\Api\Generated\Exception\PatchProductStockStatusNotFoundException
1530
     *
1531
     * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface
1532
     */
1533
    public function patchProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody, string $fetch = self::FETCH_OBJECT)
1534
    {
1535
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductStockStatus($stockStatusId, $requestBody), $fetch);
1536
    }
1537
    /**
1538
     * Updates a product stock status. Retrieves the update `ProductStockStatus` object.
1539
     *
1540
     * @param int $stockStatusId The stock status id
1541
     * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody 
1542
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1543
     * @throws \Starweb\Api\Generated\Exception\PutProductStockStatusBadRequestException
1544
     * @throws \Starweb\Api\Generated\Exception\PutProductStockStatusNotFoundException
1545
     *
1546
     * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface
1547
     */
1548
    public function putProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody, string $fetch = self::FETCH_OBJECT)
1549
    {
1550
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductStockStatus($stockStatusId, $requestBody), $fetch);
1551
    }
1552
    /**
1553
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1554
     *
1555
     * @return null|\Starweb\Api\Generated\Model\ProductTagModelCollection|\Psr\Http\Message\ResponseInterface
1556
     */
1557
    public function getProductsTags(string $fetch = self::FETCH_OBJECT)
1558
    {
1559
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTags(), $fetch);
1560
    }
1561
    /**
1562
     * Creates a `ProductTag` object
1563
     *
1564
     * @param \Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody 
1565
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1566
     * @throws \Starweb\Api\Generated\Exception\CreateProductTagBadRequestException
1567
     *
1568
     * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface
1569
     */
1570
    public function createProductTag(\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
1571
    {
1572
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTag($requestBody), $fetch);
1573
    }
1574
    /**
1575
     * Delete a product tag permanently
1576
     *
1577
     * @param int $productTagId The product tag id
1578
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1579
     * @throws \Starweb\Api\Generated\Exception\DeleteProductTagNotFoundException
1580
     *
1581
     * @return null|\Psr\Http\Message\ResponseInterface
1582
     */
1583
    public function deleteProductTag(int $productTagId, string $fetch = self::FETCH_OBJECT)
1584
    {
1585
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTag($productTagId), $fetch);
1586
    }
1587
    /**
1588
     * Retrieves a `Tag` object
1589
     *
1590
     * @param int $productTagId The product tag id
1591
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1592
     * @throws \Starweb\Api\Generated\Exception\GetProductsTagNotFoundException
1593
     *
1594
     * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface
1595
     */
1596
    public function getProductsTag(int $productTagId, string $fetch = self::FETCH_OBJECT)
1597
    {
1598
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTag($productTagId), $fetch);
1599
    }
1600
    /**
1601
     * Partially updates a product tag. Retrieves the updated `ProductTag` object
1602
     *
1603
     * @param int $productTagId The product tag id
1604
     * @param \Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody 
1605
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1606
     * @throws \Starweb\Api\Generated\Exception\PatchProductTagBadRequestException
1607
     * @throws \Starweb\Api\Generated\Exception\PatchProductTagNotFoundException
1608
     *
1609
     * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface
1610
     */
1611
    public function patchProductTag(int $productTagId, \Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
1612
    {
1613
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductTag($productTagId, $requestBody), $fetch);
1614
    }
1615
    /**
1616
     * Update a product tag. Retrieves the updated `ProductTag` object
1617
     *
1618
     * @param int $productTagId The product tag id
1619
     * @param \Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody 
1620
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1621
     * @throws \Starweb\Api\Generated\Exception\PutProductTagBadRequestException
1622
     * @throws \Starweb\Api\Generated\Exception\PutProductTagNotFoundException
1623
     *
1624
     * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface
1625
     */
1626
    public function putProductTag(int $productTagId, \Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
1627
    {
1628
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductTag($productTagId, $requestBody), $fetch);
1629
    }
1630
    /**
1631
     * Returns a list of options
1632
     *
1633
     * @param int $productTagId The product tag id
1634
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1635
     *
1636
     * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelCollection|\Psr\Http\Message\ResponseInterface
1637
     */
1638
    public function getProductsTagOptions(int $productTagId, string $fetch = self::FETCH_OBJECT)
1639
    {
1640
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTagOptions($productTagId), $fetch);
1641
    }
1642
    /**
1643
     * Create a tag option. Tag options can only be created for tags of type `option`. If you try to create options for a tag of type `boolean` an error `405` will be returned. Returns the created `ProductTagOption` object.
1644
     *
1645
     * @param int $productTagId The product tag id
1646
     * @param \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody 
1647
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1648
     * @throws \Starweb\Api\Generated\Exception\CreateProductTagOptionBadRequestException
1649
     * @throws \Starweb\Api\Generated\Exception\CreateProductTagOptionMethodNotAllowedException
1650
     *
1651
     * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface
1652
     */
1653
    public function createProductTagOption(int $productTagId, \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
1654
    {
1655
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTagOption($productTagId, $requestBody), $fetch);
1656
    }
1657
    /**
1658
     * Delete a tag option permanently. Tag options can only be deleted for tags of type `option`. If you try to delete a tag option for a tag of any other type an error `405` will be returned.
1659
     *
1660
     * @param int $productTagId The product tag id
1661
     * @param int $productTagOptionId The product tag option id
1662
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1663
     * @throws \Starweb\Api\Generated\Exception\DeleteProductTagOptionNotFoundException
1664
     * @throws \Starweb\Api\Generated\Exception\DeleteProductTagOptionMethodNotAllowedException
1665
     *
1666
     * @return null|\Psr\Http\Message\ResponseInterface
1667
     */
1668
    public function deleteProductTagOption(int $productTagId, int $productTagOptionId, string $fetch = self::FETCH_OBJECT)
1669
    {
1670
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTagOption($productTagId, $productTagOptionId), $fetch);
1671
    }
1672
    /**
1673
     * Retrieves a `TagOption` object
1674
     *
1675
     * @param int $productTagId The product tag id
1676
     * @param int $productTagOptionId The product tag option id
1677
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1678
     * @throws \Starweb\Api\Generated\Exception\GetProductTagOptionsNotFoundException
1679
     *
1680
     * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface
1681
     */
1682
    public function getProductTagOptions(int $productTagId, int $productTagOptionId, string $fetch = self::FETCH_OBJECT)
1683
    {
1684
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductTagOptions($productTagId, $productTagOptionId), $fetch);
1685
    }
1686
    /**
1687
     * Partially updates a tag option. Tag options can only be updates for tags of type `option`. If you try to update a tag option for a tag of any other type an error `405` will be returned. Returns the updated `ProductTagOption` object.
1688
     *
1689
     * @param int $productTagId The product tag id
1690
     * @param int $productTagOptionId The product tag option id
1691
     * @param \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody 
1692
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1693
     * @throws \Starweb\Api\Generated\Exception\PatchProductTagOptionBadRequestException
1694
     * @throws \Starweb\Api\Generated\Exception\PatchProductTagOptionNotFoundException
1695
     * @throws \Starweb\Api\Generated\Exception\PatchProductTagOptionMethodNotAllowedException
1696
     *
1697
     * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface
1698
     */
1699
    public function patchProductTagOption(int $productTagId, int $productTagOptionId, \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
1700
    {
1701
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductTagOption($productTagId, $productTagOptionId, $requestBody), $fetch);
1702
    }
1703
    /**
1704
     * Update a tag option. Tag options can only be updated for tags of type `option`. If you try to update a tag option for a tag of any other type an error `405` will be returned. Returns the updated `ProductTagOption` object.
1705
     *
1706
     * @param int $productTagId The product tag id
1707
     * @param int $productTagOptionId The product tag option id
1708
     * @param \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody 
1709
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1710
     * @throws \Starweb\Api\Generated\Exception\PutProductTagOptionBadRequestException
1711
     * @throws \Starweb\Api\Generated\Exception\PutProductTagOptionNotFoundException
1712
     * @throws \Starweb\Api\Generated\Exception\PutProductTagOptionMethodNotAllowedException
1713
     *
1714
     * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface
1715
     */
1716
    public function putProductTagOption(int $productTagId, int $productTagOptionId, \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
1717
    {
1718
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductTagOption($productTagId, $productTagOptionId, $requestBody), $fetch);
1719
    }
1720
    /**
1721
     * Returns a list of products.
1722
     *
1723
     * @param array $queryParameters {
1724
     *     @var int $page The page of products to return
1725
     *     @var string $sortBy Sort the result using a specified field. productId is default. Valid options are: productId
1726
     *     @var string $sortOrder ASC for an ascending sort order; or DESC for a descending sort order. ASC is default
1727
     *     @var string $createdSince Use this to only fetch products that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)
1728
     *     @var string $updatedSince Use this to only fetch products that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)
1729
     *     @var bool $filterVisible Only fetch products visible to visitors. Default is false.
1730
     *     @var string $filterSku Only fetch a product with the specified SKU. Has to follow the pattern of /[A-Za-z0-9._-]+$/
1731
     *     @var string $include If you want to include child data in the result. Example: ?include=primaryVariant (to include primary product variant);?include=primaryVariant,languages (to include both primary product variant and languages). <br /><br />Available includes: `primaryVariant`, `primaryVariant.prices`, `primaryVariant.attributeValues`, `attributes`, `mediaFiles`, `languages`, `vatRates`, `categories`, `unit`, `metaData`, `bundledProducts`, `bundledProducts.prices`, `tags`.<br /><br />NOTE! Only one variant and language is included in the result for performance reason. To fetch all variants, instead use /products/x/variants(unnecessary if hasSeveralVariants is false) and to fetch all languages for an object, instead use the individual objects language endpoint
1732
     * }
1733
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1734
     * @throws \Starweb\Api\Generated\Exception\ListProductsBadRequestException
1735
     *
1736
     * @return null|\Starweb\Api\Generated\Model\ProductModelCollection|\Psr\Http\Message\ResponseInterface
1737
     */
1738
    public function listProducts(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1739
    {
1740
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProducts($queryParameters), $fetch);
1741
    }
1742
    /**
1743
     * Creates a product. Retrieves the created `Product` object.
1744
     *
1745
     * @param \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody 
1746
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1747
     * @throws \Starweb\Api\Generated\Exception\CreateProductBadRequestException
1748
     *
1749
     * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface
1750
     */
1751
    public function createProduct(\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1752
    {
1753
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProduct($requestBody), $fetch);
1754
    }
1755
    /**
1756
     * Deletes a product permanently.
1757
     *
1758
     * @param int $productId The product id
1759
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1760
     * @throws \Starweb\Api\Generated\Exception\DeleteProductNotFoundException
1761
     *
1762
     * @return null|\Psr\Http\Message\ResponseInterface
1763
     */
1764
    public function deleteProduct(int $productId, string $fetch = self::FETCH_OBJECT)
1765
    {
1766
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProduct($productId), $fetch);
1767
    }
1768
    /**
1769
     * Retrieves the `Product` object.
1770
     *
1771
     * @param int $productId The product id
1772
     * @param array $queryParameters {
1773
     *     @var string $include If you want to include child data in the result. Example: ?include=variants (to include product variants); ?include=variants,languages (to include both product variants and languages). Available includes: `primaryVariant`, `primaryVariant.prices`, `mediaFiles`, `languages`, `vatRates`, `categories`, `unit`, `metaData`, `bundledProducts`, `bundledProducts.prices`, `tags`. NOTE! Only one variant is included in result for performance reason. To fetch all variants, instead use /products/x/variants (unnecessary if hasSeveralVariants is false)
1774
     * }
1775
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1776
     * @throws \Starweb\Api\Generated\Exception\GetProductNotFoundException
1777
     *
1778
     * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface
1779
     */
1780
    public function getProduct(int $productId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1781
    {
1782
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProduct($productId, $queryParameters), $fetch);
1783
    }
1784
    /**
1785
     * Updates a product. Retrieves the update `Product` object.
1786
     *
1787
     * @param int $productId The product id
1788
     * @param \Starweb\Api\Generated\Model\ProductModelPatchable $requestBody 
1789
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1790
     * @throws \Starweb\Api\Generated\Exception\PatchProductBadRequestException
1791
     * @throws \Starweb\Api\Generated\Exception\PatchProductNotFoundException
1792
     *
1793
     * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface
1794
     */
1795
    public function patchProduct(int $productId, \Starweb\Api\Generated\Model\ProductModelPatchable $requestBody, string $fetch = self::FETCH_OBJECT)
1796
    {
1797
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProduct($productId, $requestBody), $fetch);
1798
    }
1799
    /**
1800
     * Updates a product. Retrieves the update `Product` object.
1801
     *
1802
     * @param int $productId The product id
1803
     * @param \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody 
1804
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1805
     * @throws \Starweb\Api\Generated\Exception\PutProductBadRequestException
1806
     * @throws \Starweb\Api\Generated\Exception\PutProductNotFoundException
1807
     *
1808
     * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface
1809
     */
1810
    public function putProduct(int $productId, \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
1811
    {
1812
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProduct($productId, $requestBody), $fetch);
1813
    }
1814
    /**
1815
     * Return a list of bundled products.
1816
     *
1817
     * @param int $productId The products id
1818
     * @param array $queryParameters {
1819
     *     @var int $page The page of bundled products to return
1820
     *     @var string $include If you want to include child data in the result. Example: `?include=prices` (to include bundled product prices). Available includes: `prices`, `stocks`.
1821
     * }
1822
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1823
     * @throws \Starweb\Api\Generated\Exception\ListProductsBundledProductsBadRequestException
1824
     *
1825
     * @return null|\Starweb\Api\Generated\Model\BundledProductsModelCollection|\Psr\Http\Message\ResponseInterface
1826
     */
1827
    public function listProductsBundledProducts(int $productId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1828
    {
1829
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsBundledProducts($productId, $queryParameters), $fetch);
1830
    }
1831
    /**
1832
     * Creates a bundled product. Retrieves the created `BundledProduct` object
1833
     *
1834
     * @param int $productId The products id
1835
     * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody 
1836
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1837
     * @throws \Starweb\Api\Generated\Exception\CreateProductBundledProductBadRequestException
1838
     *
1839
     * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface
1840
     */
1841
    public function createProductBundledProduct(int $productId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody, string $fetch = self::FETCH_OBJECT)
1842
    {
1843
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductBundledProduct($productId, $requestBody), $fetch);
1844
    }
1845
    /**
1846
     * Deletes a bundled product permanently.
1847
     *
1848
     * @param int $productId The product id
1849
     * @param int $bundledProductId The bundled products id
1850
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1851
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsBundledProductNotFoundException
1852
     *
1853
     * @return null|\Psr\Http\Message\ResponseInterface
1854
     */
1855
    public function deleteProductsBundledProduct(int $productId, int $bundledProductId, string $fetch = self::FETCH_OBJECT)
1856
    {
1857
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsBundledProduct($productId, $bundledProductId), $fetch);
1858
    }
1859
    /**
1860
     * Retrieves the `BundledProduct` object
1861
     *
1862
     * @param int $productId The product id
1863
     * @param int $bundledProductId The bundled products id
1864
     * @param array $queryParameters {
1865
     *     @var string $include If you want to include child data in the result. Example: ?include=prices (to include bundled product prices). Available includes: prices
1866
     * }
1867
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1868
     * @throws \Starweb\Api\Generated\Exception\GetProductsBundledProductsNotFoundException
1869
     *
1870
     * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface
1871
     */
1872
    public function getProductsBundledProducts(int $productId, int $bundledProductId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1873
    {
1874
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsBundledProducts($productId, $bundledProductId, $queryParameters), $fetch);
1875
    }
1876
    /**
1877
     * Updates a bundled product. Retrieves the updated `BundledProduct` object
1878
     *
1879
     * @param int $productId The product id
1880
     * @param int $bundledProductId The bundled products id
1881
     * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody 
1882
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1883
     * @throws \Starweb\Api\Generated\Exception\PatchProductsBundledProductBadRequestException
1884
     * @throws \Starweb\Api\Generated\Exception\PatchProductsBundledProductNotFoundException
1885
     *
1886
     * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface
1887
     */
1888
    public function patchProductsBundledProduct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody, string $fetch = self::FETCH_OBJECT)
1889
    {
1890
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsBundledProduct($productId, $bundledProductId, $requestBody), $fetch);
1891
    }
1892
    /**
1893
     * Updates a bundled product. Retrieves the updated `BundledProduct` object
1894
     *
1895
     * @param int $productId The product id
1896
     * @param int $bundledProductId The bundled products id
1897
     * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody 
1898
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1899
     * @throws \Starweb\Api\Generated\Exception\PutProductsBundledProductBadRequestException
1900
     * @throws \Starweb\Api\Generated\Exception\PutProductsBundledProductNotFoundException
1901
     *
1902
     * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface
1903
     */
1904
    public function putProductsBundledProduct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody, string $fetch = self::FETCH_OBJECT)
1905
    {
1906
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsBundledProduct($productId, $bundledProductId, $requestBody), $fetch);
1907
    }
1908
    /**
1909
     * Return a list of product variants.
1910
     *
1911
     * @param int $productId The products id
1912
     * @param array $queryParameters {
1913
     *     @var int $page The page of product variants to return
1914
     *     @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues
1915
     * }
1916
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1917
     * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsBadRequestException
1918
     *
1919
     * @return null|\Starweb\Api\Generated\Model\ProductVariantModelCollection|\Psr\Http\Message\ResponseInterface
1920
     */
1921
    public function listProductsVariants(int $productId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1922
    {
1923
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariants($productId, $queryParameters), $fetch);
1924
    }
1925
    /**
1926
     * Creates a product variant. Retrieves the created `ProductVariant` object
1927
     *
1928
     * @param int $productId The products id
1929
     * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody 
1930
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1931
     * @throws \Starweb\Api\Generated\Exception\CreateProductVariantBadRequestException
1932
     *
1933
     * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface
1934
     */
1935
    public function createProductVariant(int $productId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody, string $fetch = self::FETCH_OBJECT)
1936
    {
1937
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariant($productId, $requestBody), $fetch);
1938
    }
1939
    /**
1940
     * Deletes a product variant permanently.
1941
     *
1942
     * @param int $productId The product id
1943
     * @param int $variantId The products variants id
1944
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1945
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsVariantNotFoundException
1946
     *
1947
     * @return null|\Psr\Http\Message\ResponseInterface
1948
     */
1949
    public function deleteProductsVariant(int $productId, int $variantId, string $fetch = self::FETCH_OBJECT)
1950
    {
1951
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariant($productId, $variantId), $fetch);
1952
    }
1953
    /**
1954
     * Retrieves the `ProductVariant` object
1955
     *
1956
     * @param int $productId The product id
1957
     * @param int $variantId The products variants id
1958
     * @param array $queryParameters {
1959
     *     @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices,  attributeValues
1960
     * }
1961
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1962
     * @throws \Starweb\Api\Generated\Exception\GetProductsVariantNotFoundException
1963
     *
1964
     * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface
1965
     */
1966
    public function getProductsVariant(int $productId, int $variantId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
1967
    {
1968
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariant($productId, $variantId, $queryParameters), $fetch);
1969
    }
1970
    /**
1971
     * Updates a product variant. Retrieves the updated `ProductVariant` object
1972
     *
1973
     * @param int $productId The product id
1974
     * @param int $variantId The products variants id
1975
     * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody 
1976
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1977
     * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantBadRequestException
1978
     * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantNotFoundException
1979
     *
1980
     * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface
1981
     */
1982
    public function patchProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody, string $fetch = self::FETCH_OBJECT)
1983
    {
1984
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariant($productId, $variantId, $requestBody), $fetch);
1985
    }
1986
    /**
1987
     * Updates a product variant. Retrieves the updated `ProductVariant` object
1988
     *
1989
     * @param int $productId The product id
1990
     * @param int $variantId The products variants id
1991
     * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody 
1992
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
1993
     * @throws \Starweb\Api\Generated\Exception\PutProductsVariantBadRequestException
1994
     * @throws \Starweb\Api\Generated\Exception\PutProductsVariantNotFoundException
1995
     *
1996
     * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface
1997
     */
1998
    public function putProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody, string $fetch = self::FETCH_OBJECT)
1999
    {
2000
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariant($productId, $variantId, $requestBody), $fetch);
2001
    }
2002
    /**
2003
     * Returns a list of product vat rates.
2004
     *
2005
     * @param int $productId The products id
2006
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2007
     * @throws \Starweb\Api\Generated\Exception\ListProductsVatRatesBadRequestException
2008
     *
2009
     * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelCollection|\Psr\Http\Message\ResponseInterface
2010
     */
2011
    public function listProductsVatRates(int $productId, string $fetch = self::FETCH_OBJECT)
2012
    {
2013
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVatRates($productId), $fetch);
2014
    }
2015
    /**
2016
     * Creates a product vat rate. Retrieves the create `ProductVatRate` object.
2017
     *
2018
     * @param int $productId The products id
2019
     * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody 
2020
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2021
     * @throws \Starweb\Api\Generated\Exception\CreateProductVatRateBadRequestException
2022
     *
2023
     * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface
2024
     */
2025
    public function createProductVatRate(int $productId, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody, string $fetch = self::FETCH_OBJECT)
2026
    {
2027
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVatRate($productId, $requestBody), $fetch);
2028
    }
2029
    /**
2030
     * Deletes the product vat rate permanently.
2031
     *
2032
     * @param int $productId The product id
2033
     * @param string $countryCode The country code for the vat rate to fetch/manipulate
2034
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2035
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsVatRateNotFoundException
2036
     *
2037
     * @return null|\Psr\Http\Message\ResponseInterface
2038
     */
2039
    public function deleteProductsVatRate(int $productId, string $countryCode, string $fetch = self::FETCH_OBJECT)
2040
    {
2041
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVatRate($productId, $countryCode), $fetch);
2042
    }
2043
    /**
2044
     * Retrieves the `ProductVatRate` object.
2045
     *
2046
     * @param int $productId The product id
2047
     * @param string $countryCode The country code for the vat rate to fetch/manipulate
2048
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2049
     * @throws \Starweb\Api\Generated\Exception\GetProductsVatRateNotFoundException
2050
     *
2051
     * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface
2052
     */
2053
    public function getProductsVatRate(int $productId, string $countryCode, string $fetch = self::FETCH_OBJECT)
2054
    {
2055
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVatRate($productId, $countryCode), $fetch);
2056
    }
2057
    /**
2058
     * Updates a product vat rate. Retrieves the update `ProductVatRate` object.
2059
     *
2060
     * @param int $productId The product id
2061
     * @param string $countryCode The country code for the vat rate to fetch/manipulate
2062
     * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody 
2063
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2064
     * @throws \Starweb\Api\Generated\Exception\PatchProductsVatRateBadRequestException
2065
     * @throws \Starweb\Api\Generated\Exception\PatchProductsVatRateNotFoundException
2066
     *
2067
     * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface
2068
     */
2069
    public function patchProductsVatRate(int $productId, string $countryCode, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody, string $fetch = self::FETCH_OBJECT)
2070
    {
2071
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVatRate($productId, $countryCode, $requestBody), $fetch);
2072
    }
2073
    /**
2074
     * Updates a product vat rate. Retrieves the update `ProductVatRate` object.
2075
     *
2076
     * @param int $productId The product id
2077
     * @param string $countryCode The country code for the vat rate to fetch/manipulate
2078
     * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody 
2079
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2080
     * @throws \Starweb\Api\Generated\Exception\PutProductsVatRateBadRequestException
2081
     * @throws \Starweb\Api\Generated\Exception\PutProductsVatRateNotFoundException
2082
     *
2083
     * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface
2084
     */
2085
    public function putProductsVatRate(int $productId, string $countryCode, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody, string $fetch = self::FETCH_OBJECT)
2086
    {
2087
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVatRate($productId, $countryCode, $requestBody), $fetch);
2088
    }
2089
    /**
2090
     * Returns a list of product media file links.
2091
     *
2092
     * @param int $productId The products id
2093
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2094
     * @throws \Starweb\Api\Generated\Exception\ListProductsMediaFileLinksBadRequestException
2095
     *
2096
     * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelCollection|\Psr\Http\Message\ResponseInterface
2097
     */
2098
    public function listProductsMediaFileLinks(int $productId, string $fetch = self::FETCH_OBJECT)
2099
    {
2100
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsMediaFileLinks($productId), $fetch);
2101
    }
2102
    /**
2103
    * Creates a product media file link. 
2104
                       Retrieves the create `ProductMediaFileLink` object.
2105
    *
2106
    * @param int $productId The products id
2107
    * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody 
2108
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2109
    * @throws \Starweb\Api\Generated\Exception\CreateProductsMediaFileLinkBadRequestException
2110
    *
2111
    * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface
2112
    */
2113
    public function createProductsMediaFileLink(int $productId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody, string $fetch = self::FETCH_OBJECT)
2114
    {
2115
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsMediaFileLink($productId, $requestBody), $fetch);
2116
    }
2117
    /**
2118
     * Deletes the product media file link permanently.
2119
     *
2120
     * @param int $productId The product id
2121
     * @param int $mediaFileId The media file id of the link you want to fetch/change
2122
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2123
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsMediaFileLinkNotFoundException
2124
     *
2125
     * @return null|\Psr\Http\Message\ResponseInterface
2126
     */
2127
    public function deleteProductsMediaFileLink(int $productId, int $mediaFileId, string $fetch = self::FETCH_OBJECT)
2128
    {
2129
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsMediaFileLink($productId, $mediaFileId), $fetch);
2130
    }
2131
    /**
2132
     * Retrieves the `ProductMediaFileLink` object.
2133
     *
2134
     * @param int $productId The product id
2135
     * @param int $mediaFileId The media file id of the link you want to fetch/change
2136
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2137
     * @throws \Starweb\Api\Generated\Exception\GetProductsMediaFileLinkNotFoundException
2138
     *
2139
     * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface
2140
     */
2141
    public function getProductsMediaFileLink(int $productId, int $mediaFileId, string $fetch = self::FETCH_OBJECT)
2142
    {
2143
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsMediaFileLink($productId, $mediaFileId), $fetch);
2144
    }
2145
    /**
2146
    * Updates a product media file link. 
2147
                       Retrieves the update `ProductMediaFileLink` object.
2148
    *
2149
    * @param int $productId The product id
2150
    * @param int $mediaFileId The media file id of the link you want to fetch/change
2151
    * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody 
2152
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2153
    * @throws \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkBadRequestException
2154
    * @throws \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkNotFoundException
2155
    *
2156
    * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface
2157
    */
2158
    public function patchProductsMediaFileLink(int $productId, int $mediaFileId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody, string $fetch = self::FETCH_OBJECT)
2159
    {
2160
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsMediaFileLink($productId, $mediaFileId, $requestBody), $fetch);
2161
    }
2162
    /**
2163
    * Updates a product media file link. 
2164
                       Retrieves the update `ProductMediaFileLink` object.
2165
    *
2166
    * @param int $productId The product id
2167
    * @param int $mediaFileId The media file id of the link you want to fetch/change
2168
    * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody 
2169
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2170
    * @throws \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkBadRequestException
2171
    * @throws \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkNotFoundException
2172
    *
2173
    * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface
2174
    */
2175
    public function putProductsMediaFileLink(int $productId, int $mediaFileId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody, string $fetch = self::FETCH_OBJECT)
2176
    {
2177
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsMediaFileLink($productId, $mediaFileId, $requestBody), $fetch);
2178
    }
2179
    /**
2180
     * Returns a list of product languages.
2181
     *
2182
     * @param int $productId The products id
2183
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2184
     * @throws \Starweb\Api\Generated\Exception\ListProductsLanguagesBadRequestException
2185
     *
2186
     * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelCollection|\Psr\Http\Message\ResponseInterface
2187
     */
2188
    public function listProductsLanguages(int $productId, string $fetch = self::FETCH_OBJECT)
2189
    {
2190
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsLanguages($productId), $fetch);
2191
    }
2192
    /**
2193
     * Create a product language. Retrieves the created `ProductLanguage` object.
2194
     *
2195
     * @param int $productId The products id
2196
     * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody 
2197
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2198
     * @throws \Starweb\Api\Generated\Exception\CreateProductsLanguageBadRequestException
2199
     *
2200
     * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface
2201
     */
2202
    public function createProductsLanguage(int $productId, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody, string $fetch = self::FETCH_OBJECT)
2203
    {
2204
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsLanguage($productId, $requestBody), $fetch);
2205
    }
2206
    /**
2207
     * Delete a product language permanently.
2208
     *
2209
     * @param int $productId The product id
2210
     * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es
2211
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2212
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsLanguageNotFoundException
2213
     *
2214
     * @return null|\Psr\Http\Message\ResponseInterface
2215
     */
2216
    public function deleteProductsLanguage(int $productId, string $langCode, string $fetch = self::FETCH_OBJECT)
2217
    {
2218
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsLanguage($productId, $langCode), $fetch);
2219
    }
2220
    /**
2221
     * Retrieves the `ProductLanguage` object.
2222
     *
2223
     * @param int $productId The product id
2224
     * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es
2225
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2226
     * @throws \Starweb\Api\Generated\Exception\GetProductsLanguageNotFoundException
2227
     *
2228
     * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface
2229
     */
2230
    public function getProductsLanguage(int $productId, string $langCode, string $fetch = self::FETCH_OBJECT)
2231
    {
2232
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsLanguage($productId, $langCode), $fetch);
2233
    }
2234
    /**
2235
     * Update a product language. Retrieves the update `ProductLanguage` object.
2236
     *
2237
     * @param int $productId The product id
2238
     * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es
2239
     * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody 
2240
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2241
     * @throws \Starweb\Api\Generated\Exception\PatchProductsLanguageBadRequestException
2242
     * @throws \Starweb\Api\Generated\Exception\PatchProductsLanguageNotFoundException
2243
     *
2244
     * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface
2245
     */
2246
    public function patchProductsLanguage(int $productId, string $langCode, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody, string $fetch = self::FETCH_OBJECT)
2247
    {
2248
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsLanguage($productId, $langCode, $requestBody), $fetch);
2249
    }
2250
    /**
2251
     * Update a product language. Retrieves the update `ProductLanguage` object.
2252
     *
2253
     * @param int $productId The product id
2254
     * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es
2255
     * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody 
2256
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2257
     * @throws \Starweb\Api\Generated\Exception\PutProductsLanguageBadRequestException
2258
     * @throws \Starweb\Api\Generated\Exception\PutProductsLanguageNotFoundException
2259
     *
2260
     * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface
2261
     */
2262
    public function putProductsLanguage(int $productId, string $langCode, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody, string $fetch = self::FETCH_OBJECT)
2263
    {
2264
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsLanguage($productId, $langCode, $requestBody), $fetch);
2265
    }
2266
    /**
2267
     * Returns a list of product category links.
2268
     *
2269
     * @param int $productId The products id
2270
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2271
     * @throws \Starweb\Api\Generated\Exception\ListProductsCategoryLinksBadRequestException
2272
     *
2273
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelCollection|\Psr\Http\Message\ResponseInterface
2274
     */
2275
    public function listProductsCategoryLinks(int $productId, string $fetch = self::FETCH_OBJECT)
2276
    {
2277
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsCategoryLinks($productId), $fetch);
2278
    }
2279
    /**
2280
     * Retrieves the created `ProductCategoryLink` object
2281
     *
2282
     * @param int $productId The products id
2283
     * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody 
2284
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2285
     * @throws \Starweb\Api\Generated\Exception\CreateProductsCategoryLinkBadRequestException
2286
     *
2287
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface
2288
     */
2289
    public function createProductsCategoryLink(int $productId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody, string $fetch = self::FETCH_OBJECT)
2290
    {
2291
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsCategoryLink($productId, $requestBody), $fetch);
2292
    }
2293
    /**
2294
     * Delete a product category link permanently.
2295
     *
2296
     * @param int $productId The product id
2297
     * @param int $categoryId The category id
2298
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2299
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsCategoryLinkNotFoundException
2300
     *
2301
     * @return null|\Psr\Http\Message\ResponseInterface
2302
     */
2303
    public function deleteProductsCategoryLink(int $productId, int $categoryId, string $fetch = self::FETCH_OBJECT)
2304
    {
2305
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsCategoryLink($productId, $categoryId), $fetch);
2306
    }
2307
    /**
2308
     * Retrieves the `ProductCategoryLink` object
2309
     *
2310
     * @param int $productId The product id
2311
     * @param int $categoryId The category id
2312
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2313
     * @throws \Starweb\Api\Generated\Exception\GetProductsCategoryLinkNotFoundException
2314
     *
2315
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface
2316
     */
2317
    public function getProductsCategoryLink(int $productId, int $categoryId, string $fetch = self::FETCH_OBJECT)
2318
    {
2319
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsCategoryLink($productId, $categoryId), $fetch);
2320
    }
2321
    /**
2322
     * Update a product category link. Retrieves the update `ProductCategoryLink` object.
2323
     *
2324
     * @param int $productId The product id
2325
     * @param int $categoryId The category id
2326
     * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody 
2327
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2328
     * @throws \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkBadRequestException
2329
     * @throws \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkNotFoundException
2330
     *
2331
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface
2332
     */
2333
    public function patchProductsCategoryLink(int $productId, int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody, string $fetch = self::FETCH_OBJECT)
2334
    {
2335
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsCategoryLink($productId, $categoryId, $requestBody), $fetch);
2336
    }
2337
    /**
2338
     * Update a product category link. Retrieves the update `ProductCategoryLink` object.
2339
     *
2340
     * @param int $productId The product id
2341
     * @param int $categoryId The category id
2342
     * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody 
2343
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2344
     * @throws \Starweb\Api\Generated\Exception\PutProductsCategoryLinkBadRequestException
2345
     * @throws \Starweb\Api\Generated\Exception\PutProductsCategoryLinkNotFoundException
2346
     *
2347
     * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface
2348
     */
2349
    public function putProductsCategoryLink(int $productId, int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody, string $fetch = self::FETCH_OBJECT)
2350
    {
2351
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsCategoryLink($productId, $categoryId, $requestBody), $fetch);
2352
    }
2353
    /**
2354
     * Returns a list of product meta data.
2355
     *
2356
     * @param int $productId The products id
2357
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2358
     * @throws \Starweb\Api\Generated\Exception\ListProductsMetaDataBadRequestException
2359
     *
2360
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelCollection|\Psr\Http\Message\ResponseInterface
2361
     */
2362
    public function listProductsMetaData(int $productId, string $fetch = self::FETCH_OBJECT)
2363
    {
2364
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsMetaData($productId), $fetch);
2365
    }
2366
    /**
2367
     * Deprecated: use the [putProductsMetaData](#operation/putProductsMetaData) operation to create a new product meta data for the `metaDataTypeId` instead. Creates a product meta data. Retrieves the created `ProductMetaData` object.
2368
     *
2369
     * @param int $productId The products id
2370
     * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody 
2371
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2372
     * @throws \Starweb\Api\Generated\Exception\CreateProductsMetaDataBadRequestException
2373
     *
2374
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface
2375
     */
2376
    public function createProductsMetaData(int $productId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
2377
    {
2378
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsMetaData($productId, $requestBody), $fetch);
2379
    }
2380
    /**
2381
     * Deletes a product meta data permanently.
2382
     *
2383
     * @param int $productId The product id
2384
     * @param int $metaDataTypeId The meta data type id
2385
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2386
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsMetaDataNotFoundException
2387
     *
2388
     * @return null|\Psr\Http\Message\ResponseInterface
2389
     */
2390
    public function deleteProductsMetaData(int $productId, int $metaDataTypeId, string $fetch = self::FETCH_OBJECT)
2391
    {
2392
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsMetaData($productId, $metaDataTypeId), $fetch);
2393
    }
2394
    /**
2395
     * Retrieves the `ProductMetaData` object.
2396
     *
2397
     * @param int $productId The product id
2398
     * @param int $metaDataTypeId The meta data type id
2399
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2400
     * @throws \Starweb\Api\Generated\Exception\GetProductsMetaDataNotFoundException
2401
     *
2402
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface
2403
     */
2404
    public function getProductsMetaData(int $productId, int $metaDataTypeId, string $fetch = self::FETCH_OBJECT)
2405
    {
2406
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsMetaData($productId, $metaDataTypeId), $fetch);
2407
    }
2408
    /**
2409
     * Updates a product meta data. Retrieves the update `ProductMetaData` object.
2410
     *
2411
     * @param int $productId The product id
2412
     * @param int $metaDataTypeId The meta data type id
2413
     * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody 
2414
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2415
     * @throws \Starweb\Api\Generated\Exception\PatchProductsMetaDataBadRequestException
2416
     * @throws \Starweb\Api\Generated\Exception\PatchProductsMetaDataNotFoundException
2417
     *
2418
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface
2419
     */
2420
    public function patchProductsMetaData(int $productId, int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
2421
    {
2422
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsMetaData($productId, $metaDataTypeId, $requestBody), $fetch);
2423
    }
2424
    /**
2425
     * Updates a product meta data if it exists or creates a new product meta data for the given `metaDataTypeId` if it does not exist. Retrieves the update `ProductMetaData` object.
2426
     *
2427
     * @param int $productId The product id
2428
     * @param int $metaDataTypeId The meta data type id
2429
     * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody 
2430
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2431
     * @throws \Starweb\Api\Generated\Exception\PutProductsMetaDataBadRequestException
2432
     * @throws \Starweb\Api\Generated\Exception\PutProductsMetaDataNotFoundException
2433
     *
2434
     * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface
2435
     */
2436
    public function putProductsMetaData(int $productId, int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT)
2437
    {
2438
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsMetaData($productId, $metaDataTypeId, $requestBody), $fetch);
2439
    }
2440
    /**
2441
     * Returns a list of product attributes.
2442
     *
2443
     * @param int $productId The products id
2444
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2445
     * @throws \Starweb\Api\Generated\Exception\ListProductsAttributesNotFoundException
2446
     *
2447
     * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection|\Psr\Http\Message\ResponseInterface
2448
     */
2449
    public function listProductsAttributes(int $productId, string $fetch = self::FETCH_OBJECT)
2450
    {
2451
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsAttributes($productId), $fetch);
2452
    }
2453
    /**
2454
     * Retrieves the `ProductAttribute` object.
2455
     *
2456
     * @param int $productId The product id
2457
     * @param int $attributeId The attribute id you want to fetch.
2458
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2459
     * @throws \Starweb\Api\Generated\Exception\GetProductsAttributeNotFoundException
2460
     *
2461
     * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface
2462
     */
2463
    public function getProductsAttribute(int $productId, int $attributeId, string $fetch = self::FETCH_OBJECT)
2464
    {
2465
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsAttribute($productId, $attributeId), $fetch);
2466
    }
2467
    /**
2468
     * Returns a list of product variant pricelist prices
2469
     *
2470
     * @param int $productId The products id
2471
     * @param int $variantId The products variants id
2472
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2473
     * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistPricesBadRequestException
2474
     *
2475
     * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelCollection|\Psr\Http\Message\ResponseInterface
2476
     */
2477
    public function listProductsVariantsPricelistPrices(int $productId, int $variantId, string $fetch = self::FETCH_OBJECT)
2478
    {
2479
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistPrices($productId, $variantId), $fetch);
2480
    }
2481
    /**
2482
    * Creates a product variant pricelist price. 
2483
                       Retrieves the created `ProductVariantPricelistPrice` object
2484
    *
2485
    * @param int $productId The products id
2486
    * @param int $variantId The products variants id
2487
    * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody 
2488
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2489
    * @throws \Starweb\Api\Generated\Exception\CreateProductVariantPricelistPriceBadRequestException
2490
    *
2491
    * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface
2492
    */
2493
    public function createProductVariantPricelistPrice(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2494
    {
2495
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody), $fetch);
2496
    }
2497
    /**
2498
     * Deletes a product variant pricelist price permanently.
2499
     *
2500
     * @param int $productId The product id
2501
     * @param int $variantId The products variants id
2502
     * @param int $pricelistId The pricelist id
2503
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2504
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistPriceNotFoundException
2505
     *
2506
     * @return null|\Psr\Http\Message\ResponseInterface
2507
     */
2508
    public function deleteProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, string $fetch = self::FETCH_OBJECT)
2509
    {
2510
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistPrice($productId, $variantId, $pricelistId), $fetch);
2511
    }
2512
    /**
2513
     * Retrieves the `ProductVariantPricelistPrice` object
2514
     *
2515
     * @param int $productId The product id
2516
     * @param int $variantId The products variants id
2517
     * @param int $pricelistId The pricelist id
2518
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2519
     * @throws \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistPriceNotFoundException
2520
     *
2521
     * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface
2522
     */
2523
    public function getProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, string $fetch = self::FETCH_OBJECT)
2524
    {
2525
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistPrice($productId, $variantId, $pricelistId), $fetch);
2526
    }
2527
    /**
2528
    * Updates a product variant pricelist price. 
2529
                       Retrieves the updated `ProductVariantPricelistPrice` object
2530
    *
2531
    * @param int $productId The product id
2532
    * @param int $variantId The products variants id
2533
    * @param int $pricelistId The pricelist id
2534
    * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody 
2535
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2536
    * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceBadRequestException
2537
    * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceNotFoundException
2538
    *
2539
    * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface
2540
    */
2541
    public function patchProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2542
    {
2543
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody), $fetch);
2544
    }
2545
    /**
2546
    * Updates a product variant pricelist price. 
2547
                       Retrieves the updated `ProductVariantPricelistPrice` object
2548
    *
2549
    * @param int $productId The product id
2550
    * @param int $variantId The products variants id
2551
    * @param int $pricelistId The pricelist id
2552
    * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody 
2553
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2554
    * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceBadRequestException
2555
    * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceNotFoundException
2556
    *
2557
    * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface
2558
    */
2559
    public function putProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2560
    {
2561
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody), $fetch);
2562
    }
2563
    /**
2564
     * Returns a list of product variant pricelist prices
2565
     *
2566
     * @param int $productId The products id
2567
     * @param int $bundledProductId The bundled products id
2568
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2569
     * @throws \Starweb\Api\Generated\Exception\ListProductBundledProductsPricelistPricesBadRequestException
2570
     *
2571
     * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelCollection|\Psr\Http\Message\ResponseInterface
2572
     */
2573
    public function listProductBundledProductsPricelistPrices(int $productId, int $bundledProductId, string $fetch = self::FETCH_OBJECT)
2574
    {
2575
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductBundledProductsPricelistPrices($productId, $bundledProductId), $fetch);
2576
    }
2577
    /**
2578
    * Creates a bundled product pricelist price. 
2579
                       Retrieves the created `ProductBundleProductPricelistPrice` object
2580
    *
2581
    * @param int $productId The products id
2582
    * @param int $bundledProductId The bundled products id
2583
    * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody 
2584
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2585
    * @throws \Starweb\Api\Generated\Exception\CreateProductBundleProductPricelistPriceBadRequestException
2586
    *
2587
    * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface
2588
    */
2589
    public function createProductBundleProductPricelistPrice(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2590
    {
2591
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductBundleProductPricelistPrice($productId, $bundledProductId, $requestBody), $fetch);
2592
    }
2593
    /**
2594
     * Deletes a bundled product pricelist price permanently.
2595
     *
2596
     * @param int $productId The product id
2597
     * @param int $bundledProductId The bundled products id
2598
     * @param int $pricelistId The pricelist id
2599
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2600
     * @throws \Starweb\Api\Generated\Exception\DeleteProductBundledProductsPricelistPriceNotFoundException
2601
     *
2602
     * @return null|\Psr\Http\Message\ResponseInterface
2603
     */
2604
    public function deleteProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, string $fetch = self::FETCH_OBJECT)
2605
    {
2606
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId), $fetch);
2607
    }
2608
    /**
2609
     * Retrieves the `ProductBundleProductPricelistPrice` object
2610
     *
2611
     * @param int $productId The product id
2612
     * @param int $bundledProductId The bundled products id
2613
     * @param int $pricelistId The pricelist id
2614
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2615
     * @throws \Starweb\Api\Generated\Exception\GetProductBundledProductsPricelistPriceNotFoundException
2616
     *
2617
     * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface
2618
     */
2619
    public function getProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, string $fetch = self::FETCH_OBJECT)
2620
    {
2621
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId), $fetch);
2622
    }
2623
    /**
2624
    * Updates a bundled product pricelist price. 
2625
                       Retrieves the updated `ProductBundleProductPricelistPrice` object
2626
    *
2627
    * @param int $productId The product id
2628
    * @param int $bundledProductId The bundled products id
2629
    * @param int $pricelistId The pricelist id
2630
    * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody 
2631
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2632
    * @throws \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceBadRequestException
2633
    * @throws \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceNotFoundException
2634
    *
2635
    * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface
2636
    */
2637
    public function patchProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2638
    {
2639
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId, $requestBody), $fetch);
2640
    }
2641
    /**
2642
    * Updates a bundled product pricelist price. 
2643
                       Retrieves the updated `ProductBundleProductPricelistPrice` object
2644
    *
2645
    * @param int $productId The product id
2646
    * @param int $bundledProductId The bundled products id
2647
    * @param int $pricelistId The pricelist id
2648
    * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody 
2649
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2650
    * @throws \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceBadRequestException
2651
    * @throws \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceNotFoundException
2652
    *
2653
    * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface
2654
    */
2655
    public function putProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2656
    {
2657
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId, $requestBody), $fetch);
2658
    }
2659
    /**
2660
     * Returns a list of product tag links.
2661
     *
2662
     * @param int $productId The product id
2663
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2664
     * @throws \Starweb\Api\Generated\Exception\ListProductTagLinksBadRequestException
2665
     *
2666
     * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelCollection|\Psr\Http\Message\ResponseInterface
2667
     */
2668
    public function listProductTagLinks(int $productId, string $fetch = self::FETCH_OBJECT)
2669
    {
2670
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductTagLinks($productId), $fetch);
2671
    }
2672
    /**
2673
     * Create a product tag link by submitting the tagOptionId. Retrieves the created `ProductTagLink` object
2674
     *
2675
     * @param int $productId The product id
2676
     * @param \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody 
2677
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2678
     * @throws \Starweb\Api\Generated\Exception\CreateProductTagLinkBadRequestException
2679
     *
2680
     * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelItem|\Psr\Http\Message\ResponseInterface
2681
     */
2682
    public function createProductTagLink(int $productId, \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
2683
    {
2684
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTagLink($productId, $requestBody), $fetch);
2685
    }
2686
    /**
2687
     * Delete a product tag link permanently.
2688
     *
2689
     * @param int $productId The product id
2690
     * @param int $tagOptionId The id of the tag option
2691
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2692
     * @throws \Starweb\Api\Generated\Exception\DeleteProductTagLinkNotFoundException
2693
     *
2694
     * @return null|\Psr\Http\Message\ResponseInterface
2695
     */
2696
    public function deleteProductTagLink(int $productId, int $tagOptionId, string $fetch = self::FETCH_OBJECT)
2697
    {
2698
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTagLink($productId, $tagOptionId), $fetch);
2699
    }
2700
    /**
2701
     * Retrieves the `ProductTagLink` object
2702
     *
2703
     * @param int $productId The product id
2704
     * @param int $tagOptionId The id of the tag option
2705
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2706
     * @throws \Starweb\Api\Generated\Exception\GetProductTagLinkNotFoundException
2707
     *
2708
     * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelItem|\Psr\Http\Message\ResponseInterface
2709
     */
2710
    public function getProductTagLink(int $productId, int $tagOptionId, string $fetch = self::FETCH_OBJECT)
2711
    {
2712
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductTagLink($productId, $tagOptionId), $fetch);
2713
    }
2714
    /**
2715
     * Returns a list of the variants pricelist volume prices
2716
     *
2717
     * @param int $productId The products id
2718
     * @param int $variantId The products variants id
2719
     * @param int $pricelistId The pricelist id
2720
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2721
     * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistVolumePricesBadRequestException
2722
     *
2723
     * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelCollection|\Psr\Http\Message\ResponseInterface
2724
     */
2725
    public function listProductsVariantsPricelistVolumePrices(int $productId, int $variantId, int $pricelistId, string $fetch = self::FETCH_OBJECT)
2726
    {
2727
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistVolumePrices($productId, $variantId, $pricelistId), $fetch);
2728
    }
2729
    /**
2730
    * Creates a variant volume pricelist price. 
2731
                       Retrieves the created `ProductVariantPricelistVolumePrice` object
2732
    *
2733
    * @param int $productId The products id
2734
    * @param int $variantId The products variants id
2735
    * @param int $pricelistId The pricelist id
2736
    * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody 
2737
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2738
    * @throws \Starweb\Api\Generated\Exception\CreateProductVariantPricelistVolumePriceBadRequestException
2739
    *
2740
    * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface
2741
    */
2742
    public function createProductVariantPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2743
    {
2744
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistVolumePrice($productId, $variantId, $pricelistId, $requestBody), $fetch);
2745
    }
2746
    /**
2747
     * Deletes a product variant pricelist volume price permanently.
2748
     *
2749
     * @param int $productId The product id
2750
     * @param int $variantId The products variants id
2751
     * @param int $pricelistId The pricelist id
2752
     * @param int $quantity The volume quantity
2753
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2754
     * @throws \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistVolumePriceNotFoundException
2755
     *
2756
     * @return null|\Psr\Http\Message\ResponseInterface
2757
     */
2758
    public function deleteProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, string $fetch = self::FETCH_OBJECT)
2759
    {
2760
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity), $fetch);
2761
    }
2762
    /**
2763
     * Retrieves the `ProductVariantPricelistVolumePrice` object
2764
     *
2765
     * @param int $productId The product id
2766
     * @param int $variantId The products variants id
2767
     * @param int $pricelistId The pricelist id
2768
     * @param int $quantity The volume quantity
2769
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2770
     * @throws \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistVolumePriceNotFoundException
2771
     *
2772
     * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface
2773
     */
2774
    public function getProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, string $fetch = self::FETCH_OBJECT)
2775
    {
2776
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity), $fetch);
2777
    }
2778
    /**
2779
    * Updates a product variant pricelist volume price. 
2780
                       Retrieves the updated `ProductVariantPricelistVolumePrice` object
2781
    *
2782
    * @param int $productId The product id
2783
    * @param int $variantId The products variants id
2784
    * @param int $pricelistId The pricelist id
2785
    * @param int $quantity The volume quantity
2786
    * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody 
2787
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2788
    * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceBadRequestException
2789
    * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceNotFoundException
2790
    *
2791
    * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface
2792
    */
2793
    public function patchProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2794
    {
2795
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity, $requestBody), $fetch);
2796
    }
2797
    /**
2798
    * Updates a product variant pricelist volume price. 
2799
                       Retrieves the updated `ProductVariantPricelistVolumePrice` object
2800
    *
2801
    * @param int $productId The product id
2802
    * @param int $variantId The products variants id
2803
    * @param int $pricelistId The pricelist id
2804
    * @param int $quantity The volume quantity
2805
    * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody 
2806
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2807
    * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceBadRequestException
2808
    * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceNotFoundException
2809
    *
2810
    * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface
2811
    */
2812
    public function putProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody, string $fetch = self::FETCH_OBJECT)
2813
    {
2814
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity, $requestBody), $fetch);
2815
    }
2816
    /**
2817
     * Returns a list of product variant stocks for stock locations
2818
     *
2819
     * @param int $productId The products id
2820
     * @param int $variantId The products variants id
2821
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2822
     * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsStocksBadRequestException
2823
     *
2824
     * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelCollection|\Psr\Http\Message\ResponseInterface
2825
     */
2826
    public function listProductsVariantsStocks(int $productId, int $variantId, string $fetch = self::FETCH_OBJECT)
2827
    {
2828
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsStocks($productId, $variantId), $fetch);
2829
    }
2830
    /**
2831
     * Deletes a product variant stock permanently.
2832
     *
2833
     * @param int $productId The product id
2834
     * @param int $variantId The products variants id
2835
     * @param int $stockLocationId The stock location id
2836
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2837
     * @throws \Starweb\Api\Generated\Exception\DeleteProductVariantStocksNotFoundException
2838
     *
2839
     * @return null|\Psr\Http\Message\ResponseInterface
2840
     */
2841
    public function deleteProductVariantStocks(int $productId, int $variantId, int $stockLocationId, string $fetch = self::FETCH_OBJECT)
2842
    {
2843
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductVariantStocks($productId, $variantId, $stockLocationId), $fetch);
2844
    }
2845
    /**
2846
     * Retrieves the `ProductVariantStock` object
2847
     *
2848
     * @param int $productId The product id
2849
     * @param int $variantId The products variants id
2850
     * @param int $stockLocationId The stock location id
2851
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2852
     * @throws \Starweb\Api\Generated\Exception\GetProductVariantStockNotFoundException
2853
     *
2854
     * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem|\Psr\Http\Message\ResponseInterface
2855
     */
2856
    public function getProductVariantStock(int $productId, int $variantId, int $stockLocationId, string $fetch = self::FETCH_OBJECT)
2857
    {
2858
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductVariantStock($productId, $variantId, $stockLocationId), $fetch);
2859
    }
2860
    /**
2861
    * Update or set the stock for a product variant at a stock location. 
2862
                       Retrieves the updated `ProductVariantStock` object
2863
    *
2864
    * @param int $productId The product id
2865
    * @param int $variantId The products variants id
2866
    * @param int $stockLocationId The stock location id
2867
    * @param \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody 
2868
    * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2869
    * @throws \Starweb\Api\Generated\Exception\PutProductVariantStockBadRequestException
2870
    * @throws \Starweb\Api\Generated\Exception\PutProductVariantStockNotFoundException
2871
    *
2872
    * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem|\Psr\Http\Message\ResponseInterface
2873
    */
2874
    public function putProductVariantStock(int $productId, int $variantId, int $stockLocationId, \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
2875
    {
2876
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductVariantStock($productId, $variantId, $stockLocationId, $requestBody), $fetch);
2877
    }
2878
    /**
2879
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2880
     *
2881
     * @return null|\Starweb\Api\Generated\Model\ShippingMethodModelCollection|\Psr\Http\Message\ResponseInterface
2882
     */
2883
    public function getShippingMethods(string $fetch = self::FETCH_OBJECT)
2884
    {
2885
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShippingMethods(), $fetch);
2886
    }
2887
    /**
2888
     * Retrieves a `ShippingMethid` object
2889
     *
2890
     * @param int $shippingMethodId The shipping method id
2891
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2892
     * @throws \Starweb\Api\Generated\Exception\GetShippingMethodNotFoundException
2893
     *
2894
     * @return null|\Starweb\Api\Generated\Model\ShippingMethodModelItem|\Psr\Http\Message\ResponseInterface
2895
     */
2896
    public function getShippingMethod(int $shippingMethodId, string $fetch = self::FETCH_OBJECT)
2897
    {
2898
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShippingMethod($shippingMethodId), $fetch);
2899
    }
2900
    /**
2901
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2902
     *
2903
     * @return null|\Starweb\Api\Generated\Model\ShippingTrackingTypeModelCollection|\Psr\Http\Message\ResponseInterface
2904
     */
2905
    public function getShippingTrackingTypes(string $fetch = self::FETCH_OBJECT)
2906
    {
2907
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShippingTrackingTypes(), $fetch);
2908
    }
2909
    /**
2910
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2911
     * @throws \Starweb\Api\Generated\Exception\GetShopNotFoundException
2912
     *
2913
     * @return null|\Starweb\Api\Generated\Model\ShopItem|\Psr\Http\Message\ResponseInterface
2914
     */
2915
    public function getShop(string $fetch = self::FETCH_OBJECT)
2916
    {
2917
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShop(), $fetch);
2918
    }
2919
    /**
2920
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2921
     * @throws \Starweb\Api\Generated\Exception\ListStockLocationsBadRequestException
2922
     *
2923
     * @return null|\Starweb\Api\Generated\Model\StockLocationModelCollection|\Psr\Http\Message\ResponseInterface
2924
     */
2925
    public function listStockLocations(string $fetch = self::FETCH_OBJECT)
2926
    {
2927
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListStockLocations(), $fetch);
2928
    }
2929
    /**
2930
     * Create a stock location. Retrieves the created `StockLocation` object
2931
     *
2932
     * @param \Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody 
2933
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2934
     * @throws \Starweb\Api\Generated\Exception\CreateStockLocationBadRequestException
2935
     * @throws \Starweb\Api\Generated\Exception\CreateStockLocationForbiddenException
2936
     *
2937
     * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface
2938
     */
2939
    public function createStockLocation(\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
2940
    {
2941
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateStockLocation($requestBody), $fetch);
2942
    }
2943
    /**
2944
     * Delete a stock location permanently
2945
     *
2946
     * @param int $stockLocationId The stock location id
2947
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2948
     * @throws \Starweb\Api\Generated\Exception\DeleteStockLocationForbiddenException
2949
     * @throws \Starweb\Api\Generated\Exception\DeleteStockLocationNotFoundException
2950
     *
2951
     * @return null|\Psr\Http\Message\ResponseInterface
2952
     */
2953
    public function deleteStockLocation(int $stockLocationId, string $fetch = self::FETCH_OBJECT)
2954
    {
2955
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteStockLocation($stockLocationId), $fetch);
2956
    }
2957
    /**
2958
     * Retrieves a `StockLocation` object
2959
     *
2960
     * @param int $stockLocationId The stock location id
2961
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2962
     * @throws \Starweb\Api\Generated\Exception\GetStockLocationNotFoundException
2963
     *
2964
     * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface
2965
     */
2966
    public function getStockLocation(int $stockLocationId, string $fetch = self::FETCH_OBJECT)
2967
    {
2968
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetStockLocation($stockLocationId), $fetch);
2969
    }
2970
    /**
2971
     * Update a stock location partially. Retrieves the updated `StockLocation` object
2972
     *
2973
     * @param int $stockLocationId The stock location id
2974
     * @param mixed $requestBody 
2975
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2976
     * @throws \Starweb\Api\Generated\Exception\PatchStockLocationBadRequestException
2977
     * @throws \Starweb\Api\Generated\Exception\PatchStockLocationForbiddenException
2978
     * @throws \Starweb\Api\Generated\Exception\PatchStockLocationNotFoundException
2979
     *
2980
     * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface
2981
     */
2982
    public function patchStockLocation(int $stockLocationId, mixed $requestBody, string $fetch = self::FETCH_OBJECT)
2983
    {
2984
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchStockLocation($stockLocationId, $requestBody), $fetch);
2985
    }
2986
    /**
2987
     * Update a stock location. Retrieves the updated `StockLocation` object
2988
     *
2989
     * @param int $stockLocationId The stock location id
2990
     * @param \Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody 
2991
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
2992
     * @throws \Starweb\Api\Generated\Exception\PutStockLocationBadRequestException
2993
     * @throws \Starweb\Api\Generated\Exception\PutStockLocationForbiddenException
2994
     * @throws \Starweb\Api\Generated\Exception\PutStockLocationNotFoundException
2995
     *
2996
     * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface
2997
     */
2998
    public function putStockLocation(int $stockLocationId, \Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT)
2999
    {
3000
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutStockLocation($stockLocationId, $requestBody), $fetch);
3001
    }
3002
    /**
3003
     * 
3004
     *
3005
     * @param array $queryParameters {
3006
     *     @var string $sortBy Sort the result using a specified field. webHookId is default. Valid options are: webHookId
3007
     *     @var string $sortOrder ASC for an ascending sort order; or DESC for a descending sort order. ASC is default
3008
     * }
3009
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
3010
     *
3011
     * @return null|\Starweb\Api\Generated\Model\WebHookModelCollection|\Psr\Http\Message\ResponseInterface
3012
     */
3013
    public function getWebHooks(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
3014
    {
3015
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetWebHooks($queryParameters), $fetch);
3016
    }
3017
    /**
3018
     * 
3019
     *
3020
     * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody 
3021
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
3022
     * @throws \Starweb\Api\Generated\Exception\CreateWebHookBadRequestException
3023
     *
3024
     * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface
3025
     */
3026
    public function createWebHook(\Starweb\Api\Generated\Model\WebHookModel $requestBody, string $fetch = self::FETCH_OBJECT)
3027
    {
3028
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateWebHook($requestBody), $fetch);
3029
    }
3030
    /**
3031
     * 
3032
     *
3033
     * @param int $webHookId The web hook id
3034
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
3035
     * @throws \Starweb\Api\Generated\Exception\DeleteWebHookNotFoundException
3036
     *
3037
     * @return null|\Psr\Http\Message\ResponseInterface
3038
     */
3039
    public function deleteWebHook(int $webHookId, string $fetch = self::FETCH_OBJECT)
3040
    {
3041
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteWebHook($webHookId), $fetch);
3042
    }
3043
    /**
3044
     * 
3045
     *
3046
     * @param int $webHookId The web hook id
3047
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
3048
     * @throws \Starweb\Api\Generated\Exception\GetWebHookNotFoundException
3049
     *
3050
     * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface
3051
     */
3052
    public function getWebHook(int $webHookId, string $fetch = self::FETCH_OBJECT)
3053
    {
3054
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetWebHook($webHookId), $fetch);
3055
    }
3056
    /**
3057
     * 
3058
     *
3059
     * @param int $webHookId The web hook id
3060
     * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody 
3061
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
3062
     * @throws \Starweb\Api\Generated\Exception\PatchWebHookBadRequestException
3063
     * @throws \Starweb\Api\Generated\Exception\PatchWebHookNotFoundException
3064
     *
3065
     * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface
3066
     */
3067
    public function patchWebHook(int $webHookId, \Starweb\Api\Generated\Model\WebHookModel $requestBody, string $fetch = self::FETCH_OBJECT)
3068
    {
3069
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchWebHook($webHookId, $requestBody), $fetch);
3070
    }
3071
    /**
3072
     * 
3073
     *
3074
     * @param int $webHookId The web hook id
3075
     * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody 
3076
     * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
3077
     * @throws \Starweb\Api\Generated\Exception\PutWebHookBadRequestException
3078
     * @throws \Starweb\Api\Generated\Exception\PutWebHookNotFoundException
3079
     *
3080
     * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface
3081
     */
3082
    public function putWebHook(int $webHookId, \Starweb\Api\Generated\Model\WebHookModel $requestBody, string $fetch = self::FETCH_OBJECT)
3083
    {
3084
        return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutWebHook($webHookId, $requestBody), $fetch);
3085
    }
3086
    public static function create($httpClient = null)
3087
    {
3088
        if (null === $httpClient) {
3089
            $httpClient = \Http\Discovery\HttpClientDiscovery::find();
3090
            $plugins = array();
3091
            $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('https://{shopId}.starwebserver.se/api/v2');
3092
            $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri);
3093
            $plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
3094
            $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
3095
        }
3096
        $messageFactory = \Http\Discovery\MessageFactoryDiscovery::find();
3097
        $streamFactory = \Http\Discovery\StreamFactoryDiscovery::find();
3098
        $serializer = new \Symfony\Component\Serializer\Serializer(\Starweb\Api\Generated\Normalizer\NormalizerFactory::create(), array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode())));
3099
        return new static($httpClient, $messageFactory, $serializer, $streamFactory);
3100
    }
3101
}