Sha256: 2f514184b9324f2f0ab981ec353da203c9d263a4e5e97a88cbf86d4655b7a473

Contents?: true

Size: 804 Bytes

Versions: 15

Compression:

Stored size: 804 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 = '4JZmhcHVf3ODRJ9TMKF7N/1sHDY3M5Q49A9ToAy+TDE=', 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

15 entries across 15 versions & 1 rubygems

Version Path
finapps-0.18.4.pre lib/finapps/cli/institutions.rb
finapps-0.18.3.pre lib/finapps/cli/institutions.rb
finapps-0.18.2.pre lib/finapps/cli/institutions.rb
finapps-0.18.1.pre lib/finapps/cli/institutions.rb
finapps-0.18.0.pre lib/finapps/cli/institutions.rb
finapps-0.17.1.pre lib/finapps/cli/institutions.rb
finapps-0.17.0.pre lib/finapps/cli/institutions.rb
finapps-0.16.6.pre lib/finapps/cli/institutions.rb
finapps-0.16.5.pre lib/finapps/cli/institutions.rb
finapps-0.16.4.pre lib/finapps/cli/institutions.rb
finapps-0.16.3.pre lib/finapps/cli/institutions.rb
finapps-0.16.2.pre lib/finapps/cli/institutions.rb
finapps-0.16.1.pre lib/finapps/cli/institutions.rb
finapps-0.16.0.pre lib/finapps/cli/institutions.rb
finapps-0.15.2.pre lib/finapps/cli/institutions.rb