Class: MassPayRubySdk::LoadApi
- Inherits:
-
Object
- Object
- MassPayRubySdk::LoadApi
- Defined in:
- lib/masspay_ruby_sdk/api/load_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_user_load(user_token, load_token, opts = {}) ⇒ nil
Reverse a user load This DELETE endpoint is used to reverse a load transaction that was already processed, allowing you to remove funds from a user’s wallet.
-
#cancel_user_load_with_http_info(user_token, load_token, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Reverse a user load This DELETE endpoint is used to reverse a load transaction that was already processed, allowing you to remove funds from a user's wallet.
-
#create_autopay_rule(user_token, wallet_token, opts = {}) ⇒ AutopayResp
Add autopay rule This POST endpoint is used to add an autopay rule that will initiate a payout whenever the provided wallet token is loaded.
-
#create_autopay_rule_with_http_info(user_token, wallet_token, opts = {}) ⇒ Array<(AutopayResp, Integer, Hash)>
Add autopay rule This POST endpoint is used to add an autopay rule that will initiate a payout whenever the provided wallet token is loaded.
-
#delete_autopay_rule(user_token, wallet_token, token, opts = {}) ⇒ nil
Delete autopay rule This DELETE endpoint is used to delete an existing autopay rule.
-
#delete_autopay_rule_with_http_info(user_token, wallet_token, token, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete autopay rule This DELETE endpoint is used to delete an existing autopay rule.
-
#get_autopay_rules(user_token, wallet_token, opts = {}) ⇒ Array<AutopayResp>
Get all autopay rules This GET endpoint is used to retrieve all autopay rules currently applied to the provided wallet token.
-
#get_autopay_rules_with_http_info(user_token, wallet_token, opts = {}) ⇒ Array<(Array<AutopayResp>, Integer, Hash)>
Get all autopay rules This GET endpoint is used to retrieve all autopay rules currently applied to the provided wallet token.
-
#get_user_loads_by_token(user_token, opts = {}) ⇒ Array<Loads>
Get history of loads by user token This GET endpoint is used to retrieve a transaction history of all loads that were made to the provided user token, including scheduled loads.
-
#get_user_loads_by_token_with_http_info(user_token, opts = {}) ⇒ Array<(Array<Loads>, Integer, Hash)>
Get history of loads by user token This GET endpoint is used to retrieve a transaction history of all loads that were made to the provided user token, including scheduled loads.
-
#initialize(api_client = ApiClient.default) ⇒ LoadApi
constructor
A new instance of LoadApi.
-
#load_user(user_token, load_txn, opts = {}) ⇒ LoadTxnResp
Initiate a load transaction This POST endpoint is used to initiate a load transaction, allowing you to add funds to a user token’s wallet.
-
#load_user_token_put(user_token, load_token, opts = {}) ⇒ ResendBalanceNotification200Response
Resend Load Notification This PUT endpoint is used to resend a load notification to the user associated with the provided
user_tokenfor a specific load transaction. -
#load_user_token_put_with_http_info(user_token, load_token, opts = {}) ⇒ Array<(ResendBalanceNotification200Response, Integer, Hash)>
Resend Load Notification This PUT endpoint is used to resend a load notification to the user associated with the provided `user_token` for a specific load transaction.
-
#load_user_with_http_info(user_token, load_txn, opts = {}) ⇒ Array<(LoadTxnResp, Integer, Hash)>
Initiate a load transaction This POST endpoint is used to initiate a load transaction, allowing you to add funds to a user token's wallet.
-
#resend_balance_notification(user_token, opts = {}) ⇒ ResendBalanceNotification200Response
Resend Balance Notification.
-
#resend_balance_notification_with_http_info(user_token, opts = {}) ⇒ Array<(ResendBalanceNotification200Response, Integer, Hash)>
Resend Balance Notification.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#cancel_user_load(user_token, load_token, opts = {}) ⇒ nil
Reverse a user load This DELETE endpoint is used to reverse a load transaction that was already processed, allowing you to remove funds from a user’s wallet.
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 attempt to reverse the specified load transaction. If the load is still in scheduled status, it will be marked as cancelled.
28 29 30 31 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 28 def cancel_user_load(user_token, load_token, opts = {}) cancel_user_load_with_http_info(user_token, load_token, opts) nil end |
#cancel_user_load_with_http_info(user_token, load_token, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Reverse a user load 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.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 40 def cancel_user_load_with_http_info(user_token, load_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.cancel_user_load ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.cancel_user_load" end # verify the required parameter 'load_token' is set if @api_client.config.client_side_validation && load_token.nil? fail ArgumentError, "Missing the required parameter 'load_token' when calling LoadApi.cancel_user_load" end # resource path local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'load_token'] = load_token # header parameters header_params = opts[:header_params] || {} header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.cancel_user_load", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#cancel_user_load\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_autopay_rule(user_token, wallet_token, opts = {}) ⇒ AutopayResp
Add autopay rule This POST endpoint is used to add an autopay rule that will initiate a payout whenever the provided wallet token is loaded.
You can use this endpoint to create an autopay rule that automatically sends a percentage of incoming load to a specific destination.
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.
The response will include a JSON object containing the details of the created autopay rule, including the token, destination_token and percentage.
99 100 101 102 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 99 def create_autopay_rule(user_token, wallet_token, opts = {}) data, _status_code, _headers = create_autopay_rule_with_http_info(user_token, wallet_token, opts) data end |
#create_autopay_rule_with_http_info(user_token, wallet_token, opts = {}) ⇒ Array<(AutopayResp, Integer, Hash)>
Add autopay rule 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.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 111 def create_autopay_rule_with_http_info(user_token, wallet_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.create_autopay_rule ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.create_autopay_rule" end # verify the required parameter 'wallet_token' is set if @api_client.config.client_side_validation && wallet_token.nil? fail ArgumentError, "Missing the required parameter 'wallet_token' when calling LoadApi.create_autopay_rule" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'autopay_rule']) # return_type return_type = opts[:debug_return_type] || 'AutopayResp' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.create_autopay_rule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#create_autopay_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_autopay_rule(user_token, wallet_token, token, opts = {}) ⇒ nil
Delete autopay rule This DELETE endpoint is used to delete an existing autopay rule.
You can use this endpoint to remove an autopay rule that is no longer needed.
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.
The response will include a message indicating the success of the deletion.
175 176 177 178 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 175 def delete_autopay_rule(user_token, wallet_token, token, opts = {}) delete_autopay_rule_with_http_info(user_token, wallet_token, token, opts) nil end |
#delete_autopay_rule_with_http_info(user_token, wallet_token, token, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete autopay rule 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.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 187 def delete_autopay_rule_with_http_info(user_token, wallet_token, token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.delete_autopay_rule ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.delete_autopay_rule" end # verify the required parameter 'wallet_token' is set if @api_client.config.client_side_validation && wallet_token.nil? fail ArgumentError, "Missing the required parameter 'wallet_token' when calling LoadApi.delete_autopay_rule" end # verify the required parameter 'token' is set if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling LoadApi.delete_autopay_rule" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} query_params[:'token'] = token # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.delete_autopay_rule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#delete_autopay_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_autopay_rules(user_token, wallet_token, opts = {}) ⇒ Array<AutopayResp>
Get all autopay rules This GET endpoint is used to retrieve all autopay rules currently applied to the provided wallet token.
You can use this endpoint to obtain information about the autopay rules associated with the wallet.
To use this endpoint, you need to provide the user_token and wallet_token as required parameters in the URL Path.
The response will include a JSON array containing details for each autopay rule, including the token, destination_token and percentage.
250 251 252 253 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 250 def get_autopay_rules(user_token, wallet_token, opts = {}) data, _status_code, _headers = get_autopay_rules_with_http_info(user_token, wallet_token, opts) data end |
#get_autopay_rules_with_http_info(user_token, wallet_token, opts = {}) ⇒ Array<(Array<AutopayResp>, Integer, Hash)>
Get all autopay rules 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.
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 261 def get_autopay_rules_with_http_info(user_token, wallet_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.get_autopay_rules ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.get_autopay_rules" end # verify the required parameter 'wallet_token' is set if @api_client.config.client_side_validation && wallet_token.nil? fail ArgumentError, "Missing the required parameter 'wallet_token' when calling LoadApi.get_autopay_rules" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<AutopayResp>' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.get_autopay_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#get_autopay_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_loads_by_token(user_token, opts = {}) ⇒ Array<Loads>
Get history of loads by user token This GET endpoint is used to retrieve a transaction history of all loads that were made to the provided user token, including scheduled loads.
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.
To use this endpoint, you need to provide the user_token as a parameter in the URL Path.
The endpoint will then return a JSON array of load transactions, each including transactions details.
319 320 321 322 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 319 def get_user_loads_by_token(user_token, opts = {}) data, _status_code, _headers = get_user_loads_by_token_with_http_info(user_token, opts) data end |
#get_user_loads_by_token_with_http_info(user_token, opts = {}) ⇒ Array<(Array<Loads>, Integer, Hash)>
Get history of loads by user token 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.
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 330 def get_user_loads_by_token_with_http_info(user_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.get_user_loads_by_token ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.get_user_loads_by_token" end # resource path local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Loads>' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.get_user_loads_by_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#get_user_loads_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#load_user(user_token, load_txn, opts = {}) ⇒ LoadTxnResp
Initiate a load transaction This POST endpoint is used to initiate a load transaction, allowing you to add funds to a user token’s wallet.
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.
The response will contain a JSON object indicating the status of the load transaction and any relevant details.
386 387 388 389 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 386 def load_user(user_token, load_txn, opts = {}) data, _status_code, _headers = load_user_with_http_info(user_token, load_txn, opts) data end |
#load_user_token_put(user_token, load_token, opts = {}) ⇒ ResendBalanceNotification200Response
Resend Load Notification This PUT endpoint is used to resend a load notification to the user associated with the provided user_token for a specific load transaction.
You can use this endpoint to help ensure that users are notified promptly and accurately of any incoming funds or other important payment events.
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.
The response will contain a JSON object indicating the status of the request.
463 464 465 466 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 463 def load_user_token_put(user_token, load_token, opts = {}) data, _status_code, _headers = load_user_token_put_with_http_info(user_token, load_token, opts) data end |
#load_user_token_put_with_http_info(user_token, load_token, opts = {}) ⇒ Array<(ResendBalanceNotification200Response, Integer, Hash)>
Resend Load Notification 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.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 475 def load_user_token_put_with_http_info(user_token, load_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.load_user_token_put ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.load_user_token_put" end # verify the required parameter 'load_token' is set if @api_client.config.client_side_validation && load_token.nil? fail ArgumentError, "Missing the required parameter 'load_token' when calling LoadApi.load_user_token_put" end # resource path local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'load_token'] = load_token # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ResendBalanceNotification200Response' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.load_user_token_put", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#load_user_token_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#load_user_with_http_info(user_token, load_txn, opts = {}) ⇒ Array<(LoadTxnResp, Integer, Hash)>
Initiate a load transaction 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.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 398 def load_user_with_http_info(user_token, load_txn, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.load_user ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.load_user" end # verify the required parameter 'load_txn' is set if @api_client.config.client_side_validation && load_txn.nil? fail ArgumentError, "Missing the required parameter 'load_txn' when calling LoadApi.load_user" end # resource path local_var_path = '/load/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(load_txn) # return_type return_type = opts[:debug_return_type] || 'LoadTxnResp' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.load_user", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#load_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#resend_balance_notification(user_token, opts = {}) ⇒ ResendBalanceNotification200Response
Resend Balance Notification
536 537 538 539 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 536 def resend_balance_notification(user_token, opts = {}) data, _status_code, _headers = resend_balance_notification_with_http_info(user_token, opts) data end |
#resend_balance_notification_with_http_info(user_token, opts = {}) ⇒ Array<(ResendBalanceNotification200Response, Integer, Hash)>
Resend Balance Notification
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/masspay_ruby_sdk/api/load_api.rb', line 548 def resend_balance_notification_with_http_info(user_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoadApi.resend_balance_notification ...' end # verify the required parameter 'user_token' is set if @api_client.config.client_side_validation && user_token.nil? fail ArgumentError, "Missing the required parameter 'user_token' when calling LoadApi.resend_balance_notification" end # resource path local_var_path = '/wallet/{user_token}'.sub('{' + 'user_token' + '}', CGI.escape(user_token.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'wallet_token'] = opts[:'wallet_token'] if !opts[:'wallet_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ResendBalanceNotification200Response' # auth_names auth_names = opts[:debug_auth_names] || ['AUTHORIZER_NAME'] = opts.merge( :operation => :"LoadApi.resend_balance_notification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LoadApi#resend_balance_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |