trulioo_sdk 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +155 -0
  3. data/docs/Address.md +44 -0
  4. data/docs/AppendedField.md +20 -0
  5. data/docs/Business.md +36 -0
  6. data/docs/BusinessApi.md +155 -0
  7. data/docs/BusinessRecord.md +24 -0
  8. data/docs/BusinessRegistrationNumber.md +30 -0
  9. data/docs/BusinessRegistrationNumberMask.md +22 -0
  10. data/docs/BusinessResult.md +22 -0
  11. data/docs/BusinessSearchRequest.md +28 -0
  12. data/docs/BusinessSearchRequestBusinessSearchModel.md +26 -0
  13. data/docs/BusinessSearchResponse.md +28 -0
  14. data/docs/BusinessSearchResponseIndustryCode.md +20 -0
  15. data/docs/Communication.md +24 -0
  16. data/docs/ConfigurationApi.md +761 -0
  17. data/docs/ConnectionApi.md +213 -0
  18. data/docs/Consent.md +22 -0
  19. data/docs/CountrySubdivision.md +22 -0
  20. data/docs/DataField.md +22 -0
  21. data/docs/DataFields.md +34 -0
  22. data/docs/DatasourceField.md +24 -0
  23. data/docs/DatasourceResult.md +28 -0
  24. data/docs/Document.md +28 -0
  25. data/docs/DriverLicence.md +26 -0
  26. data/docs/Location.md +42 -0
  27. data/docs/LocationAdditionalFields.md +18 -0
  28. data/docs/NationalId.md +28 -0
  29. data/docs/NormalizedDatasourceField.md +20 -0
  30. data/docs/NormalizedDatasourceGroupCountry.md +34 -0
  31. data/docs/Passport.md +28 -0
  32. data/docs/PersonInfo.md +38 -0
  33. data/docs/PersonInfoAdditionalFields.md +18 -0
  34. data/docs/Record.md +26 -0
  35. data/docs/RecordRule.md +20 -0
  36. data/docs/Result.md +62 -0
  37. data/docs/ServiceError.md +20 -0
  38. data/docs/TestEntityDataFields.md +36 -0
  39. data/docs/TransactionRecordResult.md +32 -0
  40. data/docs/TransactionRecordResultAllOf.md +18 -0
  41. data/docs/TransactionStatus.md +26 -0
  42. data/docs/VerificationsApi.md +529 -0
  43. data/docs/VerifyRequest.md +38 -0
  44. data/docs/VerifyResult.md +30 -0
  45. data/lib/trulioo_sdk.rb +77 -0
  46. data/lib/trulioo_sdk/api/business_api.rb +158 -0
  47. data/lib/trulioo_sdk/api/configuration_api.rb +750 -0
  48. data/lib/trulioo_sdk/api/connection_api.rb +221 -0
  49. data/lib/trulioo_sdk/api/verifications_api.rb +515 -0
  50. data/lib/trulioo_sdk/api_client.rb +391 -0
  51. data/lib/trulioo_sdk/api_error.rb +53 -0
  52. data/lib/trulioo_sdk/configuration.rb +268 -0
  53. data/lib/trulioo_sdk/models/address.rb +356 -0
  54. data/lib/trulioo_sdk/models/appended_field.rb +237 -0
  55. data/lib/trulioo_sdk/models/business.rb +318 -0
  56. data/lib/trulioo_sdk/models/business_record.rb +261 -0
  57. data/lib/trulioo_sdk/models/business_registration_number.rb +410 -0
  58. data/lib/trulioo_sdk/models/business_registration_number_mask.rb +272 -0
  59. data/lib/trulioo_sdk/models/business_result.rb +249 -0
  60. data/lib/trulioo_sdk/models/business_search_request.rb +306 -0
  61. data/lib/trulioo_sdk/models/business_search_request_business_search_model.rb +364 -0
  62. data/lib/trulioo_sdk/models/business_search_response.rb +279 -0
  63. data/lib/trulioo_sdk/models/business_search_response_industry_code.rb +236 -0
  64. data/lib/trulioo_sdk/models/communication.rb +354 -0
  65. data/lib/trulioo_sdk/models/consent.rb +249 -0
  66. data/lib/trulioo_sdk/models/country_subdivision.rb +320 -0
  67. data/lib/trulioo_sdk/models/data_field.rb +245 -0
  68. data/lib/trulioo_sdk/models/data_fields.rb +306 -0
  69. data/lib/trulioo_sdk/models/datasource_field.rb +254 -0
  70. data/lib/trulioo_sdk/models/datasource_result.rb +281 -0
  71. data/lib/trulioo_sdk/models/document.rb +278 -0
  72. data/lib/trulioo_sdk/models/driver_licence.rb +268 -0
  73. data/lib/trulioo_sdk/models/location.rb +347 -0
  74. data/lib/trulioo_sdk/models/location_additional_fields.rb +229 -0
  75. data/lib/trulioo_sdk/models/national_id.rb +277 -0
  76. data/lib/trulioo_sdk/models/normalized_datasource_field.rb +286 -0
  77. data/lib/trulioo_sdk/models/normalized_datasource_group_country.rb +437 -0
  78. data/lib/trulioo_sdk/models/passport.rb +326 -0
  79. data/lib/trulioo_sdk/models/person_info.rb +448 -0
  80. data/lib/trulioo_sdk/models/person_info_additional_fields.rb +228 -0
  81. data/lib/trulioo_sdk/models/record.rb +270 -0
  82. data/lib/trulioo_sdk/models/record_rule.rb +239 -0
  83. data/lib/trulioo_sdk/models/result.rb +440 -0
  84. data/lib/trulioo_sdk/models/service_error.rb +236 -0
  85. data/lib/trulioo_sdk/models/test_entity_data_fields.rb +315 -0
  86. data/lib/trulioo_sdk/models/transaction_record_result.rb +307 -0
  87. data/lib/trulioo_sdk/models/transaction_record_result_all_of.rb +229 -0
  88. data/lib/trulioo_sdk/models/transaction_status.rb +341 -0
  89. data/lib/trulioo_sdk/models/verify_request.rb +410 -0
  90. data/lib/trulioo_sdk/models/verify_result.rb +288 -0
  91. data/lib/trulioo_sdk/version.rb +11 -0
  92. metadata +223 -0
@@ -0,0 +1,221 @@
1
+ =begin
2
+ Trulioo Ruby SDK
3
+
4
+ Gem version: 1.0.3
5
+ Trulioo OpenAPI version: v1
6
+ Generated by OpenAPI Generator version: 5.0.1
7
+ =end
8
+
9
+ require 'cgi'
10
+
11
+ module Trulioo
12
+ class ConnectionApi
13
+ attr_accessor :api_client
14
+
15
+ def initialize(api_client = ApiClient.default)
16
+ @api_client = api_client
17
+ end
18
+ # Connection Async Callback Url
19
+ # 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.
20
+ # @param mode [String] trial or live
21
+ # @param transaction_status [TransactionStatus] transactionStatus
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [Object]
24
+ def connection_async_callback_url(mode, transaction_status, opts = {})
25
+ data, _status_code, _headers = connection_async_callback_url_with_http_info(mode, transaction_status, opts)
26
+ data
27
+ end
28
+
29
+ # Connection Async Callback Url
30
+ # 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.
31
+ # @param mode [String] trial or live
32
+ # @param transaction_status [TransactionStatus] transactionStatus
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
35
+ def connection_async_callback_url_with_http_info(mode, transaction_status, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ConnectionApi.connection_async_callback_url ...'
38
+ end
39
+ # verify the required parameter 'mode' is set
40
+ if @api_client.config.client_side_validation && mode.nil?
41
+ fail ArgumentError, "Missing the required parameter 'mode' when calling ConnectionApi.connection_async_callback_url"
42
+ end
43
+ # verify the required parameter 'transaction_status' is set
44
+ if @api_client.config.client_side_validation && transaction_status.nil?
45
+ fail ArgumentError, "Missing the required parameter 'transaction_status' when calling ConnectionApi.connection_async_callback_url"
46
+ end
47
+ # resource path
48
+ local_var_path = '/{mode}/connection/v1/async-callback'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20'))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(transaction_status)
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'Object'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || []
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"ConnectionApi.connection_async_callback_url",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: ConnectionApi#connection_async_callback_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Say Hello
90
+ # 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
91
+ # @param mode [String] trial or live
92
+ # @param name [String] Name to be returned in the response
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [String]
95
+ def say_hello(mode, name, opts = {})
96
+ data, _status_code, _headers = say_hello_with_http_info(mode, name, opts)
97
+ data
98
+ end
99
+
100
+ # Say Hello
101
+ # 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
102
+ # @param mode [String] trial or live
103
+ # @param name [String] Name to be returned in the response
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
106
+ def say_hello_with_http_info(mode, name, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug 'Calling API: ConnectionApi.say_hello ...'
109
+ end
110
+ # verify the required parameter 'mode' is set
111
+ if @api_client.config.client_side_validation && mode.nil?
112
+ fail ArgumentError, "Missing the required parameter 'mode' when calling ConnectionApi.say_hello"
113
+ end
114
+ # verify the required parameter 'name' is set
115
+ if @api_client.config.client_side_validation && name.nil?
116
+ fail ArgumentError, "Missing the required parameter 'name' when calling ConnectionApi.say_hello"
117
+ end
118
+ # resource path
119
+ 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'))
120
+
121
+ # query parameters
122
+ query_params = opts[:query_params] || {}
123
+
124
+ # header parameters
125
+ header_params = opts[:header_params] || {}
126
+ # HTTP header 'Accept' (if needed)
127
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body]
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'String'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || []
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"ConnectionApi.say_hello",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: ConnectionApi#say_hello\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Test Authentication
159
+ # This method enables you to check if your credentials are valid. You will need to use basic authentication to ensure a successful response.
160
+ # @param mode [String] trial or live
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [String]
163
+ def test_authentication(mode, opts = {})
164
+ data, _status_code, _headers = test_authentication_with_http_info(mode, opts)
165
+ data
166
+ end
167
+
168
+ # Test Authentication
169
+ # This method enables you to check if your credentials are valid. You will need to use basic authentication to ensure a successful response.
170
+ # @param mode [String] trial or live
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
173
+ def test_authentication_with_http_info(mode, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: ConnectionApi.test_authentication ...'
176
+ end
177
+ # verify the required parameter 'mode' is set
178
+ if @api_client.config.client_side_validation && mode.nil?
179
+ fail ArgumentError, "Missing the required parameter 'mode' when calling ConnectionApi.test_authentication"
180
+ end
181
+ # resource path
182
+ local_var_path = '/{mode}/connection/v1/testauthentication'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20'))
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:debug_body]
197
+
198
+ # return_type
199
+ return_type = opts[:debug_return_type] || 'String'
200
+
201
+ # auth_names
202
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
203
+
204
+ new_options = opts.merge(
205
+ :operation => :"ConnectionApi.test_authentication",
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => return_type
212
+ )
213
+
214
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: ConnectionApi#test_authentication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+ end
221
+ end
@@ -0,0 +1,515 @@
1
+ =begin
2
+ Trulioo Ruby SDK
3
+
4
+ Gem version: 1.0.3
5
+ Trulioo OpenAPI version: v1
6
+ Generated by OpenAPI Generator version: 5.0.1
7
+ =end
8
+
9
+ require 'cgi'
10
+
11
+ module Trulioo
12
+ class VerificationsApi
13
+ attr_accessor :api_client
14
+
15
+ def initialize(api_client = ApiClient.default)
16
+ @api_client = api_client
17
+ end
18
+ # Document Download
19
+ # Download Document
20
+ # @param mode [String] trial or live
21
+ # @param transaction_record_id [String] id of the transactionrecord, this will be a GUID
22
+ # @param field_name [String] document field name
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [Object]
25
+ def document_download(mode, transaction_record_id, field_name, opts = {})
26
+ data, _status_code, _headers = document_download_with_http_info(mode, transaction_record_id, field_name, opts)
27
+ data
28
+ end
29
+
30
+ # Document Download
31
+ # Download Document
32
+ # @param mode [String] trial or live
33
+ # @param transaction_record_id [String] id of the transactionrecord, this will be a GUID
34
+ # @param field_name [String] document field name
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
37
+ def document_download_with_http_info(mode, transaction_record_id, field_name, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.document_download ...'
40
+ end
41
+ # verify the required parameter 'mode' is set
42
+ if @api_client.config.client_side_validation && mode.nil?
43
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.document_download"
44
+ end
45
+ # verify the required parameter 'transaction_record_id' is set
46
+ if @api_client.config.client_side_validation && transaction_record_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'transaction_record_id' when calling VerificationsApi.document_download"
48
+ end
49
+ # verify the required parameter 'field_name' is set
50
+ if @api_client.config.client_side_validation && field_name.nil?
51
+ fail ArgumentError, "Missing the required parameter 'field_name' when calling VerificationsApi.document_download"
52
+ end
53
+ # resource path
54
+ local_var_path = '/{mode}/verifications/v1/documentdownload/{transactionRecordId}/{fieldName}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'transactionRecordId' + '}', CGI.escape(transaction_record_id.to_s).gsub('+', '%20')).sub('{' + 'fieldName' + '}', CGI.escape(field_name.to_s).gsub('+', '%20'))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body]
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'Object'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"VerificationsApi.document_download",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: VerificationsApi#document_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Get Transaction Record
94
+ # This method is used to retrieve the request and results of a verification performed using the verify method. The response for this method includes the same information as verify method's response, along with data present in the input fields of the verify request.
95
+ # @param mode [String] trial or live
96
+ # @param id [String] id of the transactionrecord, this will be a GUID
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [TransactionRecordResult]
99
+ def get_transaction_record(mode, id, opts = {})
100
+ data, _status_code, _headers = get_transaction_record_with_http_info(mode, id, opts)
101
+ data
102
+ end
103
+
104
+ # Get Transaction Record
105
+ # This method is used to retrieve the request and results of a verification performed using the verify method. The response for this method includes the same information as verify method&#39;s response, along with data present in the input fields of the verify request.
106
+ # @param mode [String] trial or live
107
+ # @param id [String] id of the transactionrecord, this will be a GUID
108
+ # @param [Hash] opts the optional parameters
109
+ # @return [Array<(TransactionRecordResult, Integer, Hash)>] TransactionRecordResult data, response status code and response headers
110
+ def get_transaction_record_with_http_info(mode, id, opts = {})
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record ...'
113
+ end
114
+ # verify the required parameter 'mode' is set
115
+ if @api_client.config.client_side_validation && mode.nil?
116
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record"
117
+ end
118
+ # verify the required parameter 'id' is set
119
+ if @api_client.config.client_side_validation && id.nil?
120
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.get_transaction_record"
121
+ end
122
+ # resource path
123
+ local_var_path = '/{mode}/verifications/v1/transactionrecord/{id}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))
124
+
125
+ # query parameters
126
+ query_params = opts[:query_params] || {}
127
+
128
+ # header parameters
129
+ header_params = opts[:header_params] || {}
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
132
+
133
+ # form parameters
134
+ form_params = opts[:form_params] || {}
135
+
136
+ # http body (model)
137
+ post_body = opts[:debug_body]
138
+
139
+ # return_type
140
+ return_type = opts[:debug_return_type] || 'TransactionRecordResult'
141
+
142
+ # auth_names
143
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
144
+
145
+ new_options = opts.merge(
146
+ :operation => :"VerificationsApi.get_transaction_record",
147
+ :header_params => header_params,
148
+ :query_params => query_params,
149
+ :form_params => form_params,
150
+ :body => post_body,
151
+ :auth_names => auth_names,
152
+ :return_type => return_type
153
+ )
154
+
155
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug "API called: VerificationsApi#get_transaction_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
+ end
159
+ return data, status_code, headers
160
+ end
161
+
162
+ # Get Transaction Record Address
163
+ # Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing.
164
+ # @param mode [String] trial or live
165
+ # @param id [String] id of the transactionrecord, this will be a GUID
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [TransactionRecordResult]
168
+ def get_transaction_record_address(mode, id, opts = {})
169
+ data, _status_code, _headers = get_transaction_record_address_with_http_info(mode, id, opts)
170
+ data
171
+ end
172
+
173
+ # Get Transaction Record Address
174
+ # Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing.
175
+ # @param mode [String] trial or live
176
+ # @param id [String] id of the transactionrecord, this will be a GUID
177
+ # @param [Hash] opts the optional parameters
178
+ # @return [Array<(TransactionRecordResult, Integer, Hash)>] TransactionRecordResult data, response status code and response headers
179
+ def get_transaction_record_address_with_http_info(mode, id, opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record_address ...'
182
+ end
183
+ # verify the required parameter 'mode' is set
184
+ if @api_client.config.client_side_validation && mode.nil?
185
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record_address"
186
+ end
187
+ # verify the required parameter 'id' is set
188
+ if @api_client.config.client_side_validation && id.nil?
189
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.get_transaction_record_address"
190
+ end
191
+ # resource path
192
+ local_var_path = '/{mode}/verifications/v1/transactionrecord/{id}/withaddress'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))
193
+
194
+ # query parameters
195
+ query_params = opts[:query_params] || {}
196
+
197
+ # header parameters
198
+ header_params = opts[:header_params] || {}
199
+ # HTTP header 'Accept' (if needed)
200
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
201
+
202
+ # form parameters
203
+ form_params = opts[:form_params] || {}
204
+
205
+ # http body (model)
206
+ post_body = opts[:debug_body]
207
+
208
+ # return_type
209
+ return_type = opts[:debug_return_type] || 'TransactionRecordResult'
210
+
211
+ # auth_names
212
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
213
+
214
+ new_options = opts.merge(
215
+ :operation => :"VerificationsApi.get_transaction_record_address",
216
+ :header_params => header_params,
217
+ :query_params => query_params,
218
+ :form_params => form_params,
219
+ :body => post_body,
220
+ :auth_names => auth_names,
221
+ :return_type => return_type
222
+ )
223
+
224
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug "API called: VerificationsApi#get_transaction_record_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
227
+ end
228
+ return data, status_code, headers
229
+ end
230
+
231
+ # Get Transaction Record Document
232
+ # This method is used to retrieve the document of a verification performed using the verify method. The response for this method includes the processed base64 JPEG formatted string
233
+ # @param mode [String] trial or live
234
+ # @param transaction_record_id [String] id of the transactionrecord, this will be a GUID
235
+ # @param document_field [String] FieldName of the Document, this will be a string
236
+ # @param [Hash] opts the optional parameters
237
+ # @return [String]
238
+ def get_transaction_record_document(mode, transaction_record_id, document_field, opts = {})
239
+ data, _status_code, _headers = get_transaction_record_document_with_http_info(mode, transaction_record_id, document_field, opts)
240
+ data
241
+ end
242
+
243
+ # Get Transaction Record Document
244
+ # This method is used to retrieve the document of a verification performed using the verify method. The response for this method includes the processed base64 JPEG formatted string
245
+ # @param mode [String] trial or live
246
+ # @param transaction_record_id [String] id of the transactionrecord, this will be a GUID
247
+ # @param document_field [String] FieldName of the Document, this will be a string
248
+ # @param [Hash] opts the optional parameters
249
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
250
+ def get_transaction_record_document_with_http_info(mode, transaction_record_id, document_field, opts = {})
251
+ if @api_client.config.debugging
252
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record_document ...'
253
+ end
254
+ # verify the required parameter 'mode' is set
255
+ if @api_client.config.client_side_validation && mode.nil?
256
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record_document"
257
+ end
258
+ # verify the required parameter 'transaction_record_id' is set
259
+ if @api_client.config.client_side_validation && transaction_record_id.nil?
260
+ fail ArgumentError, "Missing the required parameter 'transaction_record_id' when calling VerificationsApi.get_transaction_record_document"
261
+ end
262
+ # verify the required parameter 'document_field' is set
263
+ if @api_client.config.client_side_validation && document_field.nil?
264
+ fail ArgumentError, "Missing the required parameter 'document_field' when calling VerificationsApi.get_transaction_record_document"
265
+ end
266
+ # resource path
267
+ local_var_path = '/{mode}/verifications/v1/transactionrecord/{transactionRecordID}/{documentField}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'transactionRecordID' + '}', CGI.escape(transaction_record_id.to_s).gsub('+', '%20')).sub('{' + 'documentField' + '}', CGI.escape(document_field.to_s).gsub('+', '%20'))
268
+
269
+ # query parameters
270
+ query_params = opts[:query_params] || {}
271
+
272
+ # header parameters
273
+ header_params = opts[:header_params] || {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
276
+
277
+ # form parameters
278
+ form_params = opts[:form_params] || {}
279
+
280
+ # http body (model)
281
+ post_body = opts[:debug_body]
282
+
283
+ # return_type
284
+ return_type = opts[:debug_return_type] || 'String'
285
+
286
+ # auth_names
287
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
288
+
289
+ new_options = opts.merge(
290
+ :operation => :"VerificationsApi.get_transaction_record_document",
291
+ :header_params => header_params,
292
+ :query_params => query_params,
293
+ :form_params => form_params,
294
+ :body => post_body,
295
+ :auth_names => auth_names,
296
+ :return_type => return_type
297
+ )
298
+
299
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug "API called: VerificationsApi#get_transaction_record_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
+ end
303
+ return data, status_code, headers
304
+ end
305
+
306
+ # Get Transaction Record Verbose
307
+ # Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing and watchlist details.
308
+ # @param mode [String] trial or live
309
+ # @param id [String] id of the transactionrecord, this will be a GUID
310
+ # @param [Hash] opts the optional parameters
311
+ # @return [TransactionRecordResult]
312
+ def get_transaction_record_verbose(mode, id, opts = {})
313
+ data, _status_code, _headers = get_transaction_record_verbose_with_http_info(mode, id, opts)
314
+ data
315
+ end
316
+
317
+ # Get Transaction Record Verbose
318
+ # Fetch the results of a verification with the TransactionRecordId for the transaction this will include additional information if your account includes address cleansing and watchlist details.
319
+ # @param mode [String] trial or live
320
+ # @param id [String] id of the transactionrecord, this will be a GUID
321
+ # @param [Hash] opts the optional parameters
322
+ # @return [Array<(TransactionRecordResult, Integer, Hash)>] TransactionRecordResult data, response status code and response headers
323
+ def get_transaction_record_verbose_with_http_info(mode, id, opts = {})
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_record_verbose ...'
326
+ end
327
+ # verify the required parameter 'mode' is set
328
+ if @api_client.config.client_side_validation && mode.nil?
329
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_record_verbose"
330
+ end
331
+ # verify the required parameter 'id' is set
332
+ if @api_client.config.client_side_validation && id.nil?
333
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.get_transaction_record_verbose"
334
+ end
335
+ # resource path
336
+ local_var_path = '/{mode}/verifications/v1/transactionrecord/{id}/verbose'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))
337
+
338
+ # query parameters
339
+ query_params = opts[:query_params] || {}
340
+
341
+ # header parameters
342
+ header_params = opts[:header_params] || {}
343
+ # HTTP header 'Accept' (if needed)
344
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
345
+
346
+ # form parameters
347
+ form_params = opts[:form_params] || {}
348
+
349
+ # http body (model)
350
+ post_body = opts[:debug_body]
351
+
352
+ # return_type
353
+ return_type = opts[:debug_return_type] || 'TransactionRecordResult'
354
+
355
+ # auth_names
356
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
357
+
358
+ new_options = opts.merge(
359
+ :operation => :"VerificationsApi.get_transaction_record_verbose",
360
+ :header_params => header_params,
361
+ :query_params => query_params,
362
+ :form_params => form_params,
363
+ :body => post_body,
364
+ :auth_names => auth_names,
365
+ :return_type => return_type
366
+ )
367
+
368
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug "API called: VerificationsApi#get_transaction_record_verbose\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
371
+ end
372
+ return data, status_code, headers
373
+ end
374
+
375
+ # Get Transaction Status
376
+ # This method is used to retrieve the processing status of an asynchronous transaction. The response for this method includes the processing status of the verification, the TransactionID, the TransactionRecordID as well as whether the verification request has timed out.
377
+ # @param mode [String] trial or live
378
+ # @param id [String] id of the asynchronous transaction, this will be a GUID
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [TransactionStatus]
381
+ def get_transaction_status(mode, id, opts = {})
382
+ data, _status_code, _headers = get_transaction_status_with_http_info(mode, id, opts)
383
+ data
384
+ end
385
+
386
+ # Get Transaction Status
387
+ # This method is used to retrieve the processing status of an asynchronous transaction. The response for this method includes the processing status of the verification, the TransactionID, the TransactionRecordID as well as whether the verification request has timed out.
388
+ # @param mode [String] trial or live
389
+ # @param id [String] id of the asynchronous transaction, this will be a GUID
390
+ # @param [Hash] opts the optional parameters
391
+ # @return [Array<(TransactionStatus, Integer, Hash)>] TransactionStatus data, response status code and response headers
392
+ def get_transaction_status_with_http_info(mode, id, opts = {})
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.get_transaction_status ...'
395
+ end
396
+ # verify the required parameter 'mode' is set
397
+ if @api_client.config.client_side_validation && mode.nil?
398
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.get_transaction_status"
399
+ end
400
+ # verify the required parameter 'id' is set
401
+ if @api_client.config.client_side_validation && id.nil?
402
+ fail ArgumentError, "Missing the required parameter 'id' when calling VerificationsApi.get_transaction_status"
403
+ end
404
+ # resource path
405
+ local_var_path = '/{mode}/verifications/v1/transaction/{id}/status'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20'))
406
+
407
+ # query parameters
408
+ query_params = opts[:query_params] || {}
409
+
410
+ # header parameters
411
+ header_params = opts[:header_params] || {}
412
+ # HTTP header 'Accept' (if needed)
413
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
414
+
415
+ # form parameters
416
+ form_params = opts[:form_params] || {}
417
+
418
+ # http body (model)
419
+ post_body = opts[:debug_body]
420
+
421
+ # return_type
422
+ return_type = opts[:debug_return_type] || 'TransactionStatus'
423
+
424
+ # auth_names
425
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
426
+
427
+ new_options = opts.merge(
428
+ :operation => :"VerificationsApi.get_transaction_status",
429
+ :header_params => header_params,
430
+ :query_params => query_params,
431
+ :form_params => form_params,
432
+ :body => post_body,
433
+ :auth_names => auth_names,
434
+ :return_type => return_type
435
+ )
436
+
437
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug "API called: VerificationsApi#get_transaction_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
+ end
441
+ return data, status_code, headers
442
+ end
443
+
444
+ # Verify
445
+ # Calling this method will perform a verification. If your account includes address cleansing set the CleansedAddress flag to get additional address information in the result. You can query configuration to get what fields are available to you in each each country. It is also possible to get sample requests from the customer portal.
446
+ # @param mode [String] trial or live
447
+ # @param verify_request [VerifyRequest]
448
+ # @param [Hash] opts the optional parameters
449
+ # @return [VerifyResult]
450
+ def verify(mode, verify_request, opts = {})
451
+ data, _status_code, _headers = verify_with_http_info(mode, verify_request, opts)
452
+ data
453
+ end
454
+
455
+ # Verify
456
+ # Calling this method will perform a verification. If your account includes address cleansing set the CleansedAddress flag to get additional address information in the result. You can query configuration to get what fields are available to you in each each country. It is also possible to get sample requests from the customer portal.
457
+ # @param mode [String] trial or live
458
+ # @param verify_request [VerifyRequest]
459
+ # @param [Hash] opts the optional parameters
460
+ # @return [Array<(VerifyResult, Integer, Hash)>] VerifyResult data, response status code and response headers
461
+ def verify_with_http_info(mode, verify_request, opts = {})
462
+ if @api_client.config.debugging
463
+ @api_client.config.logger.debug 'Calling API: VerificationsApi.verify ...'
464
+ end
465
+ # verify the required parameter 'mode' is set
466
+ if @api_client.config.client_side_validation && mode.nil?
467
+ fail ArgumentError, "Missing the required parameter 'mode' when calling VerificationsApi.verify"
468
+ end
469
+ # verify the required parameter 'verify_request' is set
470
+ if @api_client.config.client_side_validation && verify_request.nil?
471
+ fail ArgumentError, "Missing the required parameter 'verify_request' when calling VerificationsApi.verify"
472
+ end
473
+ # resource path
474
+ local_var_path = '/{mode}/verifications/v1/verify'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20'))
475
+
476
+ # query parameters
477
+ query_params = opts[:query_params] || {}
478
+
479
+ # header parameters
480
+ header_params = opts[:header_params] || {}
481
+ # HTTP header 'Accept' (if needed)
482
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])
483
+ # HTTP header 'Content-Type'
484
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
485
+
486
+ # form parameters
487
+ form_params = opts[:form_params] || {}
488
+
489
+ # http body (model)
490
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_request)
491
+
492
+ # return_type
493
+ return_type = opts[:debug_return_type] || 'VerifyResult'
494
+
495
+ # auth_names
496
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
497
+
498
+ new_options = opts.merge(
499
+ :operation => :"VerificationsApi.verify",
500
+ :header_params => header_params,
501
+ :query_params => query_params,
502
+ :form_params => form_params,
503
+ :body => post_body,
504
+ :auth_names => auth_names,
505
+ :return_type => return_type
506
+ )
507
+
508
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
509
+ if @api_client.config.debugging
510
+ @api_client.config.logger.debug "API called: VerificationsApi#verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
511
+ end
512
+ return data, status_code, headers
513
+ end
514
+ end
515
+ end