Class: Qonto::Client

Inherits:
Object
  • Object
show all
Includes:
Actions::Organization, Actions::Transactions
Defined in:
lib/qonto/client.rb

Constant Summary collapse

API_VERSION =
'v2'.freeze
BASE_URL =
'https://thirdparty.qonto.eu/'.freeze
USER_AGENT =
"qonto-ruby/#{VERSION}".freeze

Instance Method Summary collapse

Methods included from Actions::Transactions

#list_transactions

Methods included from Actions::Organization

#get_organization

Constructor Details

#initialize(slug:, secret_key:) ⇒ Client

Returns a new instance of Client.



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

def initialize(slug:, secret_key:)
  @slug = slug
  @secret_key = secret_key
end

Instance Method Details

#base_urlObject



20
21
22
# File 'lib/qonto/client.rb', line 20

def base_url
  "#{BASE_URL}#{API_VERSION}"
end

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



24
25
26
# File 'lib/qonto/client.rb', line 24

def get(path, options = {})
  execute(:get, path, options)
end