Class: ModernTreasury::Resources::Connections

Inherits:
Object
  • Object
show all
Defined in:
lib/modern_treasury/resources/connections.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Connections

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 Connections.

Parameters:



38
39
40
# File 'lib/modern_treasury/resources/connections.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#list(after_cursor: nil, entity: nil, per_page: nil, vendor_customer_id: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::Connection>

Get a list of all connections.

Parameters:

  • after_cursor (String, nil)
  • entity (String)

    A string code representing the vendor (i.e. bank).

  • per_page (Integer)
  • vendor_customer_id (String)

    An identifier assigned by the vendor to your organization.

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

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/modern_treasury/resources/connections.rb', line 23

def list(params = {})
  parsed, options = ModernTreasury::ConnectionListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "api/connections",
    query: parsed,
    page: ModernTreasury::Internal::Page,
    model: ModernTreasury::Connection,
    options: options
  )
end