class Mobilepay::Client
Clients requests
Attributes
body[R]
headers[R]
merchant_id[R]
privatekey[R]
Public Class Methods
new(args = {})
click to toggle source
# File lib/mobilepay/client.rb, line 29 def initialize(args = {}) @privatekey = args[:privatekey] @headers = { 'Ocp-Apim-Subscription-Key' => args[:subscription_key], 'Content-Type' => 'application/json' } @merchant_id = args[:merchant_id] headers['Test-mode'] = 'true' if args[:test_mode] == true @body = '' end
Private Instance Methods
check_args(args)
click to toggle source
# File lib/mobilepay/client.rb, line 37 def check_args(args) args.each do |arg_name, value| if value.nil? raise Failure, "Invalid argument '#{arg_name}', must be string" end end end