<commit_before>require 'rubygems'
require 'yaml'
require 'authorizenet' 
require 'securerandom'

  include AuthorizeNet::API

  def debit_bank_account()
    config = YAML.load_file(File.dirname(__FILE__) + "/../credentials.yml")
  
    transaction = Transaction.new(config['api_login_id'], config['api_transaction_key'], :gateway => :sandbox)
    
    request = CreateTransactionRequest.new
  
    request.transactionRequest = TransactionRequestType.new()
    request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2)
    request.transactionRequest.payment = PaymentType.new
    request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','121042882','1234567890', '<NAME>','WEB','Wells Fargo Bank NA','101') 
    request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction
    request.transactionRequest.order = OrderType.new("invoiceNumber#{(SecureRandom.random_number*1000000).round(0)}","Order Description")    

    response = transaction.create_transaction(request)

    if response != nil
      if response.messages.resultCode == MessageTypeEnum::Ok
        if response.transactionResponse != nil && (response.transactionResponse.messages != nil)
          puts "Successfully debited bank account."
          puts "  Transaction ID: #{response.transactionResponse.transId}"
          puts "  Transaction response code: #{response.transactionResponse.responseCode}"
          puts "  Code: #{response.transactionResponse.messages.messages[0].code}"
		      puts "  Description: #{response.transactionResponse.messages.messages[0].description}"
        else<commit_msg>Update debit-bank-account.rb<commit_after>require 'rubygems'
require 'yaml'
require 'authorizenet' 
require 'securerandom'

  include AuthorizeNet::API

  def debit_bank_account()
    config = YAML.load_file(File.dirname(__FILE__) + "/../credentials.yml")
  
    transaction = Transaction.new(config['api_login_id'], config['api_transaction_key'], :gateway => :sandbox)
    
    request = CreateTransactionRequest.new
  
    request.transactionRequest = TransactionRequestType.new()
    request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 15 ).round(2)
    request.transactionRequest.payment = PaymentType.new
    request.transactionRequest.payment.bankAccount = BankAccountType.new('checking','125000105','1234567890', '<NAME>','WEB','Wells Fargo Bank NA','101') 
    request.transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction
    request.transactionRequest.order = OrderType.new("invoiceNumber#{(SecureRandom.random_number*1000000).round(0)}","Order Description")    

    response = transaction.create_transaction(request)

    if response != nil
      if response.messages.resultCode == MessageTypeEnum::Ok
        if response.transactionResponse != nil && (response.transactionResponse.messages != nil)
          puts "Successfully debited bank account."
          puts "  Transaction ID: #{response.transactionResponse.transId}"
          puts "  Transaction response code: #{response.transactionResponse.responseCode}"
          puts "  Code: #{response.transactionResponse.messages.messages[0].code}"
		      puts "  Description: #{response.transactionResponse.messages.messages[0].description}"
        else
{'fraction_non_alphanumeric': 0.11720397710153661, 'fraction_numerical': 0.0216932811087677, 'mean_word_length': 4.6752136752136755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7545391', 'n_tokens_mistral': 921, 'n_tokens_neox': 857, 'n_words': 152}