masspay_ruby_sdk 1.0.0

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 (119) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/CONTRIBUTING.md +13 -0
  4. data/Gemfile +9 -0
  5. data/README.md +197 -0
  6. data/Rakefile +10 -0
  7. data/docs/AccountApi.md +150 -0
  8. data/docs/ApiResponse.md +22 -0
  9. data/docs/AttrTxn.md +20 -0
  10. data/docs/AttrValue.md +20 -0
  11. data/docs/AttrVelocityRequestInner.md +20 -0
  12. data/docs/AttributeApi.md +168 -0
  13. data/docs/AttrsRequirement.md +36 -0
  14. data/docs/AutopayResp.md +22 -0
  15. data/docs/AutopayRule.md +20 -0
  16. data/docs/AvailableBalanceTxnResp.md +22 -0
  17. data/docs/CardApi.md +160 -0
  18. data/docs/CatalogApi.md +469 -0
  19. data/docs/CompaniesResp.md +18 -0
  20. data/docs/Company.md +26 -0
  21. data/docs/Country.md +22 -0
  22. data/docs/Exception.md +20 -0
  23. data/docs/FoundUser.md +24 -0
  24. data/docs/GetAccountStatement200Response.md +18 -0
  25. data/docs/GetTransactionConfirmationDetails200Response.md +18 -0
  26. data/docs/GetUserAgreement200Response.md +26 -0
  27. data/docs/GetUserAgreementsNames200ResponseInner.md +24 -0
  28. data/docs/GetUserUserTokenKycAu10tix200Response.md +18 -0
  29. data/docs/GetUserUserTokenKycVeriff200Response.md +18 -0
  30. data/docs/GetWalletCardInfo200Response.md +30 -0
  31. data/docs/IDUpload.md +20 -0
  32. data/docs/KYCApi.md +305 -0
  33. data/docs/LoadApi.md +621 -0
  34. data/docs/LoadTxn.md +32 -0
  35. data/docs/LoadTxnResp.md +20 -0
  36. data/docs/Loads.md +36 -0
  37. data/docs/PayoutApi.md +403 -0
  38. data/docs/PayoutTxn.md +36 -0
  39. data/docs/PayoutTxnCommitResp.md +24 -0
  40. data/docs/PayoutTxnResp.md +60 -0
  41. data/docs/ResendBalanceNotification200Response.md +18 -0
  42. data/docs/Service.md +22 -0
  43. data/docs/ServicePayersInner.md +38 -0
  44. data/docs/ServicePayersInnerExchangeRateInner.md +20 -0
  45. data/docs/SpendBackApi.md +161 -0
  46. data/docs/SpendBackTxn.md +28 -0
  47. data/docs/SpendBackTxnResp.md +22 -0
  48. data/docs/SpendBacks.md +34 -0
  49. data/docs/StoredUser.md +56 -0
  50. data/docs/TaxApi.md +81 -0
  51. data/docs/TaxYearUserResp.md +48 -0
  52. data/docs/TxnHistoryResp.md +52 -0
  53. data/docs/UpdateUser.md +52 -0
  54. data/docs/User.md +50 -0
  55. data/docs/UserApi.md +403 -0
  56. data/docs/WalletApi.md +463 -0
  57. data/docs/WalletTxnResp.md +34 -0
  58. data/docs/logo.webp +0 -0
  59. data/lib/masspay_ruby_sdk/api/account_api.rb +149 -0
  60. data/lib/masspay_ruby_sdk/api/attribute_api.rb +214 -0
  61. data/lib/masspay_ruby_sdk/api/card_api.rb +174 -0
  62. data/lib/masspay_ruby_sdk/api/catalog_api.rb +443 -0
  63. data/lib/masspay_ruby_sdk/api/kyc_api.rb +290 -0
  64. data/lib/masspay_ruby_sdk/api/load_api.rb +598 -0
  65. data/lib/masspay_ruby_sdk/api/payout_api.rb +397 -0
  66. data/lib/masspay_ruby_sdk/api/spend_back_api.rb +160 -0
  67. data/lib/masspay_ruby_sdk/api/tax_api.rb +82 -0
  68. data/lib/masspay_ruby_sdk/api/user_api.rb +418 -0
  69. data/lib/masspay_ruby_sdk/api/wallet_api.rb +461 -0
  70. data/lib/masspay_ruby_sdk/api_client.rb +391 -0
  71. data/lib/masspay_ruby_sdk/api_error.rb +57 -0
  72. data/lib/masspay_ruby_sdk/configuration.rb +315 -0
  73. data/lib/masspay_ruby_sdk/models/api_response.rb +236 -0
  74. data/lib/masspay_ruby_sdk/models/attr_txn.rb +235 -0
  75. data/lib/masspay_ruby_sdk/models/attr_value.rb +239 -0
  76. data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +273 -0
  77. data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +372 -0
  78. data/lib/masspay_ruby_sdk/models/autopay_resp.rb +256 -0
  79. data/lib/masspay_ruby_sdk/models/autopay_rule.rb +241 -0
  80. data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +254 -0
  81. data/lib/masspay_ruby_sdk/models/companies_resp.rb +225 -0
  82. data/lib/masspay_ruby_sdk/models/company.rb +285 -0
  83. data/lib/masspay_ruby_sdk/models/country.rb +296 -0
  84. data/lib/masspay_ruby_sdk/models/exception.rb +241 -0
  85. data/lib/masspay_ruby_sdk/models/found_user.rb +270 -0
  86. data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +225 -0
  87. data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +218 -0
  88. data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +280 -0
  89. data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +270 -0
  90. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +224 -0
  91. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +224 -0
  92. data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +460 -0
  93. data/lib/masspay_ruby_sdk/models/id_upload.rb +273 -0
  94. data/lib/masspay_ruby_sdk/models/load_txn.rb +321 -0
  95. data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +273 -0
  96. data/lib/masspay_ruby_sdk/models/loads.rb +388 -0
  97. data/lib/masspay_ruby_sdk/models/payout_txn.rb +328 -0
  98. data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +293 -0
  99. data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +613 -0
  100. data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +225 -0
  101. data/lib/masspay_ruby_sdk/models/service.rb +318 -0
  102. data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +373 -0
  103. data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +239 -0
  104. data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +325 -0
  105. data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +307 -0
  106. data/lib/masspay_ruby_sdk/models/spend_backs.rb +340 -0
  107. data/lib/masspay_ruby_sdk/models/stored_user.rb +500 -0
  108. data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +388 -0
  109. data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +571 -0
  110. data/lib/masspay_ruby_sdk/models/update_user.rb +490 -0
  111. data/lib/masspay_ruby_sdk/models/user.rb +423 -0
  112. data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +375 -0
  113. data/lib/masspay_ruby_sdk/version.rb +14 -0
  114. data/lib/masspay_ruby_sdk.rb +89 -0
  115. data/masspay_ruby_sdk.gemspec +37 -0
  116. data/spec/api_client_spec.rb +227 -0
  117. data/spec/configuration_spec.rb +41 -0
  118. data/spec/spec_helper.rb +110 -0
  119. metadata +203 -0
