Class used to call the Institutions product.

Sections
Methods
G
S
Public
Instance Public methods
get(count:, offset:, country_codes:, options: nil)

Get information about Plaid institutions.

Does a POST /institutions/get call pulls a list of supported Plaid institutions with the information for each institution.

count

Amount of institutions to pull.

offset

Offset to start pulling institutions.

options

Options for filtering institutions.

Returns

Returns a MultipleInstitutionsResponse instance.

# File lib/plaid/products/institutions.rb, line 14
def get(count:, offset:, country_codes:, options: nil)
  payload = { count: count,
              offset: offset,
              country_codes: country_codes }
  payload[:options] = options unless options.nil?

  post_with_auth 'institutions/get',
                 MultipleInstitutionsResponse,
                 payload
end
get_by_id(institution_id, country_codes, options: nil)

Get information about a Plaid institution by ID.

Does a POST /institutions/get_by_id call which allows you to pull information for an institution by ID.

institution_id

Specific institution id to fetch information for.

options

Options for filtering institutions.

Returns

Returns a SingleInstitutionResponse instance.

# File lib/plaid/products/institutions.rb, line 34
def get_by_id(institution_id, country_codes, options: nil)
  payload = {
    institution_id: institution_id,
    country_codes: country_codes
  }
  payload[:options] = options unless options.nil?
  post_with_auth 'institutions/get_by_id',
                 SingleInstitutionResponse,
                 payload
end

Get information about all available institutions matching your query.

Does a POST /institutions/search call which allows you to pull a list of institutions using a query parameter.

query

Search query to attempt to match institutions to.

products

Product supported filter (optional).

options

Options for filtering institutions.

Returns

Returns a MultipleInstitutionsResponse instance.

# File lib/plaid/products/institutions.rb, line 56
def search(query, country_codes, products = nil, options: nil)
  payload = {
    query: query,
    products: products,
    country_codes: country_codes
  }

  payload[:options] = options unless options.nil?

  post_with_auth 'institutions/search',
                 MultipleInstitutionsResponse,
                 payload
end