Class: FinchAPI::Resources::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/finch-api/resources/account.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Account

Returns a new instance of Account.

Parameters:



39
40
41
# File 'lib/finch-api/resources/account.rb', line 39

def initialize(client:)
  @client = client
end

Instance Method Details

#disconnect(params = {}) ⇒ FinchAPI::Models::DisconnectResponse

Disconnect one or more ‘access_token`s from your application.

Parameters:

Returns:



13
14
15
16
17
18
19
20
# File 'lib/finch-api/resources/account.rb', line 13

def disconnect(params = {})
  @client.request(
    method: :post,
    path: "disconnect",
    model: FinchAPI::Models::DisconnectResponse,
    options: params[:request_options]
  )
end

#introspect(params = {}) ⇒ FinchAPI::Models::Introspection

Read account information associated with an ‘access_token`

Parameters:

Returns:



29
30
31
32
33
34
35
36
# File 'lib/finch-api/resources/account.rb', line 29

def introspect(params = {})
  @client.request(
    method: :get,
    path: "introspect",
    model: FinchAPI::Models::Introspection,
    options: params[:request_options]
  )
end