Class: Revolut::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/revolut/connection.rb

Overview

A class responsible for connecting to Revolut API and making requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject (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, options = {})
  request(:delete, path, options).body
end

#get(path, options = {}) ⇒ Object



19
20
21
# File 'lib/revolut/connection.rb', line 19

def get(path, options = {})
  request(:get, path, options).body
end

#post(path, options = {}) ⇒ Object



23
24
25
# File 'lib/revolut/connection.rb', line 23

def post(path, options = {})
  request(:post, path, {}, options).body
end