masspay_ruby_sdk 1.0.0 → 2.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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/CODE_OF_CONDUCT.md +43 -0
  4. data/CONTRIBUTING.md +48 -9
  5. data/LICENSE.md +21 -0
  6. data/README.md +141 -176
  7. data/assets/logo.webp +0 -0
  8. data/lib/masspay_ruby_sdk/api/account_service.rb +35 -0
  9. data/lib/masspay_ruby_sdk/api/attribute_service.rb +41 -0
  10. data/lib/masspay_ruby_sdk/api/card_service.rb +35 -0
  11. data/lib/masspay_ruby_sdk/api/catalog_service.rb +74 -0
  12. data/lib/masspay_ruby_sdk/api/kyc_service.rb +56 -0
  13. data/lib/masspay_ruby_sdk/api/load_service.rb +62 -0
  14. data/lib/masspay_ruby_sdk/api/payout_service.rb +61 -0
  15. data/lib/masspay_ruby_sdk/api/spend_back_service.rb +35 -0
  16. data/lib/masspay_ruby_sdk/api/subaccount_service.rb +47 -0
  17. data/lib/masspay_ruby_sdk/api/tax_service.rb +38 -0
  18. data/lib/masspay_ruby_sdk/api/user_service.rb +71 -0
  19. data/lib/masspay_ruby_sdk/api/wallet_service.rb +50 -0
  20. data/lib/masspay_ruby_sdk/client.rb +93 -0
  21. data/lib/masspay_ruby_sdk/constants.rb +20 -0
  22. data/lib/masspay_ruby_sdk/version.rb +6 -8
  23. data/lib/masspay_ruby_sdk.rb +23 -75
  24. data/masspay_ruby_sdk.gemspec +9 -13
  25. metadata +24 -120
  26. data/Rakefile +0 -10
  27. data/docs/AccountApi.md +0 -150
  28. data/docs/ApiResponse.md +0 -22
  29. data/docs/AttrTxn.md +0 -20
  30. data/docs/AttrValue.md +0 -20
  31. data/docs/AttrVelocityRequestInner.md +0 -20
  32. data/docs/AttributeApi.md +0 -168
  33. data/docs/AttrsRequirement.md +0 -36
  34. data/docs/AutopayResp.md +0 -22
  35. data/docs/AutopayRule.md +0 -20
  36. data/docs/AvailableBalanceTxnResp.md +0 -22
  37. data/docs/CardApi.md +0 -160
  38. data/docs/CatalogApi.md +0 -469
  39. data/docs/CompaniesResp.md +0 -18
  40. data/docs/Company.md +0 -26
  41. data/docs/Country.md +0 -22
  42. data/docs/Exception.md +0 -20
  43. data/docs/FoundUser.md +0 -24
  44. data/docs/GetAccountStatement200Response.md +0 -18
  45. data/docs/GetTransactionConfirmationDetails200Response.md +0 -18
  46. data/docs/GetUserAgreement200Response.md +0 -26
  47. data/docs/GetUserAgreementsNames200ResponseInner.md +0 -24
  48. data/docs/GetUserUserTokenKycAu10tix200Response.md +0 -18
  49. data/docs/GetUserUserTokenKycVeriff200Response.md +0 -18
  50. data/docs/GetWalletCardInfo200Response.md +0 -30
  51. data/docs/IDUpload.md +0 -20
  52. data/docs/KYCApi.md +0 -305
  53. data/docs/LoadApi.md +0 -621
  54. data/docs/LoadTxn.md +0 -32
  55. data/docs/LoadTxnResp.md +0 -20
  56. data/docs/Loads.md +0 -36
  57. data/docs/PayoutApi.md +0 -403
  58. data/docs/PayoutTxn.md +0 -36
  59. data/docs/PayoutTxnCommitResp.md +0 -24
  60. data/docs/PayoutTxnResp.md +0 -60
  61. data/docs/ResendBalanceNotification200Response.md +0 -18
  62. data/docs/Service.md +0 -22
  63. data/docs/ServicePayersInner.md +0 -38
  64. data/docs/ServicePayersInnerExchangeRateInner.md +0 -20
  65. data/docs/SpendBackApi.md +0 -161
  66. data/docs/SpendBackTxn.md +0 -28
  67. data/docs/SpendBackTxnResp.md +0 -22
  68. data/docs/SpendBacks.md +0 -34
  69. data/docs/StoredUser.md +0 -56
  70. data/docs/TaxApi.md +0 -81
  71. data/docs/TaxYearUserResp.md +0 -48
  72. data/docs/TxnHistoryResp.md +0 -52
  73. data/docs/UpdateUser.md +0 -52
  74. data/docs/User.md +0 -50
  75. data/docs/UserApi.md +0 -403
  76. data/docs/WalletApi.md +0 -463
  77. data/docs/WalletTxnResp.md +0 -34
  78. data/docs/logo.webp +0 -0
  79. data/lib/masspay_ruby_sdk/api/account_api.rb +0 -149
  80. data/lib/masspay_ruby_sdk/api/attribute_api.rb +0 -214
  81. data/lib/masspay_ruby_sdk/api/card_api.rb +0 -174
  82. data/lib/masspay_ruby_sdk/api/catalog_api.rb +0 -443
  83. data/lib/masspay_ruby_sdk/api/kyc_api.rb +0 -290
  84. data/lib/masspay_ruby_sdk/api/load_api.rb +0 -598
  85. data/lib/masspay_ruby_sdk/api/payout_api.rb +0 -397
  86. data/lib/masspay_ruby_sdk/api/spend_back_api.rb +0 -160
  87. data/lib/masspay_ruby_sdk/api/tax_api.rb +0 -82
  88. data/lib/masspay_ruby_sdk/api/user_api.rb +0 -418
  89. data/lib/masspay_ruby_sdk/api/wallet_api.rb +0 -461
  90. data/lib/masspay_ruby_sdk/api_client.rb +0 -391
  91. data/lib/masspay_ruby_sdk/api_error.rb +0 -57
  92. data/lib/masspay_ruby_sdk/configuration.rb +0 -315
  93. data/lib/masspay_ruby_sdk/models/api_response.rb +0 -236
  94. data/lib/masspay_ruby_sdk/models/attr_txn.rb +0 -235
  95. data/lib/masspay_ruby_sdk/models/attr_value.rb +0 -239
  96. data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +0 -273
  97. data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +0 -372
  98. data/lib/masspay_ruby_sdk/models/autopay_resp.rb +0 -256
  99. data/lib/masspay_ruby_sdk/models/autopay_rule.rb +0 -241
  100. data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +0 -254
  101. data/lib/masspay_ruby_sdk/models/companies_resp.rb +0 -225
  102. data/lib/masspay_ruby_sdk/models/company.rb +0 -285
  103. data/lib/masspay_ruby_sdk/models/country.rb +0 -296
  104. data/lib/masspay_ruby_sdk/models/exception.rb +0 -241
  105. data/lib/masspay_ruby_sdk/models/found_user.rb +0 -270
  106. data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +0 -225
  107. data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +0 -218
  108. data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +0 -280
  109. data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +0 -270
  110. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +0 -224
  111. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +0 -224
  112. data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +0 -460
  113. data/lib/masspay_ruby_sdk/models/id_upload.rb +0 -273
  114. data/lib/masspay_ruby_sdk/models/load_txn.rb +0 -321
  115. data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +0 -273
  116. data/lib/masspay_ruby_sdk/models/loads.rb +0 -388
  117. data/lib/masspay_ruby_sdk/models/payout_txn.rb +0 -328
  118. data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +0 -293
  119. data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +0 -613
  120. data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +0 -225
  121. data/lib/masspay_ruby_sdk/models/service.rb +0 -318
  122. data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +0 -373
  123. data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +0 -239
  124. data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +0 -325
  125. data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +0 -307
  126. data/lib/masspay_ruby_sdk/models/spend_backs.rb +0 -340
  127. data/lib/masspay_ruby_sdk/models/stored_user.rb +0 -500
  128. data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +0 -388
  129. data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +0 -571
  130. data/lib/masspay_ruby_sdk/models/update_user.rb +0 -490
  131. data/lib/masspay_ruby_sdk/models/user.rb +0 -423
  132. data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +0 -375
  133. data/spec/api_client_spec.rb +0 -227
  134. data/spec/configuration_spec.rb +0 -41
  135. data/spec/spec_helper.rb +0 -110
