Class: Trulioo::ConnectionApi

Inherits:
Object
  • Object
show all
Defined in:
lib/trulioo_sdk/api/connection_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConnectionApi



15
16
17
# File 'lib/trulioo_sdk/api/connection_api.rb', line 15

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/trulioo_sdk/api/connection_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#connection_async_callback_url(mode, transaction_status, opts = {}) ⇒ Object

Connection Async Callback Url If set, the transaction will run asynchronously and Trulioo will try to update the client with transaction state updates until completed. If callback is not desired but the client wants to initiate an asynchronous transaction, provide https://api.globaldatacompany.com/connection/v1/async-callback as the Callback URL.



24
25
26
27
# File 'lib/trulioo_sdk/api/connection_api.rb', line 24

def connection_async_callback_url(mode, transaction_status, opts = {})
  data, _status_code, _headers = connection_async_callback_url_with_http_info(mode, transaction_status, opts)
  data
end

#connection_async_callback_url_with_http_info(mode, transaction_status, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Connection Async Callback Url If set, the transaction will run asynchronously and Trulioo will try to update the client with transaction state updates until completed. If callback is not desired but the client wants to initiate an asynchronous transaction, provide https://api.globaldatacompany.com/connection/v1/async-callback as the Callback URL.



35
36
37
38
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
80
81
82
83
84
85
86
87
# File 'lib/trulioo_sdk/api/connection_api.rb', line 35

def connection_async_callback_url_with_http_info(mode, transaction_status, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionApi.connection_async_callback_url ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling ConnectionApi.connection_async_callback_url"
  end
  # verify the required parameter 'transaction_status' is set
  if @api_client.config.client_side_validation && transaction_status.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_status' when calling ConnectionApi.connection_async_callback_url"
  end
  # resource path
  local_var_path = '/{mode}/connection/v1/async-callback'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20'))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(transaction_status)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"ConnectionApi.connection_async_callback_url",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectionApi#connection_async_callback_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#say_hello(mode, name, opts = {}) ⇒ String

Say Hello This method enables you to check if your system can connect to our system. You can even use a web browser to verify a connection to our system. Applied a maximum length for the name parameter of 100 via a route constraint



95
96
97
98
# File 'lib/trulioo_sdk/api/connection_api.rb', line 95

def say_hello(mode, name, opts = {})
  data, _status_code, _headers = say_hello_with_http_info(mode, name, opts)
  data
end

#say_hello_with_http_info(mode, name, opts = {}) ⇒ Array<(String, Integer, Hash)>

Say Hello This method enables you to check if your system can connect to our system. You can even use a web browser to verify a connection to our system. Applied a maximum length for the name parameter of 100 via a route constraint



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
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/trulioo_sdk/api/connection_api.rb', line 106

def say_hello_with_http_info(mode, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionApi.say_hello ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling ConnectionApi.say_hello"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling ConnectionApi.say_hello"
  end
  # resource path
  local_var_path = '/{mode}/connection/v1/sayhello/{name}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('+', '%20'))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"ConnectionApi.say_hello",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectionApi#say_hello\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#test_authentication(mode, opts = {}) ⇒ String

Test Authentication This method enables you to check if your credentials are valid. You will need to use basic authentication to ensure a successful response.



163
164
165
166
# File 'lib/trulioo_sdk/api/connection_api.rb', line 163

def test_authentication(mode, opts = {})
  data, _status_code, _headers = test_authentication_with_http_info(mode, opts)
  data
end

#test_authentication_with_http_info(mode, opts = {}) ⇒ Array<(String, Integer, Hash)>

Test Authentication This method enables you to check if your credentials are valid. You will need to use basic authentication to ensure a successful response.



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
210
211
212
213
214
215
216
217
218
219
# File 'lib/trulioo_sdk/api/connection_api.rb', line 173

def test_authentication_with_http_info(mode, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionApi.test_authentication ...'
  end
  # verify the required parameter 'mode' is set
  if @api_client.config.client_side_validation && mode.nil?
    fail ArgumentError, "Missing the required parameter 'mode' when calling ConnectionApi.test_authentication"
  end
  # resource path
  local_var_path = '/{mode}/connection/v1/testauthentication'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20'))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"ConnectionApi.test_authentication",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConnectionApi#test_authentication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end