Sha256: cd50d2d89385240157a6fed62457e4d1307b9bbd1be51182b016fc8d8d70ff90

Contents?: true

Size: 575 Bytes

Versions: 2

Compression:

Stored size: 575 Bytes

Contents

<%= boiler_plate %>

merchant_data = {
  <%="".tap { |s| payload['merchant'].each {|k, v| s << ":#{k} => '#{v}'," unless k == 'person'} }%>
  :person => {
      <%= params_to_hash.call(payload['merchant']['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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
balanced-0.7.4 scenarios/account_underwrite_business/request.rb
balanced-0.7.2 scenarios/account_underwrite_business/request.rb