@@ -0,0 +1,290 @@
1
+ =begin
2
+ #MassPay API
3
+
4
+ #MassPay API
5
+
6
+ The version of the OpenAPI document: 0.1.4
7
+ Contact: support@masspay.io
8
+ Generated by: MassPay Inc.
9
+ OpenAPI Generator version: 6.5.0
10
+ =end
11
+
12
+ require 'cgi'
13
+
14
+ module MassPayRubySdk
15
+ class KYCApi
16
+ attr_accessor :api_client
17
+
18
+ def initialize(api_client = ApiClient.default)
19
+ @api_client = api_client
20
+ end
21
+ # Attributes velocity check
22
+ # This **POST** endpoint is used to perform an attributes velocity check to identify users with matching attribute values. <br> You can use this endpoint to help prevent fraudulent activities by monitoring for unusual attribute value changes over time. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL path and the required parameters in the request Body. <br> The endpoint will then compare the provided attribute value with the historical attribute values for the same user and determine if it meets the velocity check criteria.
23
+ # @param user_token [String] Token representing the user to retrieve attributes for
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
26
+ # @option opts [Array<AttrVelocityRequestInner>] :attr_velocity_request_inner
27
+ # @return [Array<Object>]
28
+ def find_attributes_velocity(user_token, opts = {})
29
+ data, _status_code, _headers = find_attributes_velocity_with_http_info(user_token, opts)
30
+ data
31
+ end
32
+
33
+ # Attributes velocity check
34
+ # This **POST** endpoint is used to perform an attributes velocity check to identify users with matching attribute values. &lt;br&gt; You can use this endpoint to help prevent fraudulent activities by monitoring for unusual attribute value changes over time. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; as a parameter in the URL path and the required parameters in the request Body. &lt;br&gt; The endpoint will then compare the provided attribute value with the historical attribute values for the same user and determine if it meets the velocity check criteria.
35
+ # @param user_token [String] Token representing the user to retrieve attributes for
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
38
+ # @option opts [Array<AttrVelocityRequestInner>] :attr_velocity_request_inner
39
+ # @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
40
+ def find_attributes_velocity_with_http_info(user_token, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug 'Calling API: KYCApi.find_attributes_velocity ...'
43
+ end
44
+ # verify the required parameter 'user_token' is set
45
+ if @api_client.config.client_side_validation && user_token.nil?
46
+ fail ArgumentError, "Missing the required parameter 'user_token' when calling KYCApi.find_attributes_velocity"
47
+ end
48
+ # resource path
49
+ local_var_path = '/attribute/{user_token}/velocity'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
50
+
51
+ # query parameters
52
+ query_params = opts[:query_params] || {}
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ content_type = @api_client.select_header_content_type(['application/json'])
60
+ if !content_type.nil?
61
+ header_params['Content-Type'] = content_type
62
+ end
63
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
64
+
65
+ # form parameters
66
+ form_params = opts[:form_params] || {}
67
+
68
+ # http body (model)
69
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'attr_velocity_request_inner'])
70
+
71
+ # return_type
72
+ return_type = opts[:debug_return_type] || 'Array<Object>'
73
+
74
+ # auth_names
75
+ auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
76
+
77
+ new_options = opts.merge(
78
+ :operation => :"KYCApi.find_attributes_velocity",
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => return_type
85
+ )
86
+
87
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: KYCApi#find_attributes_velocity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ # Get an Au10tix session link
95
+ # This **GET** endpoint is used to obtain a link to an Au10tix session for the user with the provided user token. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path. <br> The endpoint will then generate a session link that you can use to initiate an identity verification process for the user through the Au10tix platform. <br> The response will contain the session link as a URL in a JSON format.
96
+ # @param user_token [String]
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [GetUserUserTokenKycAu10tix200Response]
99
+ def get_user_user_token_kyc_au10tix(user_token, opts = {})
100
+ data, _status_code, _headers = get_user_user_token_kyc_au10tix_with_http_info(user_token, opts)
101
+ data
102
+ end
103
+
104
+ # Get an Au10tix session link
105
+ # This **GET** endpoint is used to obtain a link to an Au10tix session for the user with the provided user token. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; as a parameter in the URL Path. &lt;br&gt; The endpoint will then generate a session link that you can use to initiate an identity verification process for the user through the Au10tix platform. &lt;br&gt; The response will contain the session link as a URL in a JSON format.
106
+ # @param user_token [String]
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [Array<(GetUserUserTokenKycAu10tix200Response, Integer, Hash)>] GetUserUserTokenKycAu10tix200Response data, response status code and response headers
109
+ def get_user_user_token_kyc_au10tix_with_http_info(user_token, opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: KYCApi.get_user_user_token_kyc_au10tix ...'
112
+ end
113
+ # verify the required parameter 'user_token' is set
114
+ if @api_client.config.client_side_validation && user_token.nil?
115
+ fail ArgumentError, "Missing the required parameter 'user_token' when calling KYCApi.get_user_user_token_kyc_au10tix"
116
+ end
117
+ # resource path
118
+ local_var_path = '/user/{user_token}/kyc/au10tix'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:debug_body]
133
+
134
+ # return_type
135
+ return_type = opts[:debug_return_type] || 'GetUserUserTokenKycAu10tix200Response'
136
+
137
+ # auth_names
138
+ auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
139
+
140
+ new_options = opts.merge(
141
+ :operation => :"KYCApi.get_user_user_token_kyc_au10tix",
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "API called: KYCApi#get_user_user_token_kyc_au10tix\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ end
154
+ return data, status_code, headers
155
+ end
156
+
157
+ # Get a Veriff session link
158
+ # This **GET** endpoint is used to obtain a link to a Veriff session for the user with the provided user token. <br> The endpoint will then generate a session link that you can use to initiate an identity verification process for the user through the Veriff platform. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path. <br> The response will contain the session link as a URL in a JSON format.
159
+ # @param user_token [String]
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [GetUserUserTokenKycVeriff200Response]
162
+ def get_user_user_token_kyc_veriff(user_token, opts = {})
163
+ data, _status_code, _headers = get_user_user_token_kyc_veriff_with_http_info(user_token, opts)
164
+ data
165
+ end
166
+
167
+ # Get a Veriff session link
168
+ # This **GET** endpoint is used to obtain a link to a Veriff session for the user with the provided user token. &lt;br&gt; The endpoint will then generate a session link that you can use to initiate an identity verification process for the user through the Veriff platform. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; as a parameter in the URL Path. &lt;br&gt; The response will contain the session link as a URL in a JSON format.
169
+ # @param user_token [String]
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [Array<(GetUserUserTokenKycVeriff200Response, Integer, Hash)>] GetUserUserTokenKycVeriff200Response data, response status code and response headers
172
+ def get_user_user_token_kyc_veriff_with_http_info(user_token, opts = {})
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug 'Calling API: KYCApi.get_user_user_token_kyc_veriff ...'
175
+ end
176
+ # verify the required parameter 'user_token' is set
177
+ if @api_client.config.client_side_validation && user_token.nil?
178
+ fail ArgumentError, "Missing the required parameter 'user_token' when calling KYCApi.get_user_user_token_kyc_veriff"
179
+ end
180
+ # resource path
181
+ local_var_path = '/user/{user_token}/kyc/veriff'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
182
+
183
+ # query parameters
184
+ query_params = opts[:query_params] || {}
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ # HTTP header 'Accept' (if needed)
189
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
190
+
191
+ # form parameters
192
+ form_params = opts[:form_params] || {}
193
+
194
+ # http body (model)
195
+ post_body = opts[:debug_body]
196
+
197
+ # return_type
198
+ return_type = opts[:debug_return_type] || 'GetUserUserTokenKycVeriff200Response'
199
+
200
+ # auth_names
201
+ auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
202
+
203
+ new_options = opts.merge(
204
+ :operation => :"KYCApi.get_user_user_token_kyc_veriff",
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => return_type
211
+ )
212
+
213
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug "API called: KYCApi#get_user_user_token_kyc_veriff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
216
+ end
217
+ return data, status_code, headers
218
+ end
219
+
220
+ # Upload ID Photos
221
+ # Upload IDs for the provided user. This is an optional endpoint if the images are captured through means other than the link that is generated in the attributes.
222
+ # @param user_token [String]
223
+ # @param [Hash] opts the optional parameters
224
+ # @option opts [Array<IDUpload>] :id_upload
225
+ # @return [Object]
226
+ def upload_id_photos(user_token, opts = {})
227
+ data, _status_code, _headers = upload_id_photos_with_http_info(user_token, opts)
228
+ data
229
+ end
230
+
231
+ # Upload ID Photos
232
+ # Upload IDs for the provided user. This is an optional endpoint if the images are captured through means other than the link that is generated in the attributes.
233
+ # @param user_token [String]
234
+ # @param [Hash] opts the optional parameters
235
+ # @option opts [Array<IDUpload>] :id_upload
236
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
237
+ def upload_id_photos_with_http_info(user_token, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: KYCApi.upload_id_photos ...'
240
+ end
241
+ # verify the required parameter 'user_token' is set
242
+ if @api_client.config.client_side_validation && user_token.nil?
243
+ fail ArgumentError, "Missing the required parameter 'user_token' when calling KYCApi.upload_id_photos"
244
+ end
245
+ # resource path
246
+ local_var_path = '/user/{user_token}/kyc/id'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
247
+
248
+ # query parameters
249
+ query_params = opts[:query_params] || {}
250
+
251
+ # header parameters
252
+ header_params = opts[:header_params] || {}
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
+ # HTTP header 'Content-Type'
256
+ content_type = @api_client.select_header_content_type(['application/json', 'application/xml'])
257
+ if !content_type.nil?
258
+ header_params['Content-Type'] = content_type
259
+ end
260
+
261
+ # form parameters
262
+ form_params = opts[:form_params] || {}
263
+
264
+ # http body (model)
265
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'id_upload'])
266
+
267
+ # return_type
268
+ return_type = opts[:debug_return_type] || 'Object'
269
+
270
+ # auth_names
271
+ auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
272
+
273
+ new_options = opts.merge(
274
+ :operation => :"KYCApi.upload_id_photos",
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: KYCApi#upload_id_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+ end
290
+ end