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
data/docs/LoadApi.md ADDED
@@ -0,0 +1,621 @@
1
+ # MassPayRubySdk::LoadApi
2
+
3
+ All URIs are relative to *https://api.masspay.io/v0.1.4*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**cancel_user_load**](LoadApi.md#cancel_user_load) | **DELETE** /load/{user_token} | Reverse a user load |
8
+ | [**create_autopay_rule**](LoadApi.md#create_autopay_rule) | **POST** /wallet/{user_token}/{wallet_token}/autopay | Add autopay rule |
9
+ | [**delete_autopay_rule**](LoadApi.md#delete_autopay_rule) | **DELETE** /wallet/{user_token}/{wallet_token}/autopay | Delete autopay rule |
10
+ | [**get_autopay_rules**](LoadApi.md#get_autopay_rules) | **GET** /wallet/{user_token}/{wallet_token}/autopay | Get all autopay rules |
11
+ | [**get_user_loads_by_token**](LoadApi.md#get_user_loads_by_token) | **GET** /load/{user_token} | Get history of loads by user token |
12
+ | [**load_user**](LoadApi.md#load_user) | **POST** /load/{user_token} | Initiate a load transaction |
13
+ | [**load_user_token_put**](LoadApi.md#load_user_token_put) | **PUT** /load/{user_token} | Resend Load Notification |
14
+ | [**resend_balance_notification**](LoadApi.md#resend_balance_notification) | **PUT** /wallet/{user_token} | Resend Balance Notification |
15
+
16
+
17
+ ## cancel_user_load
18
+
19
+ > cancel_user_load(user_token, load_token, opts)
20
+
21
+ Reverse a user load
22
+
23
+ This **DELETE** endpoint is used to reverse a load transaction that was already processed, allowing you to remove funds from a user's wallet. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path, and the load_token as a parameter in the Query string. <br> The endpoint will then attempt to reverse the specified load transaction. If the load is still in scheduled status, it will be marked as cancelled.
24
+
25
+ ### Examples
26
+
27
+ ```ruby
28
+ require 'time'
29
+ require 'masspay_ruby_sdk'
30
+ # setup authorization
31
+ MassPayRubySdk.configure do |config|
32
+ # Configure API key authorization: AUTHORIZER_NAME
33
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
34
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
35
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
36
+ end
37
+
38
+ api_instance = MassPayRubySdk::LoadApi.new
39
+ user_token = 'user_token_example' # String | Token representing the user to load/fetch loads for
40
+ load_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Load token
41
+ opts = {
42
+ idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
43
+ }
44
+
45
+ begin
46
+ # Reverse a user load
47
+ api_instance.cancel_user_load(user_token, load_token, opts)
48
+ rescue MassPayRubySdk::ApiError => e
49
+ puts "Error when calling LoadApi->cancel_user_load: #{e}"
50
+ end
51
+ ```
52
+
53
+ #### Using the cancel_user_load_with_http_info variant
54
+
55
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
56
+
57
+ > <Array(nil, Integer, Hash)> cancel_user_load_with_http_info(user_token, load_token, opts)
58
+
59
+ ```ruby
60
+ begin
61
+ # Reverse a user load
62
+ data, status_code, headers = api_instance.cancel_user_load_with_http_info(user_token, load_token, opts)
63
+ p status_code # => 2xx
64
+ p headers # => { ... }
65
+ p data # => nil
66
+ rescue MassPayRubySdk::ApiError => e
67
+ puts "Error when calling LoadApi->cancel_user_load_with_http_info: #{e}"
68
+ end
69
+ ```
70
+
71
+ ### Parameters
72
+
73
+ | Name | Type | Description | Notes |
74
+ | ---- | ---- | ----------- | ----- |
75
+ | **user_token** | **String** | Token representing the user to load/fetch loads for | |
76
+ | **load_token** | **String** | Load token | |
77
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
78
+
79
+ ### Return type
80
+
81
+ nil (empty response body)
82
+
83
+ ### Authorization
84
+
85
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
86
+
87
+ ### HTTP request headers
88
+
89
+ - **Content-Type**: Not defined
90
+ - **Accept**: Not defined
91
+
92
+
93
+ ## create_autopay_rule
94
+
95
+ > <AutopayResp> create_autopay_rule(user_token, wallet_token, opts)
96
+
97
+ Add autopay rule
98
+
99
+ This **POST** endpoint is used to add an autopay rule that will initiate a payout whenever the provided wallet token is loaded. <br> You can use this endpoint to create an autopay rule that automatically sends a percentage of incoming load to a specific destination. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path, and the `destination_token` and percentage of incoming load that should be autopaid to the `destination_token` in the request Body. <br> The response will include a JSON object containing the details of the created autopay rule, including the token, `destination_token` and percentage.
100
+
101
+ ### Examples
102
+
103
+ ```ruby
104
+ require 'time'
105
+ require 'masspay_ruby_sdk'
106
+ # setup authorization
107
+ MassPayRubySdk.configure do |config|
108
+ # Configure API key authorization: AUTHORIZER_NAME
109
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
110
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
111
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
112
+ end
113
+
114
+ api_instance = MassPayRubySdk::LoadApi.new
115
+ user_token = 'user_token_example' # String | Token representing the user who owns the wallet
116
+ wallet_token = 'wallet_token_example' # String | Token representing the wallet
117
+ opts = {
118
+ autopay_rule: MassPayRubySdk::AutopayRule.new({destination_token: 'dest_d2138fd0-00be-45a8-985f-4f5bde500962', percentage: 50}) # AutopayRule | Autopay rule configuration
119
+ }
120
+
121
+ begin
122
+ # Add autopay rule
123
+ result = api_instance.create_autopay_rule(user_token, wallet_token, opts)
124
+ p result
125
+ rescue MassPayRubySdk::ApiError => e
126
+ puts "Error when calling LoadApi->create_autopay_rule: #{e}"
127
+ end
128
+ ```
129
+
130
+ #### Using the create_autopay_rule_with_http_info variant
131
+
132
+ This returns an Array which contains the response data, status code and headers.
133
+
134
+ > <Array(<AutopayResp>, Integer, Hash)> create_autopay_rule_with_http_info(user_token, wallet_token, opts)
135
+
136
+ ```ruby
137
+ begin
138
+ # Add autopay rule
139
+ data, status_code, headers = api_instance.create_autopay_rule_with_http_info(user_token, wallet_token, opts)
140
+ p status_code # => 2xx
141
+ p headers # => { ... }
142
+ p data # => <AutopayResp>
143
+ rescue MassPayRubySdk::ApiError => e
144
+ puts "Error when calling LoadApi->create_autopay_rule_with_http_info: #{e}"
145
+ end
146
+ ```
147
+
148
+ ### Parameters
149
+
150
+ | Name | Type | Description | Notes |
151
+ | ---- | ---- | ----------- | ----- |
152
+ | **user_token** | **String** | Token representing the user who owns the wallet | |
153
+ | **wallet_token** | **String** | Token representing the wallet | |
154
+ | **autopay_rule** | [**AutopayRule**](AutopayRule.md) | Autopay rule configuration | [optional] |
155
+
156
+ ### Return type
157
+
158
+ [**AutopayResp**](AutopayResp.md)
159
+
160
+ ### Authorization
161
+
162
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
163
+
164
+ ### HTTP request headers
165
+
166
+ - **Content-Type**: application/json
167
+ - **Accept**: application/json
168
+
169
+
170
+ ## delete_autopay_rule
171
+
172
+ > delete_autopay_rule(user_token, wallet_token, token)
173
+
174
+ Delete autopay rule
175
+
176
+ This **DELETE** endpoint is used to delete an existing autopay rule. <br> You can use this endpoint to remove an autopay rule that is no longer needed. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path, and the token of the autopay rule you wish to delete in the request Body. <br> The response will include a message indicating the success of the deletion.
177
+
178
+ ### Examples
179
+
180
+ ```ruby
181
+ require 'time'
182
+ require 'masspay_ruby_sdk'
183
+ # setup authorization
184
+ MassPayRubySdk.configure do |config|
185
+ # Configure API key authorization: AUTHORIZER_NAME
186
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
187
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
188
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
189
+ end
190
+
191
+ api_instance = MassPayRubySdk::LoadApi.new
192
+ user_token = 'user_token_example' # String | Token representing the user who owns the wallet
193
+ wallet_token = 'wallet_token_example' # String | Token representing the wallet
194
+ token = 'autopay_3684cc43-fe3b-4994-8ca1-7dc0db94430f' # String | Autopay token to delete
195
+
196
+ begin
197
+ # Delete autopay rule
198
+ api_instance.delete_autopay_rule(user_token, wallet_token, token)
199
+ rescue MassPayRubySdk::ApiError => e
200
+ puts "Error when calling LoadApi->delete_autopay_rule: #{e}"
201
+ end
202
+ ```
203
+
204
+ #### Using the delete_autopay_rule_with_http_info variant
205
+
206
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
207
+
208
+ > <Array(nil, Integer, Hash)> delete_autopay_rule_with_http_info(user_token, wallet_token, token)
209
+
210
+ ```ruby
211
+ begin
212
+ # Delete autopay rule
213
+ data, status_code, headers = api_instance.delete_autopay_rule_with_http_info(user_token, wallet_token, token)
214
+ p status_code # => 2xx
215
+ p headers # => { ... }
216
+ p data # => nil
217
+ rescue MassPayRubySdk::ApiError => e
218
+ puts "Error when calling LoadApi->delete_autopay_rule_with_http_info: #{e}"
219
+ end
220
+ ```
221
+
222
+ ### Parameters
223
+
224
+ | Name | Type | Description | Notes |
225
+ | ---- | ---- | ----------- | ----- |
226
+ | **user_token** | **String** | Token representing the user who owns the wallet | |
227
+ | **wallet_token** | **String** | Token representing the wallet | |
228
+ | **token** | **String** | Autopay token to delete | |
229
+
230
+ ### Return type
231
+
232
+ nil (empty response body)
233
+
234
+ ### Authorization
235
+
236
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
237
+
238
+ ### HTTP request headers
239
+
240
+ - **Content-Type**: Not defined
241
+ - **Accept**: application/json
242
+
243
+
244
+ ## get_autopay_rules
245
+
246
+ > <Array<AutopayResp>> get_autopay_rules(user_token, wallet_token)
247
+
248
+ Get all autopay rules
249
+
250
+ This **GET** endpoint is used to retrieve all autopay rules currently applied to the provided wallet token. <br> You can use this endpoint to obtain information about the autopay rules associated with the wallet. <br> To use this endpoint, you need to provide the `user_token` and `wallet_token` as required parameters in the URL Path. <br> The response will include a JSON array containing details for each autopay rule, including the token, `destination_token` and percentage.
251
+
252
+ ### Examples
253
+
254
+ ```ruby
255
+ require 'time'
256
+ require 'masspay_ruby_sdk'
257
+ # setup authorization
258
+ MassPayRubySdk.configure do |config|
259
+ # Configure API key authorization: AUTHORIZER_NAME
260
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
261
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
262
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
263
+ end
264
+
265
+ api_instance = MassPayRubySdk::LoadApi.new
266
+ user_token = 'user_token_example' # String | Token representing the user who owns the wallet
267
+ wallet_token = 'wallet_token_example' # String | Token representing the wallet
268
+
269
+ begin
270
+ # Get all autopay rules
271
+ result = api_instance.get_autopay_rules(user_token, wallet_token)
272
+ p result
273
+ rescue MassPayRubySdk::ApiError => e
274
+ puts "Error when calling LoadApi->get_autopay_rules: #{e}"
275
+ end
276
+ ```
277
+
278
+ #### Using the get_autopay_rules_with_http_info variant
279
+
280
+ This returns an Array which contains the response data, status code and headers.
281
+
282
+ > <Array(<Array<AutopayResp>>, Integer, Hash)> get_autopay_rules_with_http_info(user_token, wallet_token)
283
+
284
+ ```ruby
285
+ begin
286
+ # Get all autopay rules
287
+ data, status_code, headers = api_instance.get_autopay_rules_with_http_info(user_token, wallet_token)
288
+ p status_code # => 2xx
289
+ p headers # => { ... }
290
+ p data # => <Array<AutopayResp>>
291
+ rescue MassPayRubySdk::ApiError => e
292
+ puts "Error when calling LoadApi->get_autopay_rules_with_http_info: #{e}"
293
+ end
294
+ ```
295
+
296
+ ### Parameters
297
+
298
+ | Name | Type | Description | Notes |
299
+ | ---- | ---- | ----------- | ----- |
300
+ | **user_token** | **String** | Token representing the user who owns the wallet | |
301
+ | **wallet_token** | **String** | Token representing the wallet | |
302
+
303
+ ### Return type
304
+
305
+ [**Array&lt;AutopayResp&gt;**](AutopayResp.md)
306
+
307
+ ### Authorization
308
+
309
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
310
+
311
+ ### HTTP request headers
312
+
313
+ - **Content-Type**: Not defined
314
+ - **Accept**: application/json
315
+
316
+
317
+ ## get_user_loads_by_token
318
+
319
+ > <Array<Loads>> get_user_loads_by_token(user_token, opts)
320
+
321
+ Get history of loads by user token
322
+
323
+ This **GET** endpoint is used to retrieve a transaction history of all loads that were made to the provided user token, including scheduled loads. <br> You can use this endpoint to obtain a comprehensive history of loads for the user token, allowing you to track and analyze their incoming payments over time. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path. <br> The endpoint will then return a JSON array of load transactions, each including transactions details.
324
+
325
+ ### Examples
326
+
327
+ ```ruby
328
+ require 'time'
329
+ require 'masspay_ruby_sdk'
330
+ # setup authorization
331
+ MassPayRubySdk.configure do |config|
332
+ # Configure API key authorization: AUTHORIZER_NAME
333
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
334
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
335
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
336
+ end
337
+
338
+ api_instance = MassPayRubySdk::LoadApi.new
339
+ user_token = 'user_token_example' # String | The user token that needs to be fetched.
340
+ opts = {
341
+ idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
342
+ }
343
+
344
+ begin
345
+ # Get history of loads by user token
346
+ result = api_instance.get_user_loads_by_token(user_token, opts)
347
+ p result
348
+ rescue MassPayRubySdk::ApiError => e
349
+ puts "Error when calling LoadApi->get_user_loads_by_token: #{e}"
350
+ end
351
+ ```
352
+
353
+ #### Using the get_user_loads_by_token_with_http_info variant
354
+
355
+ This returns an Array which contains the response data, status code and headers.
356
+
357
+ > <Array(<Array<Loads>>, Integer, Hash)> get_user_loads_by_token_with_http_info(user_token, opts)
358
+
359
+ ```ruby
360
+ begin
361
+ # Get history of loads by user token
362
+ data, status_code, headers = api_instance.get_user_loads_by_token_with_http_info(user_token, opts)
363
+ p status_code # => 2xx
364
+ p headers # => { ... }
365
+ p data # => <Array<Loads>>
366
+ rescue MassPayRubySdk::ApiError => e
367
+ puts "Error when calling LoadApi->get_user_loads_by_token_with_http_info: #{e}"
368
+ end
369
+ ```
370
+
371
+ ### Parameters
372
+
373
+ | Name | Type | Description | Notes |
374
+ | ---- | ---- | ----------- | ----- |
375
+ | **user_token** | **String** | The user token that needs to be fetched. | |
376
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
377
+
378
+ ### Return type
379
+
380
+ [**Array&lt;Loads&gt;**](Loads.md)
381
+
382
+ ### Authorization
383
+
384
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
385
+
386
+ ### HTTP request headers
387
+
388
+ - **Content-Type**: Not defined
389
+ - **Accept**: application/json
390
+
391
+
392
+ ## load_user
393
+
394
+ > <LoadTxnResp> load_user(user_token, load_txn, opts)
395
+
396
+ Initiate a load transaction
397
+
398
+ This **POST** endpoint is used to initiate a load transaction, allowing you to add funds to a user token's wallet. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path. You also need to provide the `client_load_id`, `source_token`, and amount as JSON parameters in the Request Body. The `client_load_id` is a unique identifier for the transaction that you can use to track it, while the `source_token` is the token or account from which the funds will be loaded. The amount parameter specifies the amount of funds to be loaded into the user's wallet. <br> The response will contain a JSON object indicating the status of the load transaction and any relevant details.
399
+
400
+ ### Examples
401
+
402
+ ```ruby
403
+ require 'time'
404
+ require 'masspay_ruby_sdk'
405
+ # setup authorization
406
+ MassPayRubySdk.configure do |config|
407
+ # Configure API key authorization: AUTHORIZER_NAME
408
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
409
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
410
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
411
+ end
412
+
413
+ api_instance = MassPayRubySdk::LoadApi.new
414
+ user_token = 'user_token_example' # String | Token representing the user to load
415
+ load_txn = MassPayRubySdk::LoadTxn.new({client_load_id: 'aEjn345', source_token: 'ba4275f2-bae1-488d-9d6f-20af1cd83574', amount: 100.5}) # LoadTxn | Load information
416
+ opts = {
417
+ idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
418
+ }
419
+
420
+ begin
421
+ # Initiate a load transaction
422
+ result = api_instance.load_user(user_token, load_txn, opts)
423
+ p result
424
+ rescue MassPayRubySdk::ApiError => e
425
+ puts "Error when calling LoadApi->load_user: #{e}"
426
+ end
427
+ ```
428
+
429
+ #### Using the load_user_with_http_info variant
430
+
431
+ This returns an Array which contains the response data, status code and headers.
432
+
433
+ > <Array(<LoadTxnResp>, Integer, Hash)> load_user_with_http_info(user_token, load_txn, opts)
434
+
435
+ ```ruby
436
+ begin
437
+ # Initiate a load transaction
438
+ data, status_code, headers = api_instance.load_user_with_http_info(user_token, load_txn, opts)
439
+ p status_code # => 2xx
440
+ p headers # => { ... }
441
+ p data # => <LoadTxnResp>
442
+ rescue MassPayRubySdk::ApiError => e
443
+ puts "Error when calling LoadApi->load_user_with_http_info: #{e}"
444
+ end
445
+ ```
446
+
447
+ ### Parameters
448
+
449
+ | Name | Type | Description | Notes |
450
+ | ---- | ---- | ----------- | ----- |
451
+ | **user_token** | **String** | Token representing the user to load | |
452
+ | **load_txn** | [**LoadTxn**](LoadTxn.md) | Load information | |
453
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
454
+
455
+ ### Return type
456
+
457
+ [**LoadTxnResp**](LoadTxnResp.md)
458
+
459
+ ### Authorization
460
+
461
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
462
+
463
+ ### HTTP request headers
464
+
465
+ - **Content-Type**: application/json
466
+ - **Accept**: application/json
467
+
468
+
469
+ ## load_user_token_put
470
+
471
+ > <ResendBalanceNotification200Response> load_user_token_put(user_token, load_token, opts)
472
+
473
+ Resend Load Notification
474
+
475
+ This **PUT** endpoint is used to resend a load notification to the user associated with the provided `user_token` for a specific load transaction. <br> You can use this endpoint to help ensure that users are notified promptly and accurately of any incoming funds or other important payment events. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path, and the `load_token` as a parameter in the Query string. The endpoint will then resend a notification to the user for the specified load transaction. <br> The response will contain a JSON object indicating the status of the request.
476
+
477
+ ### Examples
478
+
479
+ ```ruby
480
+ require 'time'
481
+ require 'masspay_ruby_sdk'
482
+ # setup authorization
483
+ MassPayRubySdk.configure do |config|
484
+ # Configure API key authorization: AUTHORIZER_NAME
485
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
486
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
487
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
488
+ end
489
+
490
+ api_instance = MassPayRubySdk::LoadApi.new
491
+ user_token = 'user_token_example' # String | Token representing the user to load/fetch loads for
492
+ load_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Load token
493
+ opts = {
494
+ idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
495
+ }
496
+
497
+ begin
498
+ # Resend Load Notification
499
+ result = api_instance.load_user_token_put(user_token, load_token, opts)
500
+ p result
501
+ rescue MassPayRubySdk::ApiError => e
502
+ puts "Error when calling LoadApi->load_user_token_put: #{e}"
503
+ end
504
+ ```
505
+
506
+ #### Using the load_user_token_put_with_http_info variant
507
+
508
+ This returns an Array which contains the response data, status code and headers.
509
+
510
+ > <Array(<ResendBalanceNotification200Response>, Integer, Hash)> load_user_token_put_with_http_info(user_token, load_token, opts)
511
+
512
+ ```ruby
513
+ begin
514
+ # Resend Load Notification
515
+ data, status_code, headers = api_instance.load_user_token_put_with_http_info(user_token, load_token, opts)
516
+ p status_code # => 2xx
517
+ p headers # => { ... }
518
+ p data # => <ResendBalanceNotification200Response>
519
+ rescue MassPayRubySdk::ApiError => e
520
+ puts "Error when calling LoadApi->load_user_token_put_with_http_info: #{e}"
521
+ end
522
+ ```
523
+
524
+ ### Parameters
525
+
526
+ | Name | Type | Description | Notes |
527
+ | ---- | ---- | ----------- | ----- |
528
+ | **user_token** | **String** | Token representing the user to load/fetch loads for | |
529
+ | **load_token** | **String** | Load token | |
530
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
531
+
532
+ ### Return type
533
+
534
+ [**ResendBalanceNotification200Response**](ResendBalanceNotification200Response.md)
535
+
536
+ ### Authorization
537
+
538
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
539
+
540
+ ### HTTP request headers
541
+
542
+ - **Content-Type**: Not defined
543
+ - **Accept**: application/json
544
+
545
+
546
+ ## resend_balance_notification
547
+
548
+ > <ResendBalanceNotification200Response> resend_balance_notification(user_token, opts)
549
+
550
+ Resend Balance Notification
551
+
552
+
553
+
554
+ ### Examples
555
+
556
+ ```ruby
557
+ require 'time'
558
+ require 'masspay_ruby_sdk'
559
+ # setup authorization
560
+ MassPayRubySdk.configure do |config|
561
+ # Configure API key authorization: AUTHORIZER_NAME
562
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
563
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
564
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
565
+ end
566
+
567
+ api_instance = MassPayRubySdk::LoadApi.new
568
+ user_token = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Token representing the user who owns the wallet
569
+ opts = {
570
+ idempotency_key: 'idempotency_key_example', # String | Unique key to prevent duplicate processing
571
+ wallet_token: '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Optional wallet token. If none is provided, select the first wallet available
572
+ }
573
+
574
+ begin
575
+ # Resend Balance Notification
576
+ result = api_instance.resend_balance_notification(user_token, opts)
577
+ p result
578
+ rescue MassPayRubySdk::ApiError => e
579
+ puts "Error when calling LoadApi->resend_balance_notification: #{e}"
580
+ end
581
+ ```
582
+
583
+ #### Using the resend_balance_notification_with_http_info variant
584
+
585
+ This returns an Array which contains the response data, status code and headers.
586
+
587
+ > <Array(<ResendBalanceNotification200Response>, Integer, Hash)> resend_balance_notification_with_http_info(user_token, opts)
588
+
589
+ ```ruby
590
+ begin
591
+ # Resend Balance Notification
592
+ data, status_code, headers = api_instance.resend_balance_notification_with_http_info(user_token, opts)
593
+ p status_code # => 2xx
594
+ p headers # => { ... }
595
+ p data # => <ResendBalanceNotification200Response>
596
+ rescue MassPayRubySdk::ApiError => e
597
+ puts "Error when calling LoadApi->resend_balance_notification_with_http_info: #{e}"
598
+ end
599
+ ```
600
+
601
+ ### Parameters
602
+
603
+ | Name | Type | Description | Notes |
604
+ | ---- | ---- | ----------- | ----- |
605
+ | **user_token** | **String** | Token representing the user who owns the wallet | |
606
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
607
+ | **wallet_token** | **String** | Optional wallet token. If none is provided, select the first wallet available | [optional] |
608
+
609
+ ### Return type
610
+
611
+ [**ResendBalanceNotification200Response**](ResendBalanceNotification200Response.md)
612
+
613
+ ### Authorization
614
+
615
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
616
+
617
+ ### HTTP request headers
618
+
619
+ - **Content-Type**: Not defined
620
+ - **Accept**: application/json
621
+
data/docs/LoadTxn.md ADDED
@@ -0,0 +1,32 @@
1
+ # MassPayRubySdk::LoadTxn
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **client_load_id** | **String** | A client defined load identifier. This is the unique ID assigned to the load on your system. Max 50 characters. | |
8
+ | **source_token** | **String** | Token that represents the funding source i.e. bank account, wallet. 36 characters long | |
9
+ | **amount** | **Float** | The amount to credit the user&#39;s wallet in source currency | |
10
+ | **source_currency_code** | **String** | The currency originating balance is stored in. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. In most cases this value will be USD, and therefore the defaut value if none is provided. There is a special currency case for PNTS - learn more [here] (#Points) | [optional] |
11
+ | **notes** | **String** | A description for the load. Will be visible to the user receiving the load | [optional] |
12
+ | **notify_user** | **Boolean** | Should we notify the user via email that they&#39;ve received a load? If the user has no existing account, they will receive instructions to establish such account. | [optional][default to true] |
13
+ | **time_to_process** | **String** | Future date/time to process the load on. If none is provided, it is processed right away. Time to be provided in UTC [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) | [optional] |
14
+ | **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this load. Do not include PII as this object is not encrypted. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'masspay_ruby_sdk'
20
+
21
+ instance = MassPayRubySdk::LoadTxn.new(
22
+ client_load_id: aEjn345,
23
+ source_token: ba4275f2-bae1-488d-9d6f-20af1cd83574,
24
+ amount: 100.5,
25
+ source_currency_code: USD,
26
+ notes: Commission payment for July,
27
+ notify_user: null,
28
+ time_to_process: The date/time to process the load. In UTC. 2021-02-25T23:00:00Z,
29
+ metadata: {&quot;group_id&quot;:541}
30
+ )
31
+ ```
32
+
@@ -0,0 +1,20 @@
1
+ # MassPayRubySdk::LoadTxnResp
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **load_token** | **String** | Token that represents the load that was just created. | |
8
+ | **status** | **String** | Status that indicates whether the transaction was successfully processed. If &#x60;COMPLETED&#x60;, the load was successfully processed. &#x60;CANCELLED&#x60; indicates a generic error. and &#x60;SCHEDULED&#x60; means the load was successfully scheduled | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'masspay_ruby_sdk'
14
+
15
+ instance = MassPayRubySdk::LoadTxnResp.new(
16
+ load_token: ba4275f2-bae1-488d-9d6f-20af1cd83574,
17
+ status: null
18
+ )
19
+ ```
20
+