Package io.voucherify.client.api
Class BinApi
java.lang.Object
io.voucherify.client.api.BinApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteBinEntry(String binEntryId) Delete Bin Entry Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.okhttp3.CalldeleteBinEntryAsync(String binEntryId, ApiCallback<Void> _callback) Delete Bin Entry (asynchronously) Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.okhttp3.CalldeleteBinEntryCall(String binEntryId, ApiCallback _callback) Build call for deleteBinEntrydeleteBinEntryWithHttpInfo(String binEntryId) Delete Bin Entry Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.intlistBinEntries(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters) List Bin Entries Retrieves a list of resources moved to the bin.okhttp3.CalllistBinEntriesAsync(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters, ApiCallback<TrashBinListResponseBody> _callback) List Bin Entries (asynchronously) Retrieves a list of resources moved to the bin.okhttp3.CalllistBinEntriesCall(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters, ApiCallback _callback) Build call for listBinEntrieslistBinEntriesWithHttpInfo(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters) List Bin Entries Retrieves a list of resources moved to the bin.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
BinApi
public BinApi() -
BinApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
deleteBinEntryCall
public okhttp3.Call deleteBinEntryCall(String binEntryId, ApiCallback _callback) throws ApiException Build call for deleteBinEntry- Parameters:
binEntryId- Provide the unique identifier of the bin entry. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteBinEntry
Delete Bin Entry Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.- Parameters:
binEntryId- Provide the unique identifier of the bin entry. (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteBinEntryWithHttpInfo
Delete Bin Entry Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.- Parameters:
binEntryId- Provide the unique identifier of the bin entry. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteBinEntryAsync
public okhttp3.Call deleteBinEntryAsync(String binEntryId, ApiCallback<Void> _callback) throws ApiException Delete Bin Entry (asynchronously) Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU.- Parameters:
binEntryId- Provide the unique identifier of the bin entry. (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
-
listBinEntriesCall
public okhttp3.Call listBinEntriesCall(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters, ApiCallback _callback) throws ApiException Build call for listBinEntries- 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)order- Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. (optional)startingAfterId- A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)filters- Filters for listing bin entries. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listBinEntries
public TrashBinListResponseBody listBinEntries(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters) throws ApiException List Bin Entries Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read- 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)order- Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. (optional)startingAfterId- A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)filters- Filters for listing bin entries. (optional)- Returns:
- TrashBinListResponseBody
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listBinEntriesWithHttpInfo
public ApiResponse<TrashBinListResponseBody> listBinEntriesWithHttpInfo(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters) throws ApiException List Bin Entries Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read- 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)order- Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. (optional)startingAfterId- A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)filters- Filters for listing bin entries. (optional)- Returns:
- ApiResponse<TrashBinListResponseBody>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listBinEntriesAsync
public okhttp3.Call listBinEntriesAsync(Integer limit, ParameterOrderListBin order, String startingAfterId, ParameterFiltersListBin filters, ApiCallback<TrashBinListResponseBody> _callback) throws ApiException List Bin Entries (asynchronously) Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read- 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)order- Orders the bin entries according the date and time when they were moved to the bin or according to the bin entry ID. The dash - preceding a sorting option means sorting in a descending order. (optional)startingAfterId- A cursor for pagination. It retrieves the events starting after an event with the given ID. (optional)filters- Filters for listing bin entries. (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
-