Sha256: 9ad2b059e9cf8b905c056434ed2d0dcb030eafe2b163038798cbe192e9b53b7b

Contents?: true

Size: 755 Bytes

Versions: 89

Compression:

Stored size: 755 Bytes

Contents

require 'thor'
require 'finapps'
require 'securerandom'
require 'pp'

module FinApps
  class CLI < Thor

    desc 'institutions_search', 'search institutions'

    def institutions_search(user_identifier, user_token, term=nil)

      begin
        client.user_credentials!(user_identifier, user_token)
        institutions, error_messages = client.institutions.search term
        if institutions.present?
          puts
          puts 'search results:'
          pp institutions
        else
          puts
          puts 'unable to search institutions'
          error_messages.each { |m| puts m } if error_messages.present?
        end
        puts

      rescue StandardError => error
        rescue_standard_error(error)
      end

    end

  end
end

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
finapps-0.15.1.pre lib/finapps/cli/institutions.rb
finapps-0.15.0.pre lib/finapps/cli/institutions.rb
finapps-0.14.5.pre lib/finapps/cli/institutions.rb
finapps-0.14.3.pre lib/finapps/cli/institutions.rb
finapps-0.14.2.pre lib/finapps/cli/institutions.rb
finapps-0.14.1.pre lib/finapps/cli/institutions.rb
finapps-0.14.0.pre lib/finapps/cli/institutions.rb
finapps-0.13.1.pre lib/finapps/cli/institutions.rb
finapps-0.13.0.pre lib/finapps/cli/institutions.rb
finapps-0.12.5.pre lib/finapps/cli/institutions.rb
finapps-0.12.4.pre lib/finapps/cli/institutions.rb
finapps-0.12.3.pre lib/finapps/cli/institutions.rb
finapps-0.12.2.pre lib/finapps/cli/institutions.rb
finapps-0.12.1.pre lib/finapps/cli/institutions.rb
finapps-0.12.0.pre lib/finapps/cli/institutions.rb
finapps-0.11.0.pre lib/finapps/cli/institutions.rb
finapps-0.10.1.pre lib/finapps/cli/institutions.rb
finapps-0.10.0.pre lib/finapps/cli/institutions.rb
finapps-0.9.0.pre lib/finapps/cli/institutions.rb
finapps-0.8.5.pre lib/finapps/cli/institutions.rb