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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Account.

Parameters:



71
72
73
# File 'lib/finch_api/resources/account.rb', line 71

def initialize(client:)
  @client = client
end

Instance Method Details

#disconnect(request_options: {}) ⇒ FinchAPI::Models::DisconnectResponse

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

Parameters:

Returns:

See Also:



15
16
17
18
19
20
21
22
23
# File 'lib/finch_api/resources/account.rb', line 15

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

#disconnect_entity(entity_ids:, request_options: {}) ⇒ FinchAPI::Models::DisconnectEntityResponse

Disconnect entity(s) from a connection without affecting other entities associated with the same connection.

Parameters:

  • entity_ids (Array<String>)

    Array of entity UUIDs to disconnect. At least one entity ID must be provided.

  • request_options (FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/finch_api/resources/account.rb', line 37

def disconnect_entity(params)
  parsed, options = FinchAPI::AccountDisconnectEntityParams.dump_request(params)
  @client.request(
    method: :post,
    path: "disconnect-entity",
    body: parsed,
    model: FinchAPI::DisconnectEntityResponse,
    security: {bearer_auth: true},
    options: options
  )
end

#introspect(request_options: {}) ⇒ FinchAPI::Models::Introspection

Read account information associated with an ‘access_token`

Parameters:

Returns:

See Also:



58
59
60
61
62
63
64
65
66
# File 'lib/finch_api/resources/account.rb', line 58

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