Class: AchClient::SiliconValleyBank::AchTransaction

Inherits:
Abstract::AchTransaction show all
Defined in:
lib/ach_client/providers/sftp/silicon_valley_bank/ach_transaction.rb

Overview

SVB representation of a single ACH Transaction

Instance Method Summary collapse

Methods inherited from Abstract::AchTransaction

arguments, #credit?, #debit?, #initialize

Constructor Details

This class inherits a constructor from AchClient::Abstract::AchTransaction

Instance Method Details

#sendObject

SVB only does batch transactions In the future, this could maybe send a batch with this transaction as the single transaction, but due to SVB NACHA file naming convention, we have a limit of 99 transactions per day



10
11
12
# File 'lib/ach_client/providers/sftp/silicon_valley_bank/ach_transaction.rb', line 10

def send
  raise 'SiliconValleyBank does not support individual transactions'
end

#to_entry_detailACH::EntryDetail

Converts this ach transaction to the ACH gem's representation of a ach transaction for eventual NACHA transformation

Returns:

  • (ACH::EntryDetail)

    ACH gem's ach transaction record



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ach_client/providers/sftp/silicon_valley_bank/ach_transaction.rb', line 17

def to_entry_detail
  entry = ACH::EntryDetail.new
  entry.transaction_code = transaction_code
  entry.routing_number = routing_number
  entry. = 
  entry.amount = Helpers::DollarsToCents.dollars_to_cents(amount)
  # Not sure what this does yet, suspect is foreign key set by us
  entry.individual_id_number = external_ach_id # Doesn't need to be a number
  entry.individual_name = merchant_name
  entry.originating_dfi_identification =
    AchClient::SiliconValleyBank.originating_dfi_identification
  # Not sure what this does yet, suspect is foreign key set by us
  entry.trace_number = external_ach_id.gsub(/\D/, '').to_i # Does need to be a number
  entry
end