Class: VoucherifySdk::BinApi
- Inherits:
-
Object
- Object
- VoucherifySdk::BinApi
- Defined in:
- lib/VoucherifySdk/api/bin_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_bin_entry(bin_entry_id, opts = {}) ⇒ nil
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.
-
#initialize(api_client = ApiClient.default) ⇒ BinApi
constructor
A new instance of BinApi.
-
#list_bin_entries(opts = {}) ⇒ TrashBinListResponseBody
List Bin Entries Retrieves a list of resources moved to the bin.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BinApi
Returns a new instance of BinApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/bin_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/VoucherifySdk/api/bin_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_bin_entry(bin_entry_id, opts = {}) ⇒ nil
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.
27 28 29 30 |
# File 'lib/VoucherifySdk/api/bin_api.rb', line 27 def delete_bin_entry(bin_entry_id, opts = {}) delete_bin_entry_with_http_info(bin_entry_id, opts) nil end |
#list_bin_entries(opts = {}) ⇒ TrashBinListResponseBody
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
87 88 89 90 |
# File 'lib/VoucherifySdk/api/bin_api.rb', line 87 def list_bin_entries(opts = {}) data, _status_code, _headers = list_bin_entries_with_http_info(opts) data end |