Fundthrough/finicity-ruby

View on GitHub
lib/finicity/resources/institution.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Finicity
  module Resources
    class Institution < Base
      def self.list(query = {})
        endpoint = "/aggregation/v1/institutions"
        query = { query: query } if query.present?

        request(:get, endpoint, query)
      end

      def self.get(institution_id)
        endpoint = "/aggregation/v1/institutions/#{institution_id}/details"

        request(:get, endpoint)
      end
    end
  end
end