Method: Allpay::Client#initialize
- Defined in:
- lib/allpay/client.rb
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/allpay/client.rb', line 20 def initialize = {} = {mode: :production}.merge!() case [:mode] when :production option_required! :merchant_id, :hash_key, :hash_iv when :test = TEST_OPTIONS.merge() else raise InvalidMode, %Q{option :mode is either :test or :production} end .freeze end |