Sha256: cba0014d08b14582ea1d2be9bd58468c678a7132ffe7266886af2c334362d2d7

Contents?: true

Size: 816 Bytes

Versions: 2

Compression:

Stored size: 816 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'capital_on_tap'
require 'date'

require 'dotenv'
Dotenv.load

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
end

# Useful when testing, that's why it's required here.
require 'capital_on_tap/application_params_generator'

send(:include, CapitalOnTap)

# Quick method to get new codes. To test different status we need to send Capital On Tap new
# locator ID's in order for them to modify the result.
def generate_code
  params = ApplicationParamsGenerator.generate

  response = Application.create(params)
  response.body.dig(:result)
end

require 'pry'
Pry.start

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capital_on_tap-1.0.1 bin/console
capital_on_tap-1.0.0 bin/console