class IntegrationApi::AsyncApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/integration_api/api/async_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_async_data(integration_type, service, opts = {}) click to toggle source

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data @param integration_type String integration_type @param service String service @param [Hash] opts the optional parameters @return [AsyncTransaction]

# File lib/integration_api/api/async_api.rb, line 28
def get_async_data(integration_type, service, opts = {})
  data, _status_code, _headers = get_async_data_with_http_info(integration_type, service, opts)
  data
end
get_async_data_bulk_using_post(data, integration_type, service, opts = {}) click to toggle source

Create async transaction for POST endpoints for bulk data Create async transaction for POST endpoints for bulk data @param data data @param integration_type String integration_type @param service String service @param [Hash] opts the optional parameters @return [AsyncTransaction]

# File lib/integration_api/api/async_api.rb, line 87
def get_async_data_bulk_using_post(data, integration_type, service, opts = {})
  data, _status_code, _headers = get_async_data_bulk_using_post_with_http_info(data, integration_type, service, opts)
  data
end
get_async_data_bulk_using_post_with_http_info(data, integration_type, service, opts = {}) click to toggle source

Create async transaction for POST endpoints for bulk data Create async transaction for POST endpoints for bulk data @param data data @param integration_type String integration_type @param service String service @param [Hash] opts the optional parameters @return [Array<(AsyncTransaction, Fixnum, Hash)>] AsyncTransaction data, response status code and response headers

# File lib/integration_api/api/async_api.rb, line 99
def get_async_data_bulk_using_post_with_http_info(data, integration_type, service, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AsyncApi.get_async_data_bulk_using_post ...'
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling AsyncApi.get_async_data_bulk_using_post"
  end
  # verify the required parameter 'integration_type' is set
  if @api_client.config.client_side_validation && integration_type.nil?
    fail ArgumentError, "Missing the required parameter 'integration_type' when calling AsyncApi.get_async_data_bulk_using_post"
  end
  # verify the required parameter 'service' is set
  if @api_client.config.client_side_validation && service.nil?
    fail ArgumentError, "Missing the required parameter 'service' when calling AsyncApi.get_async_data_bulk_using_post"
  end
  # resource path
  local_var_path = '/async/{integration_type}/{service}'.sub('{' + 'integration_type' + '}', integration_type.to_s).sub('{' + 'service' + '}', service.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsyncTransaction')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AsyncApi#get_async_data_bulk_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_async_data_by_id(id, integration_type, service, opts = {}) click to toggle source

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data @param id UUID id @param integration_type String integration_type @param service String service @param [Hash] opts the optional parameters @return [AsyncTransaction]

# File lib/integration_api/api/async_api.rb, line 153
def get_async_data_by_id(id, integration_type, service, opts = {})
  data, _status_code, _headers = get_async_data_by_id_with_http_info(id, integration_type, service, opts)
  data
end
get_async_data_by_id_with_http_info(id, integration_type, service, opts = {}) click to toggle source

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data @param id UUID id @param integration_type String integration_type @param service String service @param [Hash] opts the optional parameters @return [Array<(AsyncTransaction, Fixnum, Hash)>] AsyncTransaction data, response status code and response headers

# File lib/integration_api/api/async_api.rb, line 165
def get_async_data_by_id_with_http_info(id, integration_type, service, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AsyncApi.get_async_data_by_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AsyncApi.get_async_data_by_id"
  end
  # verify the required parameter 'integration_type' is set
  if @api_client.config.client_side_validation && integration_type.nil?
    fail ArgumentError, "Missing the required parameter 'integration_type' when calling AsyncApi.get_async_data_by_id"
  end
  # verify the required parameter 'service' is set
  if @api_client.config.client_side_validation && service.nil?
    fail ArgumentError, "Missing the required parameter 'service' when calling AsyncApi.get_async_data_by_id"
  end
  # resource path
  local_var_path = '/async/{integration_type}/{service}/{id}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'integration_type' + '}', integration_type.to_s).sub('{' + 'service' + '}', service.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsyncTransaction')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AsyncApi#get_async_data_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_async_data_with_http_info(integration_type, service, opts = {}) click to toggle source

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data @param integration_type String integration_type @param service String service @param [Hash] opts the optional parameters @return [Array<(AsyncTransaction, Fixnum, Hash)>] AsyncTransaction data, response status code and response headers

# File lib/integration_api/api/async_api.rb, line 39
def get_async_data_with_http_info(integration_type, service, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AsyncApi.get_async_data ...'
  end
  # verify the required parameter 'integration_type' is set
  if @api_client.config.client_side_validation && integration_type.nil?
    fail ArgumentError, "Missing the required parameter 'integration_type' when calling AsyncApi.get_async_data"
  end
  # verify the required parameter 'service' is set
  if @api_client.config.client_side_validation && service.nil?
    fail ArgumentError, "Missing the required parameter 'service' when calling AsyncApi.get_async_data"
  end
  # resource path
  local_var_path = '/async/{integration_type}/{service}'.sub('{' + 'integration_type' + '}', integration_type.to_s).sub('{' + 'service' + '}', service.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsyncTransaction')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AsyncApi#get_async_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_async_status(id, opts = {}) click to toggle source

Get Status of async transaction created through GET/POST endpoints Get Status of async transaction created through GET/POST endpoints @param id UUID Async Transaction Id @param [Hash] opts the optional parameters @return [AsyncTransactionVO]

# File lib/integration_api/api/async_api.rb, line 215
def get_async_status(id, opts = {})
  data, _status_code, _headers = get_async_status_with_http_info(id, opts)
  data
end
get_async_status_with_http_info(id, opts = {}) click to toggle source

Get Status of async transaction created through GET/POST endpoints Get Status of async transaction created through GET/POST endpoints @param id UUID Async Transaction Id @param [Hash] opts the optional parameters @return [Array<(AsyncTransactionVO, Fixnum, Hash)>] AsyncTransactionVO data, response status code and response headers

# File lib/integration_api/api/async_api.rb, line 225
def get_async_status_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AsyncApi.get_async_status ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AsyncApi.get_async_status"
  end
  # resource path
  local_var_path = '/async/status/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsyncTransactionVO')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AsyncApi#get_async_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end