Class: PaymentRails::Client
- Inherits:
-
Object
- Object
- PaymentRails::Client
- Defined in:
- lib/paymentrails/Client.rb
Instance Method Summary collapse
- #delete(endPoint) ⇒ Object
- #get(endPoint) ⇒ Object
-
#initialize(config) ⇒ Client
constructor
A new instance of Client.
- #patch(endPoint, body) ⇒ Object
- #post(endPoint, body) ⇒ Object
Constructor Details
#initialize(config) ⇒ Client
Returns a new instance of Client.
10 11 12 |
# File 'lib/paymentrails/Client.rb', line 10 def initialize(config) @config = config end |
Instance Method Details
#delete(endPoint) ⇒ Object
23 24 25 |
# File 'lib/paymentrails/Client.rb', line 23 def delete(endPoint) send_request(endPoint, 'DELETE') end |
#get(endPoint) ⇒ Object
14 15 16 |
# File 'lib/paymentrails/Client.rb', line 14 def get(endPoint) send_request(endPoint, 'GET') end |
#patch(endPoint, body) ⇒ Object
27 28 29 30 |
# File 'lib/paymentrails/Client.rb', line 27 def patch(endPoint, body) body = body.to_json send_request(endPoint, 'PATCH', body) end |
#post(endPoint, body) ⇒ Object
18 19 20 21 |
# File 'lib/paymentrails/Client.rb', line 18 def post(endPoint, body) body = body.to_json send_request(endPoint, 'POST', body) end |