class Flow::Reference::PaymentMethods

Constants

SUPPORTED_CREDIT_CARDS

Public Class Methods

find(payment_code) click to toggle source
# File lib/flow-reference.rb, line 88
def find(payment_code)
  code = payment_code.gsub(/[^\w]/,'').capitalize.gsub(/_(\w)/){ $1.upcase }
  return nil unless Data.respond_to?(code)
  Data.send(code)
end
find!(payment_code) click to toggle source
# File lib/flow-reference.rb, line 94
def find!(payment_code)
   find(payment_code) || raise(ArgumentError, 'Payment method "%s" is not found' % payment_code)
end