Method: Braspag::Connection#convert
- Defined in:
- lib/cbraspag/core/connection.rb
#convert(method_name, direction, args) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/cbraspag/core/connection.rb', line 84 def convert(method_name, direction, args) target = case method_name when :authorize, :void, :capture, :archive_card, :get_card, :recurrency CreditCard when :generate_billet Billet when :generate_eft EFT when :info_billet, :info_credit_card, :info Order when :encrypt Crypto::Webservice end target.send("#{direction}_#{method_name}", *([self] + args)) end |