@@ -1,598 +0,0 @@
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 LoadApi
16
- attr_accessor :api_client
17
-
18
- def initialize(api_client = ApiClient.default)
19
- @api_client = api_client
20
- end
21
- # Reverse a user load
22
- # 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.
23
- # @param user_token [String] Token representing the user to load/fetch loads for
24
- # @param load_token [String] Load token
25
- # @param [Hash] opts the optional parameters
26
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
27
- # @return [nil]
28
- def cancel_user_load(user_token, load_token, opts = {})
29
- cancel_user_load_with_http_info(user_token, load_token, opts)
30
- nil
31
- end
32
-
33
- # Reverse a user load
34
- # This **DELETE** endpoint is used to reverse a load transaction that was already processed, allowing you to remove funds from a user&#39;s wallet. &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 load_token as a parameter in the Query string. &lt;br&gt; 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.
35
- # @param user_token [String] Token representing the user to load/fetch loads for
36
- # @param load_token [String] Load token
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
39
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
40
- def cancel_user_load_with_http_info(user_token, load_token, opts = {})
41
- if @api_client.config.debugging
42
- @api_client.config.logger.debug 'Calling API: LoadApi.cancel_user_load ...'
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 LoadApi.cancel_user_load"
47
- end
48
- # verify the required parameter 'load_token' is set
49
- if @api_client.config.client_side_validation && load_token.nil?
50
- fail ArgumentError, "Missing the required parameter 'load_token' when calling LoadApi.cancel_user_load"
51
- end
52
- # resource path
53
- local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
54
-
55
- # query parameters
56
- query_params = opts[:query_params] || {}
57
- query_params[:'load_token'] = load_token
58
-
59
- # header parameters
60
- header_params = opts[:header_params] || {}
61
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
62
-
63
- # form parameters
64
- form_params = opts[:form_params] || {}
65
-
66
- # http body (model)
67
- post_body = opts[:debug_body]
68
-
69
- # return_type
70
- return_type = opts[:debug_return_type]
71
-
72
- # auth_names
73
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
74
-
75
- new_options = opts.merge(
76
- :operation => :"LoadApi.cancel_user_load",
77
- :header_params => header_params,
78
- :query_params => query_params,
79
- :form_params => form_params,
80
- :body => post_body,
81
- :auth_names => auth_names,
82
- :return_type => return_type
83
- )
84
-
85
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
86
- if @api_client.config.debugging
87
- @api_client.config.logger.debug "API called: LoadApi#cancel_user_load\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
- end
89
- return data, status_code, headers
90
- end
91
-
92
- # Add autopay rule
93
- # 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.
94
- # @param user_token [String] Token representing the user who owns the wallet
95
- # @param wallet_token [String] Token representing the wallet
96
- # @param [Hash] opts the optional parameters
97
- # @option opts [AutopayRule] :autopay_rule Autopay rule configuration
98
- # @return [AutopayResp]
99
- def create_autopay_rule(user_token, wallet_token, opts = {})
100
- data, _status_code, _headers = create_autopay_rule_with_http_info(user_token, wallet_token, opts)
101
- data
102
- end
103
-
104
- # Add autopay rule
105
- # This **POST** endpoint is used to add an autopay rule that will initiate a payout whenever the provided wallet token is loaded. &lt;br&gt; You can use this endpoint to create an autopay rule that automatically sends a percentage of incoming load to a specific destination. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; and &#x60;wallet_token&#x60; as required parameters in the URL Path, and the &#x60;destination_token&#x60; and percentage of incoming load that should be autopaid to the &#x60;destination_token&#x60; in the request Body. &lt;br&gt; The response will include a JSON object containing the details of the created autopay rule, including the token, &#x60;destination_token&#x60; and percentage.
106
- # @param user_token [String] Token representing the user who owns the wallet
107
- # @param wallet_token [String] Token representing the wallet
108
- # @param [Hash] opts the optional parameters
109
- # @option opts [AutopayRule] :autopay_rule Autopay rule configuration
110
- # @return [Array<(AutopayResp, Integer, Hash)>] AutopayResp data, response status code and response headers
111
- def create_autopay_rule_with_http_info(user_token, wallet_token, opts = {})
112
- if @api_client.config.debugging
113
- @api_client.config.logger.debug 'Calling API: LoadApi.create_autopay_rule ...'
114
- end
115
- # verify the required parameter 'user_token' is set
116
- if @api_client.config.client_side_validation && user_token.nil?
117
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.create_autopay_rule"
118
- end
119
- # verify the required parameter 'wallet_token' is set
120
- if @api_client.config.client_side_validation && wallet_token.nil?
121
- fail ArgumentError, "Missing the required parameter 'wallet_token' when calling LoadApi.create_autopay_rule"
122
- end
123
- # resource path
124
- local_var_path = '/wallet/{user_token}/{wallet_token}/autopay'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'wallet_token' + '}', CGI.escape(wallet_token.to_s))
125
-
126
- # query parameters
127
- query_params = opts[:query_params] || {}
128
-
129
- # header parameters
130
- header_params = opts[:header_params] || {}
131
- # HTTP header 'Accept' (if needed)
132
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
- # HTTP header 'Content-Type'
134
- content_type = @api_client.select_header_content_type(['application/json'])
135
- if !content_type.nil?
136
- header_params['Content-Type'] = content_type
137
- end
138
-
139
- # form parameters
140
- form_params = opts[:form_params] || {}
141
-
142
- # http body (model)
143
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'autopay_rule'])
144
-
145
- # return_type
146
- return_type = opts[:debug_return_type] || 'AutopayResp'
147
-
148
- # auth_names
149
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
150
-
151
- new_options = opts.merge(
152
- :operation => :"LoadApi.create_autopay_rule",
153
- :header_params => header_params,
154
- :query_params => query_params,
155
- :form_params => form_params,
156
- :body => post_body,
157
- :auth_names => auth_names,
158
- :return_type => return_type
159
- )
160
-
161
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
162
- if @api_client.config.debugging
163
- @api_client.config.logger.debug "API called: LoadApi#create_autopay_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
164
- end
165
- return data, status_code, headers
166
- end
167
-
168
- # Delete autopay rule
169
- # 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.
170
- # @param user_token [String] Token representing the user who owns the wallet
171
- # @param wallet_token [String] Token representing the wallet
172
- # @param token [String] Autopay token to delete
173
- # @param [Hash] opts the optional parameters
174
- # @return [nil]
175
- def delete_autopay_rule(user_token, wallet_token, token, opts = {})
176
- delete_autopay_rule_with_http_info(user_token, wallet_token, token, opts)
177
- nil
178
- end
179
-
180
- # Delete autopay rule
181
- # This **DELETE** endpoint is used to delete an existing autopay rule. &lt;br&gt; You can use this endpoint to remove an autopay rule that is no longer needed. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; and &#x60;wallet_token&#x60; as required parameters in the URL Path, and the token of the autopay rule you wish to delete in the request Body. &lt;br&gt; The response will include a message indicating the success of the deletion.
182
- # @param user_token [String] Token representing the user who owns the wallet
183
- # @param wallet_token [String] Token representing the wallet
184
- # @param token [String] Autopay token to delete
185
- # @param [Hash] opts the optional parameters
186
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
187
- def delete_autopay_rule_with_http_info(user_token, wallet_token, token, opts = {})
188
- if @api_client.config.debugging
189
- @api_client.config.logger.debug 'Calling API: LoadApi.delete_autopay_rule ...'
190
- end
191
- # verify the required parameter 'user_token' is set
192
- if @api_client.config.client_side_validation && user_token.nil?
193
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.delete_autopay_rule"
194
- end
195
- # verify the required parameter 'wallet_token' is set
196
- if @api_client.config.client_side_validation && wallet_token.nil?
197
- fail ArgumentError, "Missing the required parameter 'wallet_token' when calling LoadApi.delete_autopay_rule"
198
- end
199
- # verify the required parameter 'token' is set
200
- if @api_client.config.client_side_validation && token.nil?
201
- fail ArgumentError, "Missing the required parameter 'token' when calling LoadApi.delete_autopay_rule"
202
- end
203
- # resource path
204
- local_var_path = '/wallet/{user_token}/{wallet_token}/autopay'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'wallet_token' + '}', CGI.escape(wallet_token.to_s))
205
-
206
- # query parameters
207
- query_params = opts[:query_params] || {}
208
- query_params[:'token'] = token
209
-
210
- # header parameters
211
- header_params = opts[:header_params] || {}
212
- # HTTP header 'Accept' (if needed)
213
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
-
215
- # form parameters
216
- form_params = opts[:form_params] || {}
217
-
218
- # http body (model)
219
- post_body = opts[:debug_body]
220
-
221
- # return_type
222
- return_type = opts[:debug_return_type]
223
-
224
- # auth_names
225
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
226
-
227
- new_options = opts.merge(
228
- :operation => :"LoadApi.delete_autopay_rule",
229
- :header_params => header_params,
230
- :query_params => query_params,
231
- :form_params => form_params,
232
- :body => post_body,
233
- :auth_names => auth_names,
234
- :return_type => return_type
235
- )
236
-
237
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
238
- if @api_client.config.debugging
239
- @api_client.config.logger.debug "API called: LoadApi#delete_autopay_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
- end
241
- return data, status_code, headers
242
- end
243
-
244
- # Get all autopay rules
245
- # 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.
246
- # @param user_token [String] Token representing the user who owns the wallet
247
- # @param wallet_token [String] Token representing the wallet
248
- # @param [Hash] opts the optional parameters
249
- # @return [Array<AutopayResp>]
250
- def get_autopay_rules(user_token, wallet_token, opts = {})
251
- data, _status_code, _headers = get_autopay_rules_with_http_info(user_token, wallet_token, opts)
252
- data
253
- end
254
-
255
- # Get all autopay rules
256
- # This **GET** endpoint is used to retrieve all autopay rules currently applied to the provided wallet token. &lt;br&gt; You can use this endpoint to obtain information about the autopay rules associated with the wallet. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; and &#x60;wallet_token&#x60; as required parameters in the URL Path. &lt;br&gt; The response will include a JSON array containing details for each autopay rule, including the token, &#x60;destination_token&#x60; and percentage.
257
- # @param user_token [String] Token representing the user who owns the wallet
258
- # @param wallet_token [String] Token representing the wallet
259
- # @param [Hash] opts the optional parameters
260
- # @return [Array<(Array<AutopayResp>, Integer, Hash)>] Array<AutopayResp> data, response status code and response headers
261
- def get_autopay_rules_with_http_info(user_token, wallet_token, opts = {})
262
- if @api_client.config.debugging
263
- @api_client.config.logger.debug 'Calling API: LoadApi.get_autopay_rules ...'
264
- end
265
- # verify the required parameter 'user_token' is set
266
- if @api_client.config.client_side_validation && user_token.nil?
267
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.get_autopay_rules"
268
- end
269
- # verify the required parameter 'wallet_token' is set
270
- if @api_client.config.client_side_validation && wallet_token.nil?
271
- fail ArgumentError, "Missing the required parameter 'wallet_token' when calling LoadApi.get_autopay_rules"
272
- end
273
- # resource path
274
- local_var_path = '/wallet/{user_token}/{wallet_token}/autopay'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)).sub('{' + 'wallet_token' + '}', CGI.escape(wallet_token.to_s))
275
-
276
- # query parameters
277
- query_params = opts[:query_params] || {}
278
-
279
- # header parameters
280
- header_params = opts[:header_params] || {}
281
- # HTTP header 'Accept' (if needed)
282
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
283
-
284
- # form parameters
285
- form_params = opts[:form_params] || {}
286
-
287
- # http body (model)
288
- post_body = opts[:debug_body]
289
-
290
- # return_type
291
- return_type = opts[:debug_return_type] || 'Array<AutopayResp>'
292
-
293
- # auth_names
294
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
295
-
296
- new_options = opts.merge(
297
- :operation => :"LoadApi.get_autopay_rules",
298
- :header_params => header_params,
299
- :query_params => query_params,
300
- :form_params => form_params,
301
- :body => post_body,
302
- :auth_names => auth_names,
303
- :return_type => return_type
304
- )
305
-
306
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
307
- if @api_client.config.debugging
308
- @api_client.config.logger.debug "API called: LoadApi#get_autopay_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
- end
310
- return data, status_code, headers
311
- end
312
-
313
- # Get history of loads by user token
314
- # 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.
315
- # @param user_token [String] The user token that needs to be fetched.
316
- # @param [Hash] opts the optional parameters
317
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
318
- # @return [Array<Loads>]
319
- def get_user_loads_by_token(user_token, opts = {})
320
- data, _status_code, _headers = get_user_loads_by_token_with_http_info(user_token, opts)
321
- data
322
- end
323
-
324
- # Get history of loads by user token
325
- # This **GET** endpoint is used to retrieve a transaction history of all loads that were made to the provided user token, including scheduled loads. &lt;br&gt; 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. &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 return a JSON array of load transactions, each including transactions details.
326
- # @param user_token [String] The user token that needs to be fetched.
327
- # @param [Hash] opts the optional parameters
328
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
329
- # @return [Array<(Array<Loads>, Integer, Hash)>] Array<Loads> data, response status code and response headers
330
- def get_user_loads_by_token_with_http_info(user_token, opts = {})
331
- if @api_client.config.debugging
332
- @api_client.config.logger.debug 'Calling API: LoadApi.get_user_loads_by_token ...'
333
- end
334
- # verify the required parameter 'user_token' is set
335
- if @api_client.config.client_side_validation && user_token.nil?
336
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.get_user_loads_by_token"
337
- end
338
- # resource path
339
- local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
340
-
341
- # query parameters
342
- query_params = opts[:query_params] || {}
343
-
344
- # header parameters
345
- header_params = opts[:header_params] || {}
346
- # HTTP header 'Accept' (if needed)
347
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
348
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
349
-
350
- # form parameters
351
- form_params = opts[:form_params] || {}
352
-
353
- # http body (model)
354
- post_body = opts[:debug_body]
355
-
356
- # return_type
357
- return_type = opts[:debug_return_type] || 'Array<Loads>'
358
-
359
- # auth_names
360
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
361
-
362
- new_options = opts.merge(
363
- :operation => :"LoadApi.get_user_loads_by_token",
364
- :header_params => header_params,
365
- :query_params => query_params,
366
- :form_params => form_params,
367
- :body => post_body,
368
- :auth_names => auth_names,
369
- :return_type => return_type
370
- )
371
-
372
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
373
- if @api_client.config.debugging
374
- @api_client.config.logger.debug "API called: LoadApi#get_user_loads_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
375
- end
376
- return data, status_code, headers
377
- end
378
-
379
- # Initiate a load transaction
380
- # 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.
381
- # @param user_token [String] Token representing the user to load
382
- # @param load_txn [LoadTxn] Load information
383
- # @param [Hash] opts the optional parameters
384
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
385
- # @return [LoadTxnResp]
386
- def load_user(user_token, load_txn, opts = {})
387
- data, _status_code, _headers = load_user_with_http_info(user_token, load_txn, opts)
388
- data
389
- end
390
-
391
- # Initiate a load transaction
392
- # This **POST** endpoint is used to initiate a load transaction, allowing you to add funds to a user token&#39;s wallet. &lt;br&gt; To use this endpoint, you need to provide the &#x60;user_token&#x60; as a parameter in the URL Path. You also need to provide the &#x60;client_load_id&#x60;, &#x60;source_token&#x60;, and amount as JSON parameters in the Request Body. The &#x60;client_load_id&#x60; is a unique identifier for the transaction that you can use to track it, while the &#x60;source_token&#x60; 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&#39;s wallet. &lt;br&gt; The response will contain a JSON object indicating the status of the load transaction and any relevant details.
393
- # @param user_token [String] Token representing the user to load
394
- # @param load_txn [LoadTxn] Load information
395
- # @param [Hash] opts the optional parameters
396
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
397
- # @return [Array<(LoadTxnResp, Integer, Hash)>] LoadTxnResp data, response status code and response headers
398
- def load_user_with_http_info(user_token, load_txn, opts = {})
399
- if @api_client.config.debugging
400
- @api_client.config.logger.debug 'Calling API: LoadApi.load_user ...'
401
- end
402
- # verify the required parameter 'user_token' is set
403
- if @api_client.config.client_side_validation && user_token.nil?
404
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.load_user"
405
- end
406
- # verify the required parameter 'load_txn' is set
407
- if @api_client.config.client_side_validation && load_txn.nil?
408
- fail ArgumentError, "Missing the required parameter 'load_txn' when calling LoadApi.load_user"
409
- end
410
- # resource path
411
- local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
412
-
413
- # query parameters
414
- query_params = opts[:query_params] || {}
415
-
416
- # header parameters
417
- header_params = opts[:header_params] || {}
418
- # HTTP header 'Accept' (if needed)
419
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
420
- # HTTP header 'Content-Type'
421
- content_type = @api_client.select_header_content_type(['application/json'])
422
- if !content_type.nil?
423
- header_params['Content-Type'] = content_type
424
- end
425
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
426
-
427
- # form parameters
428
- form_params = opts[:form_params] || {}
429
-
430
- # http body (model)
431
- post_body = opts[:debug_body] || @api_client.object_to_http_body(load_txn)
432
-
433
- # return_type
434
- return_type = opts[:debug_return_type] || 'LoadTxnResp'
435
-
436
- # auth_names
437
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
438
-
439
- new_options = opts.merge(
440
- :operation => :"LoadApi.load_user",
441
- :header_params => header_params,
442
- :query_params => query_params,
443
- :form_params => form_params,
444
- :body => post_body,
445
- :auth_names => auth_names,
446
- :return_type => return_type
447
- )
448
-
449
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
450
- if @api_client.config.debugging
451
- @api_client.config.logger.debug "API called: LoadApi#load_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
452
- end
453
- return data, status_code, headers
454
- end
455
-
456
- # Resend Load Notification
457
- # 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.
458
- # @param user_token [String] Token representing the user to load/fetch loads for
459
- # @param load_token [String] Load token
460
- # @param [Hash] opts the optional parameters
461
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
462
- # @return [ResendBalanceNotification200Response]
463
- def load_user_token_put(user_token, load_token, opts = {})
464
- data, _status_code, _headers = load_user_token_put_with_http_info(user_token, load_token, opts)
465
- data
466
- end
467
-
468
- # Resend Load Notification
469
- # This **PUT** endpoint is used to resend a load notification to the user associated with the provided &#x60;user_token&#x60; for a specific load transaction. &lt;br&gt; You can use this endpoint to help ensure that users are notified promptly and accurately of any incoming funds or other important payment events. &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 &#x60;load_token&#x60; as a parameter in the Query string. The endpoint will then resend a notification to the user for the specified load transaction. &lt;br&gt; The response will contain a JSON object indicating the status of the request.
470
- # @param user_token [String] Token representing the user to load/fetch loads for
471
- # @param load_token [String] Load token
472
- # @param [Hash] opts the optional parameters
473
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
474
- # @return [Array<(ResendBalanceNotification200Response, Integer, Hash)>] ResendBalanceNotification200Response data, response status code and response headers
475
- def load_user_token_put_with_http_info(user_token, load_token, opts = {})
476
- if @api_client.config.debugging
477
- @api_client.config.logger.debug 'Calling API: LoadApi.load_user_token_put ...'
478
- end
479
- # verify the required parameter 'user_token' is set
480
- if @api_client.config.client_side_validation && user_token.nil?
481
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.load_user_token_put"
482
- end
483
- # verify the required parameter 'load_token' is set
484
- if @api_client.config.client_side_validation && load_token.nil?
485
- fail ArgumentError, "Missing the required parameter 'load_token' when calling LoadApi.load_user_token_put"
486
- end
487
- # resource path
488
- local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
489
-
490
- # query parameters
491
- query_params = opts[:query_params] || {}
492
- query_params[:'load_token'] = load_token
493
-
494
- # header parameters
495
- header_params = opts[:header_params] || {}
496
- # HTTP header 'Accept' (if needed)
497
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
498
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
499
-
500
- # form parameters
501
- form_params = opts[:form_params] || {}
502
-
503
- # http body (model)
504
- post_body = opts[:debug_body]
505
-
506
- # return_type
507
- return_type = opts[:debug_return_type] || 'ResendBalanceNotification200Response'
508
-
509
- # auth_names
510
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
511
-
512
- new_options = opts.merge(
513
- :operation => :"LoadApi.load_user_token_put",
514
- :header_params => header_params,
515
- :query_params => query_params,
516
- :form_params => form_params,
517
- :body => post_body,
518
- :auth_names => auth_names,
519
- :return_type => return_type
520
- )
521
-
522
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
523
- if @api_client.config.debugging
524
- @api_client.config.logger.debug "API called: LoadApi#load_user_token_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
525
- end
526
- return data, status_code, headers
527
- end
528
-
529
- # Resend Balance Notification
530
- #
531
- # @param user_token [String] Token representing the user who owns the wallet
532
- # @param [Hash] opts the optional parameters
533
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
534
- # @option opts [String] :wallet_token Optional wallet token. If none is provided, select the first wallet available
535
- # @return [ResendBalanceNotification200Response]
536
- def resend_balance_notification(user_token, opts = {})
537
- data, _status_code, _headers = resend_balance_notification_with_http_info(user_token, opts)
538
- data
539
- end
540
-
541
- # Resend Balance Notification
542
- #
543
- # @param user_token [String] Token representing the user who owns the wallet
544
- # @param [Hash] opts the optional parameters
545
- # @option opts [String] :idempotency_key Unique key to prevent duplicate processing
546
- # @option opts [String] :wallet_token Optional wallet token. If none is provided, select the first wallet available
547
- # @return [Array<(ResendBalanceNotification200Response, Integer, Hash)>] ResendBalanceNotification200Response data, response status code and response headers
548
- def resend_balance_notification_with_http_info(user_token, opts = {})
549
- if @api_client.config.debugging
550
- @api_client.config.logger.debug 'Calling API: LoadApi.resend_balance_notification ...'
551
- end
552
- # verify the required parameter 'user_token' is set
553
- if @api_client.config.client_side_validation && user_token.nil?
554
- fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.resend_balance_notification"
555
- end
556
- # resource path
557
- local_var_path = '/wallet/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s))
558
-
559
- # query parameters
560
- query_params = opts[:query_params] || {}
561
- query_params[:'wallet_token'] = opts[:'wallet_token'] if !opts[:'wallet_token'].nil?
562
-
563
- # header parameters
564
- header_params = opts[:header_params] || {}
565
- # HTTP header 'Accept' (if needed)
566
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
567
- header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
568
-
569
- # form parameters
570
- form_params = opts[:form_params] || {}
571
-
572
- # http body (model)
573
- post_body = opts[:debug_body]
574
-
575
- # return_type
576
- return_type = opts[:debug_return_type] || 'ResendBalanceNotification200Response'
577
-
578
- # auth_names
579
- auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME']
580
-
581
- new_options = opts.merge(
582
- :operation => :"LoadApi.resend_balance_notification",
583
- :header_params => header_params,
584
- :query_params => query_params,
585
- :form_params => form_params,
586
- :body => post_body,
587
- :auth_names => auth_names,
588
- :return_type => return_type
589
- )
590
-
591
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
592
- if @api_client.config.debugging
593
- @api_client.config.logger.debug "API called: LoadApi#resend_balance_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
594
- end
595
- return data, status_code, headers
596
- end
597
- end
598
- end