Class: CreditDevice::Client
- Inherits:
-
Object
- Object
- CreditDevice::Client
- Defined in:
- lib/credit_device/client.rb
Instance Method Summary collapse
-
#initialize(type, path, params = {}) ⇒ Client
constructor
A new instance of Client.
- #request ⇒ Object
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
#request ⇒ Object
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 |