class Aurfy::Client
Attributes
api_url[R]
merchantid[R]
trade_certificate[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/aurfy/client.rb, line 8 def initialize(options = {}) @api_url = options[:test] ? TEST_API_URL : API_URL @merchantid = options[:merchantid] @trade_certificate = options[:trade_certificate] end
Public Instance Methods
purchase(options = {})
click to toggle source
# File lib/aurfy/client.rb, line 14 def purchase(options = {}) configure = Configure.new(options.merge(merchantid: merchantid, trade_certificate: trade_certificate)) response = Faraday.post api_url, configure.params Response.new(response) end