Class: CreditDevice::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/credit_device/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(type, path, params = {}) ⇒ Client

Returns a new instance of Client.



5
6
7
8
9
# File 'lib/credit_device/client.rb', line 5

def initialize(type, path, params = {})
  @path = path
  @type = type
  @params = params
end

Instance Method Details

#requestObject



11
12
13
14
# File 'lib/credit_device/client.rb', line 11

def request
  full_url = url + @path
  send("#{@type}_request", full_url, @params)
end