Sha256: ad79d488bb40744d6f19d5ccba3c0473389a270ae05609e0e41730609ae53d59

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

% if mode == 'definition':
Balanced::Account.promote_to_merchant

% else:
require 'balanced'
Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')

marketplace = Balanced::Marketplace.my_marketplace

merchant_data = {
:dob => '1989-12',:name => 'Timmy Q. CopyPasta',:phone_number => '+14089999999',:postal_code => '94110',:street_address => '121 Skriptkid Row',:type => 'person',
}

account = Balanced::Marketplace.my_marketplace.create_account

begin
  account.promote_to_merchant(merchant_data)
rescue Balanced::MoreInformationRequired => error
  # could not identify this account.
  puts 'redirect merchant to: ' + error.redirect_uri
rescue Balanced::Error => error
  # TODO: handle 400 and 409 exceptions as required
  raise
end

% endif

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
balanced-0.7.4 scenarios/account_underwrite_person/ruby.mako
balanced-0.7.2 scenarios/account_underwrite_person/ruby.mako