Class: Revolut::Connection
- Inherits:
-
Object
- Object
- Revolut::Connection
- Defined in:
- lib/revolut/connection.rb
Overview
A class responsible for connecting to Revolut API and making requests.
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
-
#initialize(client) ⇒ Connection
constructor
A new instance of Connection.
- #post(path, options = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ Connection
Returns a new instance of Connection.
15 16 17 |
# File 'lib/revolut/connection.rb', line 15 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
13 14 15 |
# File 'lib/revolut/connection.rb', line 13 def client @client end |
Instance Method Details
#delete(path, options = {}) ⇒ Object
27 28 29 |
# File 'lib/revolut/connection.rb', line 27 def delete(path, = {}) request(:delete, path, ).body end |
#get(path, options = {}) ⇒ Object
19 20 21 |
# File 'lib/revolut/connection.rb', line 19 def get(path, = {}) request(:get, path, ).body end |
#post(path, options = {}) ⇒ Object
23 24 25 |
# File 'lib/revolut/connection.rb', line 23 def post(path, = {}) request(:post, path, {}, ).body end |