Class: IntegrationApi::AsyncApi

Inherits:
Object
  • Object
show all
Defined in:
lib/integration_api/api/async_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AsyncApi

Returns a new instance of AsyncApi.



19
20
21
# File 'lib/integration_api/api/async_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/integration_api/api/async_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_async_data(integration_type, service, opts = {}) ⇒ AsyncTransaction

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data

Parameters:

  • integration_type

    String integration_type

  • service

    String service

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

    the optional parameters

Returns:



28
29
30
31
# 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 = {}) ⇒ AsyncTransaction

Create async transaction for POST endpoints for bulk data Create async transaction for POST endpoints for bulk data

Parameters:

  • data

    data

  • integration_type

    String integration_type

  • service

    String service

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

    the optional parameters

Returns:



87
88
89
90
# 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 = {}) ⇒ Array<(AsyncTransaction, Fixnum, Hash)>

Create async transaction for POST endpoints for bulk data Create async transaction for POST endpoints for bulk data

Parameters:

  • data

    data

  • integration_type

    String integration_type

  • service

    String service

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

    the optional parameters

Returns:

  • (Array<(AsyncTransaction, Fixnum, Hash)>)

    AsyncTransaction data, response status code and response headers



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# 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 = {}) ⇒ AsyncTransaction

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data

Parameters:

  • id

    UUID id

  • integration_type

    String integration_type

  • service

    String service

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

    the optional parameters

Returns:



153
154
155
156
# 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 = {}) ⇒ Array<(AsyncTransaction, Fixnum, Hash)>

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data

Parameters:

  • id

    UUID id

  • integration_type

    String integration_type

  • service

    String service

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

    the optional parameters

Returns:

  • (Array<(AsyncTransaction, Fixnum, Hash)>)

    AsyncTransaction data, response status code and response headers



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# 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 = {}) ⇒ Array<(AsyncTransaction, Fixnum, Hash)>

Create async transaction for GET endpoints for bulk data Create async transaction for GET endpoints for bulk data

Parameters:

  • integration_type

    String integration_type

  • service

    String service

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

    the optional parameters

Returns:

  • (Array<(AsyncTransaction, Fixnum, Hash)>)

    AsyncTransaction data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# 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 = {}) ⇒ AsyncTransactionVO

Get Status of async transaction created through GET/POST endpoints Get Status of async transaction created through GET/POST endpoints

Parameters:

  • id

    UUID Async Transaction Id

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

    the optional parameters

Returns:



215
216
217
218
# 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 = {}) ⇒ Array<(AsyncTransactionVO, Fixnum, Hash)>

Get Status of async transaction created through GET/POST endpoints Get Status of async transaction created through GET/POST endpoints

Parameters:

  • id

    UUID Async Transaction Id

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

    the optional parameters

Returns:

  • (Array<(AsyncTransactionVO, Fixnum, Hash)>)

    AsyncTransactionVO data, response status code and response headers



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# 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