Sha256: 3579d3e2ed3a4f87fa7612941d7b7a298a95d00c3fe6121d28d3a3631e26803b
Contents?: true
Size: 1.19 KB
Versions: 8
Compression:
Stored size: 1.19 KB
Contents
#!/usr/bin/env ruby require "bundler/setup" require "atrium" require "pry" require "yaml" def load_settings if ::File.exists?("tmp/settings.yml") puts "=> Using key and ID in tmp/settings.yml ¬" ::YAML.load(::File.read("tmp/settings.yml")) else settings = {} puts "What is your MX-API-KEY?" settings[:mx_api_key] = gets.chomp puts "What is your Client ID?" settings[:mx_client_id] = gets.chomp puts "Would you like to save API key and client ID for future use?" case gets.chomp when /y/i ::File.open("tmp/settings.yml", "w") { |f| f.write(settings.to_yaml) } puts "Settings written to tmp/settings.yml ¬" settings when /n/i puts "One-time use settings ¬" settings end end end settings = load_settings settings.each { |k,v| puts "\t#{k}: #{v}" } ::Atrium.configure do |config| config.mx_client_id = settings[:mx_client_id] config.mx_api_key = settings[:mx_api_key] end ## Example flow # # 1. Create a User # 2. Read that user data via GUID # 3. List Institutions # 4. Get credentials for institution # 5. Create member on user # 6. Check member aggregation status # 7. Read other user data (accounts, members, transactions) #
Version data entries
8 entries across 8 versions & 1 rubygems