class Payture::Api::V1::Client
Attributes
api_methods[R]
Public Class Methods
new(options={})
click to toggle source
# File lib/payture/api/v1/client.rb, line 9 def initialize(options={}) options = Payture::Api::V1.options.merge(options) Configuration::VALID_OPTIONS_KEYS.each do |key| send("#{key}=", options[key]) end if 'api' == self.api_type class << self; include Client::PaytureApi; end elsif 'apim' == self.api_type class << self; include Client::PaytureApim; end elsif 'vwapi' == self.api_type class << self; include Client::PaytureVwapi; end end end
Public Instance Methods
make_request(method, params)
click to toggle source
# File lib/payture/api/v1/client.rb, line 24 def make_request(method, params) Request.new(url_for(method), params) end
url_for(method)
click to toggle source
# File lib/payture/api/v1/client.rb, line 28 def url_for(method) "https://#{host}.#{Configuration::DOMAIN}/#{api_type}/#{method}" end