Class: AchClient::Sftp::TransactionTypeTransformer

Inherits:
Transformer
  • Object
show all
Defined in:
lib/ach_client/providers/sftp/transaction_type_transformer.rb

Overview

Transforms TransactionTypes between AchClient class and the string that NACHA expects

Class Method Summary collapse

Methods inherited from Transformer

deserialize_provider_value, serialize_to_provider_value

Class Method Details

.transformerHash {String => Class}

‘2’ means Credit, ‘7’ means Debit The account type string is the second character in the transaction_code field.

Returns:

  • (Hash {String => Class})

    the mapping



11
12
13
14
15
16
# File 'lib/ach_client/providers/sftp/transaction_type_transformer.rb', line 11

def self.transformer
  {
    '2' => AchClient::TransactionTypes::Credit,
    '7' => AchClient::TransactionTypes::Debit
  }
end