Class: PaypalServerSdk::StandardEntryClassCode

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/standard_entry_class_code.rb

Overview

NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes.

Constant Summary collapse

STANDARD_ENTRY_CLASS_CODE =
[
  # The API caller (merchant/partner) accepts authorization and payment

  # information from a consumer over the telephone.

  TEL = 'TEL'.freeze,

  # The API caller (merchant/partner) accepts Debit transactions from a

  # consumer on their website.

  WEB = 'WEB'.freeze,

  # Cash concentration and disbursement for corporate debit transaction.

  # Used to disburse or consolidate funds. Entries are usually Optional

  # high-dollar, low-volume, and time-critical. (e.g. intra-company

  # transfers or invoice payments to suppliers).

  CCD = 'CCD'.freeze,

  # Prearranged payment and deposit entries. Used for debit payments

  # authorized by a consumer account holder, and usually initiated by a

  # company. These are usually recurring debits (such as insurance

  # premiums).

  PPD = 'PPD'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = TEL) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/paypal_server_sdk/models/standard_entry_class_code.rb', line 44

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

  str = value.to_s.strip

  case str.downcase
  when 'tel' then TEL
  when 'web' then WEB
  when 'ccd' then CCD
  when 'ppd' then PPD
  else
    default_value
  end
end

.validate(value) ⇒ Object



38
39
40
41
42
# File 'lib/paypal_server_sdk/models/standard_entry_class_code.rb', line 38

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

  true
end