Class: AchClient::Sftp::AccountTypeTransformer

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

Overview

Transforms AccountTypes 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 Checking, ‘3’ means Savings The account type string is the first character in the transaction_code field.

Returns:

  • (Hash {String => Class})

    the mapping



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

def self.transformer
  {
    '3' => AchClient::AccountTypes::Savings,
    '2' => AchClient::AccountTypes::Checking
  }
end