Class: Truelayer::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(access_token) ⇒ Client

Returns a new instance of Client.



10
11
12
# File 'lib/truelayer/client.rb', line 10

def initialize(access_token)
  @access_token = access_token
end

Instance Method Details

#get(path, headers: {}, params: {}) ⇒ Object



14
15
16
17
18
# File 'lib/truelayer/client.rb', line 14

def get(path, headers: {}, params: {})
  connection.get(path, params, headers).tap do |response|
    handle_response(response)
  end
end

#post(path, headers: {}, params: {}) ⇒ Object



20
21
22
23
24
# File 'lib/truelayer/client.rb', line 20

def post(path, headers: {}, params: {})
  connection.post(path, params, headers).tap do |response|
    handle_response(response)
  end
end