Method: TransferZero::TransactionsApi#validate_transactions_with_http_info
- Defined in:
- lib/transferzero-sdk/api/transactions_api.rb
#validate_transactions_with_http_info(transaction_request, opts = {}) ⇒ Array<(TransactionResponse, Fixnum, Hash)>
Validates a transaction payload Validates fields in a transaction payload and displays invalid or missing fields
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/transferzero-sdk/api/transactions_api.rb', line 447 def validate_transactions_with_http_info(transaction_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionsApi.validate_transactions ...' end # verify the required parameter 'transaction_request' is set if @api_client.config.client_side_validation && transaction_request.nil? fail ArgumentError, "Missing the required parameter 'transaction_request' when calling TransactionsApi.validate_transactions" end # resource path local_var_path = '/transactions/validate' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(transaction_request) auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TransactionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionsApi#validate_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |