Class: Plaid::AchClass

Inherits:
Object
  • Object
show all
Defined in:
lib/plaid/models/ach_class.rb

Overview

Specifies the use case of the transfer. Required for transfers on an ACH network. ‘“arc”` - Accounts Receivable Entry `“cbr`” - Cross Border Entry `“ccd”` - Corporate Credit or Debit - fund transfer between two corporate bank accounts `“cie”` - Customer Initiated Entry `“cor”` - Automated Notification of Change `“ctx”` - Corporate Trade Exchange `“iat”` - International `“mte”` - Machine Transfer Entry `“pbr”` - Cross Border Entry `“pop”` - Point-of-Purchase Entry `“pos”` - Point-of-Sale Entry `“ppd”` - Prearranged Payment or Deposit - the transfer is part of a pre-existing relationship with a consumer, eg. bill payment `“rck”` - Re-presented Check Entry `“tel”` - Telephone-Initiated Entry `“web”` - Internet-Initiated Entry

  • debits from a consumer’s account where their authorization is obtained

over the Internet

Constant Summary collapse

ACH_CLASS =
[
  # TODO: Write general description for ARC
  ARC = 'arc'.freeze,

  # TODO: Write general description for CBR
  CBR = 'cbr'.freeze,

  # TODO: Write general description for CCD
  CCD = 'ccd'.freeze,

  # TODO: Write general description for CIE
  CIE = 'cie'.freeze,

  # TODO: Write general description for COR
  COR = 'cor'.freeze,

  # TODO: Write general description for CTX
  CTX = 'ctx'.freeze,

  # TODO: Write general description for IAT
  IAT = 'iat'.freeze,

  # TODO: Write general description for MTE
  MTE = 'mte'.freeze,

  # TODO: Write general description for PBR
  PBR = 'pbr'.freeze,

  # TODO: Write general description for POP
  POP = 'pop'.freeze,

  # TODO: Write general description for POS
  POS = 'pos'.freeze,

  # TODO: Write general description for PPD
  PPD = 'ppd'.freeze,

  # TODO: Write general description for RCK
  RCK = 'rck'.freeze,

  # TODO: Write general description for TEL
  TEL = 'tel'.freeze,

  # TODO: Write general description for WEB
  WEB = 'web'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ARC) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/plaid/models/ach_class.rb', line 73

def self.from_value(value, default_value = ARC)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'arc' then ARC
  when 'cbr' then CBR
  when 'ccd' then CCD
  when 'cie' then CIE
  when 'cor' then COR
  when 'ctx' then CTX
  when 'iat' then IAT
  when 'mte' then MTE
  when 'pbr' then PBR
  when 'pop' then POP
  when 'pos' then POS
  when 'ppd' then PPD
  when 'rck' then RCK
  when 'tel' then TEL
  when 'web' then WEB
  else
    default_value
  end
end

.validate(value) ⇒ Object



67
68
69
70
71
# File 'lib/plaid/models/ach_class.rb', line 67

def self.validate(value)
  return false if value.nil?

  true
end