# CapitalOnTap Simple Capital on Tap API wrapper. ## Installation Add this line to your application's Gemfile: ```ruby gem 'capital_on_tap' ``` And then execute: $ bundle Or install it yourself as: $ gem install capital_on_tap ## Usage First you need to configure Capital On Tap: ```ruby CapitalOnTap.configure do |config| config.client_id = ENV['CLIENT_ID'] config.client_secret = ENV['CLIENT_SECRET'] config.username = ENV['USERNAME'] config.password = ENV['PASSWORD'] # config.debug = false # this is VERY verbose! end ``` You can only create a new application and check the application status by providing the resulting locator id. ```ruby # Create new application: response = Application.generate(params) #=> CapitalOnTap::Response... response.body #=> {:result=>"A357G75"... # Check application status response = Application.status('A357G75') #=> CapitalOnTap::Response... response.body #=> {:applicationStatus => {:locatorId => "A357G75", :applicationStage => "IncompleteInfo",... ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). Note that you will always get a **IncompleteInfo** response for the created applications in development. There's a handy method `generate_code` when you run `bin/console` to help getting a bunch of codes quickly. To get different responses you need to contact Capital On Tap's staff, with the codes you want to change status. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capital_on_tap. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).