Package io.voucherify.client.api
Class ProductsApi
java.lang.Object
io.voucherify.client.api.ProductsApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProduct(ProductsCreateRequestBody productsCreateRequestBody) Create Product Creates a product object.okhttp3.CallcreateProductAsync(ProductsCreateRequestBody productsCreateRequestBody, ApiCallback<ProductsCreateResponseBody> _callback) Create Product (asynchronously) Creates a product object.okhttp3.CallcreateProductCall(ProductsCreateRequestBody productsCreateRequestBody, ApiCallback _callback) Build call for createProductcreateProductWithHttpInfo(ProductsCreateRequestBody productsCreateRequestBody) Create Product Creates a product object.createSku(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody) Create SKU This method adds product variants to a created product.okhttp3.CallcreateSkuAsync(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody, ApiCallback<ProductsSkusCreateResponseBody> _callback) Create SKU (asynchronously) This method adds product variants to a created product.okhttp3.CallcreateSkuCall(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody, ApiCallback _callback) Build call for createSkucreateSkuWithHttpInfo(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody) Create SKU This method adds product variants to a created product.voiddeleteProduct(String productId, Boolean force) Delete Product Deletes a product and all related SKUs.okhttp3.CalldeleteProductAsync(String productId, Boolean force, ApiCallback<Void> _callback) Delete Product (asynchronously) Deletes a product and all related SKUs.okhttp3.CalldeleteProductCall(String productId, Boolean force, ApiCallback _callback) Build call for deleteProductdeleteProductWithHttpInfo(String productId, Boolean force) Delete Product Deletes a product and all related SKUs.voidDelete SKU Deletes a product SKU.okhttp3.CalldeleteSkuAsync(String productId, String skuId, Boolean force, ApiCallback<Void> _callback) Delete SKU (asynchronously) Deletes a product SKU.okhttp3.CalldeleteSkuCall(String productId, String skuId, Boolean force, ApiCallback _callback) Build call for deleteSkudeleteSkuWithHttpInfo(String productId, String skuId, Boolean force) Delete SKU Deletes a product SKU.intgetProduct(String productId) Get Product Retrieve product details.okhttp3.CallgetProductAsync(String productId, ApiCallback<ProductsGetResponseBody> _callback) Get Product (asynchronously) Retrieve product details.okhttp3.CallgetProductCall(String productId, ApiCallback _callback) Build call for getProductgetProductWithHttpInfo(String productId) Get Product Retrieve product details.Get SKU Retrieve details of a SKU.okhttp3.CallgetSkuAsync(String skuId, ApiCallback<SkusGetResponseBody> _callback) Get SKU (asynchronously) Retrieve details of a SKU.okhttp3.CallgetSkuCall(String skuId, ApiCallback _callback) Build call for getSkugetSkuWithHttpInfo(String skuId) Get SKU Retrieve details of a SKU.importProductsUsingCsv(File _file) Import Products using CSV Import products into the repository using a CSV file.okhttp3.CallimportProductsUsingCsvAsync(File _file, ApiCallback<ProductsImportCsvCreateResponseBody> _callback) Import Products using CSV (asynchronously) Import products into the repository using a CSV file.okhttp3.CallimportProductsUsingCsvCall(File _file, ApiCallback _callback) Build call for importProductsUsingCsvImport Products using CSV Import products into the repository using a CSV file.importSkusUsingCsv(File _file) Import SKUs using CSV Import SKUs into the repository using a CSV file.okhttp3.CallimportSkusUsingCsvAsync(File _file, ApiCallback<SkusImportCsvCreateResponseBody> _callback) Import SKUs using CSV (asynchronously) Import SKUs into the repository using a CSV file.okhttp3.CallimportSkusUsingCsvCall(File _file, ApiCallback _callback) Build call for importSkusUsingCsvImport SKUs using CSV Import SKUs into the repository using a CSV file.listProducts(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) List Products Retrieve a list of products.okhttp3.CalllistProductsAsync(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback<ProductsListResponseBody> _callback) List Products (asynchronously) Retrieve a list of products.okhttp3.CalllistProductsCall(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback _callback) Build call for listProductslistProductsWithHttpInfo(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) List Products Retrieve a list of products.listSkusInProduct(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) List SKUs in Product Retrieve all SKUs for a given product.okhttp3.CalllistSkusInProductAsync(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback<ProductsSkusListResponseBody> _callback) List SKUs in Product (asynchronously) Retrieve all SKUs for a given product.okhttp3.CalllistSkusInProductCall(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback _callback) Build call for listSkusInProductlistSkusInProductWithHttpInfo(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) List SKUs in Product Retrieve all SKUs for a given product.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) updateProduct(String productId, ProductsUpdateRequestBody productsUpdateRequestBody) Update Product Updates the specified product by setting the values of the parameters passed in the request body.okhttp3.CallupdateProductAsync(String productId, ProductsUpdateRequestBody productsUpdateRequestBody, ApiCallback<ProductsUpdateResponseBody> _callback) Update Product (asynchronously) Updates the specified product by setting the values of the parameters passed in the request body.okhttp3.CallupdateProductCall(String productId, ProductsUpdateRequestBody productsUpdateRequestBody, ApiCallback _callback) Build call for updateProductupdateProductsInBulk(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody) Update Products in Bulk Update products in one asynchronous operation.okhttp3.CallupdateProductsInBulkAsync(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody, ApiCallback<ProductsUpdateInBulkResponseBody> _callback) Update Products in Bulk (asynchronously) Update products in one asynchronous operation.okhttp3.CallupdateProductsInBulkCall(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody, ApiCallback _callback) Build call for updateProductsInBulkupdateProductsInBulkWithHttpInfo(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody) Update Products in Bulk Update products in one asynchronous operation.updateProductsMetadataInBulk(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody) Update Products' Metadata in Bulk Updates metadata parameters for a list of products.okhttp3.CallupdateProductsMetadataInBulkAsync(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody, ApiCallback<ProductsMetadataUpdateInBulkResponseBody> _callback) Update Products' Metadata in Bulk (asynchronously) Updates metadata parameters for a list of products.okhttp3.CallupdateProductsMetadataInBulkCall(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody, ApiCallback _callback) Build call for updateProductsMetadataInBulkupdateProductsMetadataInBulkWithHttpInfo(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody) Update Products' Metadata in Bulk Updates metadata parameters for a list of products.updateProductWithHttpInfo(String productId, ProductsUpdateRequestBody productsUpdateRequestBody) Update Product Updates the specified product by setting the values of the parameters passed in the request body.updateSku(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody) Update SKU Updates the specified SKU by setting the values of the parameters passed in the request body.okhttp3.CallupdateSkuAsync(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody, ApiCallback<ProductsSkusUpdateResponseBody> _callback) Update SKU (asynchronously) Updates the specified SKU by setting the values of the parameters passed in the request body.okhttp3.CallupdateSkuCall(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody, ApiCallback _callback) Build call for updateSkuupdateSkuWithHttpInfo(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody) Update SKU Updates the specified SKU by setting the values of the parameters passed in the request body.
-
Constructor Details
-
ProductsApi
public ProductsApi() -
ProductsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createProductCall
public okhttp3.Call createProductCall(ProductsCreateRequestBody productsCreateRequestBody, ApiCallback _callback) throws ApiException Build call for createProduct- Parameters:
productsCreateRequestBody- Specify the product parameters. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createProduct
public ProductsCreateResponseBody createProduct(ProductsCreateRequestBody productsCreateRequestBody) throws ApiException Create Product Creates a product object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.- Parameters:
productsCreateRequestBody- Specify the product parameters. (optional)- Returns:
- ProductsCreateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createProductWithHttpInfo
public ApiResponse<ProductsCreateResponseBody> createProductWithHttpInfo(ProductsCreateRequestBody productsCreateRequestBody) throws ApiException Create Product Creates a product object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.- Parameters:
productsCreateRequestBody- Specify the product parameters. (optional)- Returns:
- ApiResponse<ProductsCreateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createProductAsync
public okhttp3.Call createProductAsync(ProductsCreateRequestBody productsCreateRequestBody, ApiCallback<ProductsCreateResponseBody> _callback) throws ApiException Create Product (asynchronously) Creates a product object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.- Parameters:
productsCreateRequestBody- Specify the product parameters. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
createSkuCall
public okhttp3.Call createSkuCall(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody, ApiCallback _callback) throws ApiException Build call for createSku- Parameters:
productId- A Voucherify product ID or product source ID. (required)productsSkusCreateRequestBody- Specify the SKU parameters to be created. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createSku
public ProductsSkusCreateResponseBody createSku(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody) throws ApiException Create SKU This method adds product variants to a created product. 📘 Upsert Mode If you pass an id or a source_id that already exists in the sku database, Voucherify will return a related sku object with updated fields.- Parameters:
productId- A Voucherify product ID or product source ID. (required)productsSkusCreateRequestBody- Specify the SKU parameters to be created. (optional)- Returns:
- ProductsSkusCreateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createSkuWithHttpInfo
public ApiResponse<ProductsSkusCreateResponseBody> createSkuWithHttpInfo(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody) throws ApiException Create SKU This method adds product variants to a created product. 📘 Upsert Mode If you pass an id or a source_id that already exists in the sku database, Voucherify will return a related sku object with updated fields.- Parameters:
productId- A Voucherify product ID or product source ID. (required)productsSkusCreateRequestBody- Specify the SKU parameters to be created. (optional)- Returns:
- ApiResponse<ProductsSkusCreateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createSkuAsync
public okhttp3.Call createSkuAsync(String productId, ProductsSkusCreateRequestBody productsSkusCreateRequestBody, ApiCallback<ProductsSkusCreateResponseBody> _callback) throws ApiException Create SKU (asynchronously) This method adds product variants to a created product. 📘 Upsert Mode If you pass an id or a source_id that already exists in the sku database, Voucherify will return a related sku object with updated fields.- Parameters:
productId- A Voucherify product ID or product source ID. (required)productsSkusCreateRequestBody- Specify the SKU parameters to be created. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
deleteProductCall
public okhttp3.Call deleteProductCall(String productId, Boolean force, ApiCallback _callback) throws ApiException Build call for deleteProduct- Parameters:
productId- A Voucherify product ID or source ID. (required)force- If this flag is set to true, the product and all related SKUs will be removed permanently. If it is set to false or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same source_id. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteProduct
Delete Product Deletes a product and all related SKUs. This operation cannot be undone. If the force parameter is set to false or not set at all, the product and all related SKUs will be moved to the bin.- Parameters:
productId- A Voucherify product ID or source ID. (required)force- If this flag is set to true, the product and all related SKUs will be removed permanently. If it is set to false or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same source_id. (optional)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteProductWithHttpInfo
public ApiResponse<Void> deleteProductWithHttpInfo(String productId, Boolean force) throws ApiException Delete Product Deletes a product and all related SKUs. This operation cannot be undone. If the force parameter is set to false or not set at all, the product and all related SKUs will be moved to the bin.- Parameters:
productId- A Voucherify product ID or source ID. (required)force- If this flag is set to true, the product and all related SKUs will be removed permanently. If it is set to false or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same source_id. (optional)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteProductAsync
public okhttp3.Call deleteProductAsync(String productId, Boolean force, ApiCallback<Void> _callback) throws ApiException Delete Product (asynchronously) Deletes a product and all related SKUs. This operation cannot be undone. If the force parameter is set to false or not set at all, the product and all related SKUs will be moved to the bin.- Parameters:
productId- A Voucherify product ID or source ID. (required)force- If this flag is set to true, the product and all related SKUs will be removed permanently. If it is set to false or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same source_id. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
deleteSkuCall
public okhttp3.Call deleteSkuCall(String productId, String skuId, Boolean force, ApiCallback _callback) throws ApiException Build call for deleteSku- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)force- If this flag is set to true, the SKU will be removed permanently. If it is set to false or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same source_id. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteSku
Delete SKU Deletes a product SKU. This operation cannot be undone. If the force parameter is set to false or not set at all, the SKU will be moved to the bin.- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)force- If this flag is set to true, the SKU will be removed permanently. If it is set to false or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same source_id. (optional)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteSkuWithHttpInfo
public ApiResponse<Void> deleteSkuWithHttpInfo(String productId, String skuId, Boolean force) throws ApiException Delete SKU Deletes a product SKU. This operation cannot be undone. If the force parameter is set to false or not set at all, the SKU will be moved to the bin.- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)force- If this flag is set to true, the SKU will be removed permanently. If it is set to false or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same source_id. (optional)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteSkuAsync
public okhttp3.Call deleteSkuAsync(String productId, String skuId, Boolean force, ApiCallback<Void> _callback) throws ApiException Delete SKU (asynchronously) Deletes a product SKU. This operation cannot be undone. If the force parameter is set to false or not set at all, the SKU will be moved to the bin.- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)force- If this flag is set to true, the SKU will be removed permanently. If it is set to false or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same source_id. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getProductCall
Build call for getProduct- Parameters:
productId- A Voucherify product ID or source ID. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getProduct
Get Product Retrieve product details.- Parameters:
productId- A Voucherify product ID or source ID. (required)- Returns:
- ProductsGetResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getProductWithHttpInfo
public ApiResponse<ProductsGetResponseBody> getProductWithHttpInfo(String productId) throws ApiException Get Product Retrieve product details.- Parameters:
productId- A Voucherify product ID or source ID. (required)- Returns:
- ApiResponse<ProductsGetResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getProductAsync
public okhttp3.Call getProductAsync(String productId, ApiCallback<ProductsGetResponseBody> _callback) throws ApiException Get Product (asynchronously) Retrieve product details.- Parameters:
productId- A Voucherify product ID or source ID. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getSkuCall
Build call for getSku- Parameters:
skuId- A Voucherify SKU identifier or SKU source ID. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getSku
Get SKU Retrieve details of a SKU.- Parameters:
skuId- A Voucherify SKU identifier or SKU source ID. (required)- Returns:
- SkusGetResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getSkuWithHttpInfo
Get SKU Retrieve details of a SKU.- Parameters:
skuId- A Voucherify SKU identifier or SKU source ID. (required)- Returns:
- ApiResponse<SkusGetResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getSkuAsync
public okhttp3.Call getSkuAsync(String skuId, ApiCallback<SkusGetResponseBody> _callback) throws ApiException Get SKU (asynchronously) Retrieve details of a SKU.- Parameters:
skuId- A Voucherify SKU identifier or SKU source ID. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
importProductsUsingCsvCall
public okhttp3.Call importProductsUsingCsvCall(File _file, ApiCallback _callback) throws ApiException Build call for importProductsUsingCsv- Parameters:
_file- File path. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
importProductsUsingCsv
Import Products using CSV Import products into the repository using a CSV file. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.- Parameters:
_file- File path. (optional)- Returns:
- ProductsImportCsvCreateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
importProductsUsingCsvWithHttpInfo
public ApiResponse<ProductsImportCsvCreateResponseBody> importProductsUsingCsvWithHttpInfo(File _file) throws ApiException Import Products using CSV Import products into the repository using a CSV file. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.- Parameters:
_file- File path. (optional)- Returns:
- ApiResponse<ProductsImportCsvCreateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
importProductsUsingCsvAsync
public okhttp3.Call importProductsUsingCsvAsync(File _file, ApiCallback<ProductsImportCsvCreateResponseBody> _callback) throws ApiException Import Products using CSV (asynchronously) Import products into the repository using a CSV file. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.- Parameters:
_file- File path. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
importSkusUsingCsvCall
Build call for importSkusUsingCsv- Parameters:
_file- File path. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
importSkusUsingCsv
Import SKUs using CSV Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.- Parameters:
_file- File path. (optional)- Returns:
- SkusImportCsvCreateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
importSkusUsingCsvWithHttpInfo
public ApiResponse<SkusImportCsvCreateResponseBody> importSkusUsingCsvWithHttpInfo(File _file) throws ApiException Import SKUs using CSV Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.- Parameters:
_file- File path. (optional)- Returns:
- ApiResponse<SkusImportCsvCreateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
importSkusUsingCsvAsync
public okhttp3.Call importSkusUsingCsvAsync(File _file, ApiCallback<SkusImportCsvCreateResponseBody> _callback) throws ApiException Import SKUs using CSV (asynchronously) Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.- Parameters:
_file- File path. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
listProductsCall
public okhttp3.Call listProductsCall(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback _callback) throws ApiException Build call for listProducts- Parameters:
limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listProducts
public ProductsListResponseBody listProducts(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) throws ApiException List Products Retrieve a list of products.- Parameters:
limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)- Returns:
- ProductsListResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listProductsWithHttpInfo
public ApiResponse<ProductsListResponseBody> listProductsWithHttpInfo(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) throws ApiException List Products Retrieve a list of products.- Parameters:
limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)- Returns:
- ApiResponse<ProductsListResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listProductsAsync
public okhttp3.Call listProductsAsync(Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback<ProductsListResponseBody> _callback) throws ApiException List Products (asynchronously) Retrieve a list of products.- Parameters:
limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
listSkusInProductCall
public okhttp3.Call listSkusInProductCall(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback _callback) throws ApiException Build call for listSkusInProduct- Parameters:
productId- A Voucherify product ID or product source ID. (required)limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listSkusInProduct
public ProductsSkusListResponseBody listSkusInProduct(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) throws ApiException List SKUs in Product Retrieve all SKUs for a given product.- Parameters:
productId- A Voucherify product ID or product source ID. (required)limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)- Returns:
- ProductsSkusListResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listSkusInProductWithHttpInfo
public ApiResponse<ProductsSkusListResponseBody> listSkusInProductWithHttpInfo(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate) throws ApiException List SKUs in Product Retrieve all SKUs for a given product.- Parameters:
productId- A Voucherify product ID or product source ID. (required)limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)- Returns:
- ApiResponse<ProductsSkusListResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listSkusInProductAsync
public okhttp3.Call listSkusInProductAsync(String productId, Integer limit, Integer page, ParameterOrder order, OffsetDateTime startDate, OffsetDateTime endDate, ApiCallback<ProductsSkusListResponseBody> _callback) throws ApiException List SKUs in Product (asynchronously) Retrieve all SKUs for a given product.- Parameters:
productId- A Voucherify product ID or product source ID. (required)limit- Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)page- Which page of results to return. The lowest value is 1. (optional)order- Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)startDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)endDate- Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateProductCall
public okhttp3.Call updateProductCall(String productId, ProductsUpdateRequestBody productsUpdateRequestBody, ApiCallback _callback) throws ApiException Build call for updateProduct- Parameters:
productId- A Voucherify product ID or source ID. (required)productsUpdateRequestBody- Specify the parameters of the product that are to be updated. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateProduct
public ProductsUpdateResponseBody updateProduct(String productId, ProductsUpdateRequestBody productsUpdateRequestBody) throws ApiException Update Product Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.- Parameters:
productId- A Voucherify product ID or source ID. (required)productsUpdateRequestBody- Specify the parameters of the product that are to be updated. (optional)- Returns:
- ProductsUpdateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateProductWithHttpInfo
public ApiResponse<ProductsUpdateResponseBody> updateProductWithHttpInfo(String productId, ProductsUpdateRequestBody productsUpdateRequestBody) throws ApiException Update Product Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.- Parameters:
productId- A Voucherify product ID or source ID. (required)productsUpdateRequestBody- Specify the parameters of the product that are to be updated. (optional)- Returns:
- ApiResponse<ProductsUpdateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateProductAsync
public okhttp3.Call updateProductAsync(String productId, ProductsUpdateRequestBody productsUpdateRequestBody, ApiCallback<ProductsUpdateResponseBody> _callback) throws ApiException Update Product (asynchronously) Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.- Parameters:
productId- A Voucherify product ID or source ID. (required)productsUpdateRequestBody- Specify the parameters of the product that are to be updated. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateProductsInBulkCall
public okhttp3.Call updateProductsInBulkCall(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody, ApiCallback _callback) throws ApiException Build call for updateProductsInBulk- Parameters:
productsUpdateInBulkRequestBody- List the product fields to be updated in each customer object. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateProductsInBulk
public ProductsUpdateInBulkResponseBody updateProductsInBulk(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody) throws ApiException Update Products in Bulk Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.- Parameters:
productsUpdateInBulkRequestBody- List the product fields to be updated in each customer object. (optional)- Returns:
- ProductsUpdateInBulkResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateProductsInBulkWithHttpInfo
public ApiResponse<ProductsUpdateInBulkResponseBody> updateProductsInBulkWithHttpInfo(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody) throws ApiException Update Products in Bulk Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.- Parameters:
productsUpdateInBulkRequestBody- List the product fields to be updated in each customer object. (optional)- Returns:
- ApiResponse<ProductsUpdateInBulkResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateProductsInBulkAsync
public okhttp3.Call updateProductsInBulkAsync(List<ProductsUpdateInBulkRequestBody> productsUpdateInBulkRequestBody, ApiCallback<ProductsUpdateInBulkResponseBody> _callback) throws ApiException Update Products in Bulk (asynchronously) Update products in one asynchronous operation. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.- Parameters:
productsUpdateInBulkRequestBody- List the product fields to be updated in each customer object. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateProductsMetadataInBulkCall
public okhttp3.Call updateProductsMetadataInBulkCall(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody, ApiCallback _callback) throws ApiException Build call for updateProductsMetadataInBulk- Parameters:
productsMetadataUpdateInBulkRequestBody- List the source_ids of the products you would like to update with the metadata key/value pairs. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateProductsMetadataInBulk
public ProductsMetadataUpdateInBulkResponseBody updateProductsMetadataInBulk(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody) throws ApiException Update Products' Metadata in Bulk Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.- Parameters:
productsMetadataUpdateInBulkRequestBody- List the source_ids of the products you would like to update with the metadata key/value pairs. (optional)- Returns:
- ProductsMetadataUpdateInBulkResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateProductsMetadataInBulkWithHttpInfo
public ApiResponse<ProductsMetadataUpdateInBulkResponseBody> updateProductsMetadataInBulkWithHttpInfo(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody) throws ApiException Update Products' Metadata in Bulk Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.- Parameters:
productsMetadataUpdateInBulkRequestBody- List the source_ids of the products you would like to update with the metadata key/value pairs. (optional)- Returns:
- ApiResponse<ProductsMetadataUpdateInBulkResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateProductsMetadataInBulkAsync
public okhttp3.Call updateProductsMetadataInBulkAsync(ProductsMetadataUpdateInBulkRequestBody productsMetadataUpdateInBulkRequestBody, ApiCallback<ProductsMetadataUpdateInBulkResponseBody> _callback) throws ApiException Update Products' Metadata in Bulk (asynchronously) Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request. The request can include up to **10 MB** of data. The response returns a unique asynchronous action ID. Use this ID in the query paramater of the GET Async Action endpoint to check, e.g.: - The status of your request (in queue, in progress, done, or failed) - Resources that failed to be updated - The report file with details about the update If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value false in the found column and true in the updated column. This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.- Parameters:
productsMetadataUpdateInBulkRequestBody- List the source_ids of the products you would like to update with the metadata key/value pairs. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateSkuCall
public okhttp3.Call updateSkuCall(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody, ApiCallback _callback) throws ApiException Build call for updateSku- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)productsSkusUpdateRequestBody- Specify the parameters to be updated. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateSku
public ProductsSkusUpdateResponseBody updateSku(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody) throws ApiException Update SKU Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body schema wont be modified. Even if provided, they will be silently skipped.- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)productsSkusUpdateRequestBody- Specify the parameters to be updated. (optional)- Returns:
- ProductsSkusUpdateResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateSkuWithHttpInfo
public ApiResponse<ProductsSkusUpdateResponseBody> updateSkuWithHttpInfo(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody) throws ApiException Update SKU Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body schema wont be modified. Even if provided, they will be silently skipped.- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)productsSkusUpdateRequestBody- Specify the parameters to be updated. (optional)- Returns:
- ApiResponse<ProductsSkusUpdateResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateSkuAsync
public okhttp3.Call updateSkuAsync(String productId, String skuId, ProductsSkusUpdateRequestBody productsSkusUpdateRequestBody, ApiCallback<ProductsSkusUpdateResponseBody> _callback) throws ApiException Update SKU (asynchronously) Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body schema wont be modified. Even if provided, they will be silently skipped.- Parameters:
productId- A unique Voucherify product ID or product source ID. (required)skuId- A Voucherify SKU ID or SKU source ID. (required)productsSkusUpdateRequestBody- Specify the parameters to be updated. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-