Class: VoucherifySdk::AsyncActionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/VoucherifySdk/api/async_actions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AsyncActionsApi

Returns a new instance of AsyncActionsApi.



19
20
21
# File 'lib/VoucherifySdk/api/async_actions_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/VoucherifySdk/api/async_actions_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_async_action(async_action_id, opts = {}) ⇒ AsyncActionGetResponseBody

Get Async Action Check the result of a scheduled asynchronous operation. The table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](support.voucherify.io/article/574-data-import).

Parameters:

  • async_action_id (String)

    Unique ID of the asynchronous operation.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/VoucherifySdk/api/async_actions_api.rb', line 27

def get_async_action(async_action_id, opts = {})
  data, _status_code, _headers = get_async_action_with_http_info(async_action_id, opts)
  data
end

#list_async_actions(opts = {}) ⇒ AsyncActionsListResponseBody

List Async Actions Track asynchronous operations scheduled in your project. The table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](support.voucherify.io/article/574-data-import).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limit the number of asynchronous actions that the API returns in the response.

  • :end_date (Time)

    Limits results to actions scheduled before the end_date. The date format needs to be consistent with ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16).

Returns:



87
88
89
90
# File 'lib/VoucherifySdk/api/async_actions_api.rb', line 87

def list_async_actions(opts = {})
  data, _status_code, _headers = list_async_actions_with_http_info(opts)
  data
end