Class: Batches::EntryModeBatchesTransactionsPaymentMethodEntryMode
- Inherits:
-
Object
- Object
- Batches::EntryModeBatchesTransactionsPaymentMethodEntryMode
- Defined in:
- lib/batches/models/entry_mode_batches_transactions_payment_method_entry_mode.rb
Overview
Indicates how the payment method information was obtained by the Merchant
for this transaction. * MOTO - A CNP channel
entry mode where the payment method information was obtained over the phone
or via postal mail. * ECOM - A CNP channel entry
mode where the payment method was obtained via a browser.
* IN_APP - A CNP channel entry mode where the payment method was
obtained via an application and applies to digital wallets only.
* CHIP - A CP channel entry mode where the payment method
information was obtained from a chip. E.g. card is inserted into a device to
read the chip. * SWIPE - A CP channel entry mode
where the payment method information was obtained from swiping a magnetic
strip. E.g. card's magnetic strip is swiped through a device to read the
card information. * MANUAL - A CP channel entry
mode where the payment method information was obtained by manually keying
the payment method information into the device. *
CONTACTLESS_CHIP - A CP channel entry mode where the payment method
information was obtained by bringing the payment method to close proximity
of a device. E.g. tap a card on or near a device to exchange card
information. * CONTACTLESS_SWIPE - A CP channel
entry mode where the payment method information was obtained by bringing the
payment method to close proximity of a device and also swiping the card.
E.g. tap a card on or near a device and swipe it through device to exchange
card information * PHONE - A CNP channel entry
mode where the payment method was obtained over the phone.
* MAIL - A CNP channel entry mode where the payment method was
obtained via postal mail. * PRESENT- The entry
mode cannot be determined but it is a Customer Present transaction.
* UNKNOWN - The entry mode for this transaction cannot be
determined.
Constant Summary collapse
- ENTRY_MODE_BATCHES_TRANSACTIONS_PAYMENT_METHOD_ENTRY_MODE =
[ # TODO: Write general description for MOTO MOTO = 'MOTO'.freeze, # TODO: Write general description for ECOM ECOM = 'ECOM'.freeze, # TODO: Write general description for IN_APP IN_APP = 'IN_APP'.freeze, # TODO: Write general description for CHIP CHIP = 'CHIP'.freeze, # TODO: Write general description for SWIPE SWIPE = 'SWIPE'.freeze, # TODO: Write general description for MANUAL MANUAL = 'MANUAL'.freeze, # TODO: Write general description for PHONE PHONE = 'PHONE'.freeze, # TODO: Write general description for MAIL MAIL = 'MAIL'.freeze, # TODO: Write general description for CONTACTLESS_CHIP CONTACTLESS_CHIP = 'CONTACTLESS_CHIP'.freeze, # TODO: Write general description for CONTACTLESS_SWIPE CONTACTLESS_SWIPE = 'CONTACTLESS_SWIPE'.freeze, # TODO: Write general description for PRESENT PRESENT = 'PRESENT'.freeze, # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = MOTO) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/batches/models/entry_mode_batches_transactions_payment_method_entry_mode.rb', line 81 def self.from_value(value, default_value = MOTO) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'moto' then MOTO when 'ecom' then ECOM when 'in_app' then IN_APP when 'chip' then CHIP when 'swipe' then SWIPE when 'manual' then MANUAL when 'phone' then PHONE when 'mail' then MAIL when 'contactless_chip' then CONTACTLESS_CHIP when 'contactless_swipe' then CONTACTLESS_SWIPE when 'present' then PRESENT when 'unknown' then UNKNOWN else default_value end end |
.validate(value) ⇒ Object
75 76 77 78 79 |
# File 'lib/batches/models/entry_mode_batches_transactions_payment_method_entry_mode.rb', line 75 def self.validate(value) return false if value.nil? ENTRY_MODE_BATCHES_TRANSACTIONS_PAYMENT_METHOD_ENTRY_MODE.include?(value) end |