Sha256: 68b3f9fd18b5641feb11bc4461b31841d24d99184a124254416a819f24e62b0c

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

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 = true
end

CapitalOnTap.setup_connection!

TEST_PARAMS = {
  Salutation: 'Mr',
  FirstName: 'Roberto',
  LastName: 'Caras',
  DateOfBirth: Date.parse("1980-#{rand(1..12)}-#{rand(1..28)}"),
  MobilePhone: "077123456#{rand(11..99)}",
  EmailAddress: "oterosantos_#{rand(1..100)}@gmail.com",
  PersonalAddress: {
    CountryCode: 'UK',
    Street: "Unit #{rand(1..99)} Falcon Way Adelaide Industrial Estate, Boucher Road",
    PostCode: 'BT12 6SQ',
    City: 'Belfast'
  },
  TradingName: 'DUNDER MCMIFFLIN LTD',
  BusinessLegalName: 'DUNDER MCMIFFLIN LTD',
  BusinessLandline: '07874186570',
  YearsTrading: rand(1..10),
  MonthlyTurnOver: rand(300...9000),
  BusinessType: 'LimitedCompany',
  BusinessAddress: {
    CountryCode: 'UK',
    Street: "Unit #{rand(1..99)} Falcon Way Adelaide Industrial Estate, Boucher Road",
    PostCode: 'BT12 6SQ',
    City: 'Belfast'
  },
  RegistrationNumber: 'NI644403'
}.freeze

def generate_code
  CapitalOnTap::Application.create(TEST_PARAMS)
end

require 'pry'
Pry.start

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capital_on_tap-0.1.6 bin/console
capital_on_tap-0.1.5 bin/console