Class: VoucherifySdk::ExportsApi
- Inherits:
-
Object
- Object
- VoucherifySdk::ExportsApi
- Defined in:
- lib/VoucherifySdk/api/exports_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_export(opts = {}) ⇒ ExportsCreateResponseBody
Create Export Create export object.
-
#delete_export(export_id, opts = {}) ⇒ nil
Delete Export This method deletes a previously created export object.
-
#download_export(export_id, opts = {}) ⇒ String
Download Export Download the contents of the exported CSV file.
-
#get_export(export_id, opts = {}) ⇒ ExportsGetResponseBody
Get Export Retrieves the URL of the downloadable file, which was generated via the Create Export method.
-
#initialize(api_client = ApiClient.default) ⇒ ExportsApi
constructor
A new instance of ExportsApi.
-
#list_exports(opts = {}) ⇒ ExportsListResponseBody
List Exports List all exports.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ExportsApi
Returns a new instance of ExportsApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/exports_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/exports_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_export(opts = {}) ⇒ ExportsCreateResponseBody
Create Export Create export object. The export can be any of the following types: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions. # Defaults If you only specify the object type in the request body without specifying the fields, the API will return the following fields per export object: # Fetching particular data sets Using the parameters body parameter, you can narrow down which fields to export and how to filter the results. The fields are an array of strings containing the data that you would like to export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: # Orders # Vouchers # Publications # Redemptions # Customers # Points Expirations # Gift Card Transactions # Loyalty Card Transactions
27 28 29 30 |
# File 'lib/VoucherifySdk/api/exports_api.rb', line 27 def create_export(opts = {}) data, _status_code, _headers = create_export_with_http_info(opts) data end |
#delete_export(export_id, opts = {}) ⇒ nil
Delete Export This method deletes a previously created export object.
91 92 93 94 |
# File 'lib/VoucherifySdk/api/exports_api.rb', line 91 def delete_export(export_id, opts = {}) delete_export_with_http_info(export_id, opts) nil end |
#download_export(export_id, opts = {}) ⇒ String
Download Export Download the contents of the exported CSV file. 📘 Important notes **Base URL:** - download.voucherify.io (Europe) - us1.download.voucherify.io (US) - as1.download.voucherify.io (Asia) Token: Can be found within the result parameter of the Get Export method response.
149 150 151 152 |
# File 'lib/VoucherifySdk/api/exports_api.rb', line 149 def download_export(export_id, opts = {}) data, _status_code, _headers = download_export_with_http_info(export_id, opts) data end |
#get_export(export_id, opts = {}) ⇒ ExportsGetResponseBody
Get Export Retrieves the URL of the downloadable file, which was generated via the Create Export method.
210 211 212 213 |
# File 'lib/VoucherifySdk/api/exports_api.rb', line 210 def get_export(export_id, opts = {}) data, _status_code, _headers = get_export_with_http_info(export_id, opts) data end |
#list_exports(opts = {}) ⇒ ExportsListResponseBody
List Exports List all exports.
271 272 273 274 |
# File 'lib/VoucherifySdk/api/exports_api.rb', line 271 def list_exports(opts = {}) data, _status_code, _headers = list_exports_with_http_info(opts) data end |