Sha256: c4f5d03bf5413d1c21eb4569646ce7aefb396243f21af43e1e5d10f22835fdc4

Contents?: true

Size: 996 Bytes

Versions: 1

Compression:

Stored size: 996 Bytes

Contents

require 'test/unit'
require 'rubygems'

require File.dirname(__FILE__) + '/../lib/recurly'

Recurly.configure do |c|
  c.username = ''
  c.password = ''
  c.site = ''
end

TEST_PLAN_CODE = 'trial'

def create_account(account_code)
  account = Recurly::Account.create(
    :account_code => "#{Time.now.to_i}-#{account_code}",
    :first_name => 'Verena',
    :last_name => 'Test',
    :email => 'verena@test.com',
    :company_name => 'Recurly Ruby Gem')
end

def create_account_with_billing_info(account_code)
  
  account = create_account(account_code)
  
  billing_info = Recurly::BillingInfo.create(
    :account_code => account.account_code,
    :first_name => account.first_name,
    :last_name => account.last_name,
    :address1 => '123 Test St',
    :city => 'San Francisco',
    :state => 'CA',
    :zip => '94115',
    :credit_card => {
      :number => '1',
      :year => Time.now.year + 1,
      :month => Time.now.month,
      :verification_value => '123'
    }
  )
  
  account
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
recurly-0.1.4 test/test_helper.rb