balanced 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/balanced.gemspec +2 -2
  5. data/examples/customers-with-meta-example.rb +141 -0
  6. data/examples/customers.rb +1 -6
  7. data/examples/examples.rb +1 -1
  8. data/lib/balanced/resources/marketplace.rb +1 -1
  9. data/lib/balanced/version.rb +1 -1
  10. data/scenario.cache +396 -383
  11. data/scenarios/account_add_card/ruby.mako +3 -3
  12. data/scenarios/account_capture_hold/request.rb +1 -1
  13. data/scenarios/account_capture_hold/ruby.mako +1 -1
  14. data/scenarios/account_create/ruby.mako +1 -1
  15. data/scenarios/account_create_buyer/request.rb +2 -1
  16. data/scenarios/account_create_buyer/ruby.mako +3 -2
  17. data/scenarios/account_create_debit/request.rb +1 -1
  18. data/scenarios/account_create_debit/ruby.mako +1 -1
  19. data/scenarios/account_create_hold/request.rb +1 -1
  20. data/scenarios/account_create_hold/ruby.mako +1 -1
  21. data/scenarios/account_create_merchant/ruby.mako +3 -3
  22. data/scenarios/account_underwrite_business/request.rb +2 -4
  23. data/scenarios/account_underwrite_business/ruby.mako +14 -4
  24. data/scenarios/account_underwrite_person/request.rb +1 -1
  25. data/scenarios/account_underwrite_person/ruby.mako +7 -2
  26. data/scenarios/bank_account_create/request.rb +1 -1
  27. data/scenarios/bank_account_create/ruby.mako +5 -2
  28. data/scenarios/bank_account_delete/ruby.mako +2 -2
  29. data/scenarios/bank_account_invalid_routing_number/request.rb +4 -1
  30. data/scenarios/bank_account_invalid_routing_number/ruby.mako +8 -2
  31. data/scenarios/bank_account_list/ruby.mako +1 -1
  32. data/scenarios/bank_account_show/ruby.mako +2 -2
  33. data/scenarios/bank_account_verification_create/ruby.mako +2 -2
  34. data/scenarios/bank_account_verification_show/ruby.mako +2 -2
  35. data/scenarios/bank_account_verification_update/request.rb +1 -2
  36. data/scenarios/bank_account_verification_update/ruby.mako +4 -5
  37. data/scenarios/callback_create/definition.rb +1 -1
  38. data/scenarios/callback_create/request.rb +1 -1
  39. data/scenarios/callback_create/ruby.mako +11 -0
  40. data/scenarios/callback_delete/definition.rb +1 -1
  41. data/scenarios/callback_delete/request.rb +1 -1
  42. data/scenarios/callback_delete/ruby.mako +10 -0
  43. data/scenarios/callback_list/definition.rb +1 -1
  44. data/scenarios/callback_list/ruby.mako +10 -0
  45. data/scenarios/callback_show/definition.rb +1 -1
  46. data/scenarios/callback_show/ruby.mako +9 -0
  47. data/scenarios/card_create/request.rb +1 -2
  48. data/scenarios/card_create/ruby.mako +5 -3
  49. data/scenarios/card_delete/ruby.mako +2 -2
  50. data/scenarios/card_invalidate/ruby.mako +2 -2
  51. data/scenarios/card_list/ruby.mako +1 -1
  52. data/scenarios/card_show/ruby.mako +2 -2
  53. data/scenarios/card_update/request.rb +1 -1
  54. data/scenarios/card_update/ruby.mako +5 -3
  55. data/scenarios/credit_account_merchant_create/request.rb +1 -1
  56. data/scenarios/credit_bank_account_list/ruby.mako +2 -2
  57. data/scenarios/credit_create_existing_bank_account/request.rb +1 -1
  58. data/scenarios/credit_create_existing_bank_account/ruby.mako +3 -3
  59. data/scenarios/credit_create_new_bank_account/request.rb +1 -1
  60. data/scenarios/credit_create_new_bank_account/ruby.mako +5 -2
  61. data/scenarios/credit_customer_list/ruby.mako +2 -2
  62. data/scenarios/credit_failed_state/request.rb +2 -2
  63. data/scenarios/credit_failed_state/ruby.mako +5 -2
  64. data/scenarios/credit_list/ruby.mako +1 -1
  65. data/scenarios/credit_paid_state/request.rb +2 -2
  66. data/scenarios/credit_paid_state/ruby.mako +5 -2
  67. data/scenarios/credit_pending_state/request.rb +2 -2
  68. data/scenarios/credit_pending_state/ruby.mako +5 -2
  69. data/scenarios/credit_show/ruby.mako +2 -2
  70. data/scenarios/customer_add_bank_account/ruby.mako +3 -3
  71. data/scenarios/customer_add_card/ruby.mako +3 -3
  72. data/scenarios/customer_capture_hold/request.rb +1 -1
  73. data/scenarios/customer_create/ruby.mako +1 -1
  74. data/scenarios/customer_create_debit/request.rb +1 -1
  75. data/scenarios/customer_create_debit/ruby.mako +3 -3
  76. data/scenarios/customer_create_hold/request.rb +1 -1
  77. data/scenarios/customer_create_hold/ruby.mako +1 -1
  78. data/scenarios/customer_credit/request.rb +1 -1
  79. data/scenarios/customer_credit/ruby.mako +2 -2
  80. data/scenarios/customer_delete/definition.rb +1 -0
  81. data/scenarios/customer_delete/request.rb +2 -0
  82. data/scenarios/customer_delete/ruby.mako +8 -0
  83. data/scenarios/debit_create/request.rb +3 -1
  84. data/scenarios/debit_create/ruby.mako +7 -3
  85. data/scenarios/debit_customer_list/ruby.mako +2 -2
  86. data/scenarios/debit_list/ruby.mako +1 -1
  87. data/scenarios/debit_refund/ruby.mako +2 -2
  88. data/scenarios/debit_show/ruby.mako +2 -2
  89. data/scenarios/debit_update/request.rb +3 -1
  90. data/scenarios/debit_update/ruby.mako +6 -3
  91. data/scenarios/event_list/ruby.mako +1 -1
  92. data/scenarios/event_show/ruby.mako +2 -2
  93. data/scenarios/helpers.rb +40 -7
  94. data/scenarios/hold_capture/request.rb +1 -1
  95. data/scenarios/hold_capture/ruby.mako +4 -3
  96. data/scenarios/hold_create/definition.rb +1 -1
  97. data/scenarios/hold_create/request.rb +3 -3
  98. data/scenarios/hold_create/ruby.mako +7 -6
  99. data/scenarios/hold_customer_list/ruby.mako +2 -2
  100. data/scenarios/hold_list/ruby.mako +1 -1
  101. data/scenarios/hold_show/ruby.mako +2 -2
  102. data/scenarios/hold_update/request.rb +3 -1
  103. data/scenarios/hold_update/ruby.mako +6 -3
  104. data/scenarios/hold_void/ruby.mako +2 -2
  105. data/scenarios/refund_account_list/ruby.mako +2 -2
  106. data/scenarios/refund_create/request.rb +4 -2
  107. data/scenarios/refund_create/ruby.mako +8 -4
  108. data/scenarios/refund_customer_list/ruby.mako +11 -0
  109. data/scenarios/refund_list/ruby.mako +1 -1
  110. data/scenarios/refund_show/ruby.mako +2 -2
  111. data/scenarios/refund_update/request.rb +3 -1
  112. data/scenarios/refund_update/ruby.mako +7 -3
  113. data/scenarios/render_mako.rb +1 -1
  114. metadata +23 -25
  115. data/.rbenv-version +0 -1
@@ -3,8 +3,8 @@ Balanced::Card.invalidate()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- card = Balanced::Card.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards/CC4wel9K6ASutW6zqCWZpjsj')
8
+ card = Balanced::Card.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC5N3HHUDrAyvhNwQOoUd3UX')
9
9
  card.invalidate
10
10
  % endif
@@ -3,7 +3,7 @@ Balanced::Marketplace.cards
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  cards = Balanced::Marketplace.my_marketplace.cards
9
9
  % endif
@@ -3,7 +3,7 @@ Balanced::Card.find()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- card = Balanced::Card.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards/CC4wel9K6ASutW6zqCWZpjsj')
8
+ card = Balanced::Card.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC5N3HHUDrAyvhNwQOoUd3UX')
9
9
  % endif
@@ -1,6 +1,6 @@
1
1
  <%= boiler_plate %>
2
2
  card = Balanced::Card.find('<%= request['uri'] %>')
3
3
  card.meta = {
4
- <%= params_to_hash.call(payload['meta'])%>
4
+ <%= params_to_hash_for_args.call(payload['meta'])%>
5
5
  }
6
6
  card.save
@@ -3,11 +3,13 @@ Balanced::Card.save()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- card = Balanced::Card.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards/CC4wel9K6ASutW6zqCWZpjsj')
8
+ card = Balanced::Card.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC5N3HHUDrAyvhNwQOoUd3UX')
9
9
  card.meta = {
10
- 'facebook.user_id' => '0192837465', 'my-own-customer-id' => '12345', 'twitter.id' => '1234987650'
10
+ 'facebook.user_id' => '0192837465',
11
+ 'my-own-customer-id' => '12345',
12
+ 'twitter.id' => '1234987650'
11
13
  }
12
14
  card.save
13
15
 
@@ -2,4 +2,4 @@
2
2
  marketplace = Balanced::Marketplace.my_marketplace
3
3
 
4
4
  merchant = Balanced::Account.find('<%= request['account_uri'] %>')
5
- merchant.credit('<%= payload['amount'] %>')
5
+ merchant.credit(<%= params_to_hash.call(payload) %>)
@@ -3,10 +3,10 @@ Balanced::BankAccount.credits
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
10
- bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA4jgL1IYTPL1da2wmwdWvPp')
10
+ bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA5A8YcoSCEPQyCaPCTvmFnW')
11
11
  credits = bank_account.credits
12
12
  % endif
@@ -2,4 +2,4 @@
2
2
  marketplace = Balanced::Marketplace.my_marketplace
3
3
 
4
4
  bank_account = Balanced::BankAccount.find('<%= request['uri'] %>')
5
- bank_account.credit(<%= payload['amount'] %>)
5
+ bank_account.credit(<%= params_to_hash.call(payload) %>)
@@ -3,10 +3,10 @@ Balanced::BankAccount.credit
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
10
- bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA4jgL1IYTPL1da2wmwdWvPp')
11
- bank_account.credit(10000)
10
+ bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA5A8YcoSCEPQyCaPCTvmFnW')
11
+ bank_account.credit(:amount => 10000)
12
12
  % endif
@@ -2,7 +2,7 @@
2
2
  marketplace = Balanced::Marketplace.my_marketplace
3
3
 
4
4
  bank_account_info = {
5
- <%= params_to_hash.call(request['bank_account']) %>
5
+ <%= params_to_hash.call(request['bank_account']).indent(2) %>
6
6
  }
7
7
  credit = Balanced::Credit.new(
8
8
  :amount => <%= request['amount'] %>,
@@ -3,12 +3,15 @@ Balanced::Credit.save
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('8c3aeeb80e9e11e38901026ba7f8ec28')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
10
10
  bank_account_info = {
11
- :account_number => '9900000001',:name => 'Johann Bernoulli',:routing_number => '121000358',:type => 'checking',
11
+ :account_number => '9900000001',
12
+ :name => 'Johann Bernoulli',
13
+ :routing_number => '121000358',
14
+ :type => 'checking'
12
15
  }
13
16
  credit = Balanced::Credit.new(
14
17
  :amount => 10000,
@@ -3,10 +3,10 @@ Balanced::Customer.credits
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('c72cb360d3ae11e29593026ba7d31e6f')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
 
9
- customer = Balanced::Customer.find('/v1/customers/CU6PXyMacKRYKNJPJFKtONK0')
9
+ customer = Balanced::Customer.find('/v1/customers/CU5f64LhFMO8cf7N1sQSRVOo')
10
10
  credits = customer.credits
11
11
 
12
12
  % endif
@@ -2,9 +2,9 @@
2
2
  marketplace = Balanced::Marketplace.my_marketplace
3
3
 
4
4
  bank_account_info = {
5
- <%= params_to_hash.call(request['bank_account']) %>
5
+ <%= params_to_hash.call(request['payload']['bank_account']).indent(2) %>
6
6
  }
7
7
  credit = Balanced::Credit.new(
8
- :amount => <%= request['amount'] %>,
8
+ :amount => <%= request['payload']['amount'] %>,
9
9
  :bank_account => bank_account_info
10
10
  ).save
@@ -3,12 +3,15 @@ Balanced::Credit.save
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-1p1Tsac7gHeMQowL2seB7ieliuAJAufyq')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
10
10
  bank_account_info = {
11
- :account_number => '9900000004',:name => 'Johann Bernoulli',:routing_number => '121000358',:type => 'checking',
11
+ :account_number => '9900000005',
12
+ :name => 'Johann Bernoulli',
13
+ :routing_number => '121000358',
14
+ :type => 'checking'
12
15
  }
13
16
  credit = Balanced::Credit.new(
14
17
  :amount => 10000,
@@ -3,7 +3,7 @@ Balanced::Credit.all
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
@@ -2,10 +2,10 @@
2
2
  marketplace = Balanced::Marketplace.my_marketplace
3
3
 
4
4
  bank_account_info = {
5
- <%= params_to_hash.call(request['bank_account']) %>
5
+ <%= params_to_hash.call(request['payload']['bank_account']).indent(2) %>
6
6
  }
7
7
 
8
8
  credit = Balanced::Credit.new(
9
- :amount => <%= request['amount'] %>,
9
+ :amount => <%= request['payload']['amount'] %>,
10
10
  :bank_account => bank_account_info
11
11
  ).save
@@ -3,12 +3,15 @@ Balanced::Credit.save
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-1p1Tsac7gHeMQowL2seB7ieliuAJAufyq')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
10
10
  bank_account_info = {
11
- :account_number => '9900000003',:name => 'Johann Bernoulli',:routing_number => '121000358',:type => 'checking',
11
+ :account_number => '9900000002',
12
+ :name => 'Johann Bernoulli',
13
+ :routing_number => '121000358',
14
+ :type => 'checking'
12
15
  }
13
16
 
14
17
  credit = Balanced::Credit.new(
@@ -1,9 +1,9 @@
1
1
  <%= boiler_plate %>
2
2
  bank_account_info = {
3
- <%= params_to_hash.call(request['bank_account']) %>
3
+ <%= params_to_hash.call(request['payload']['bank_account']).indent(2) %>
4
4
  }
5
5
 
6
6
  credit = Balanced::Credit.new(
7
- :amount => <%= request['amount'] %>,
7
+ :amount => <%= request['payload']['amount'] %>,
8
8
  :bank_account => bank_account_info
9
9
  ).save
@@ -3,10 +3,13 @@ Balanced::Credit.save
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-1p1Tsac7gHeMQowL2seB7ieliuAJAufyq')
7
7
 
8
8
  bank_account_info = {
9
- :account_number => '9900000001',:name => 'Johann Bernoulli',:routing_number => '121000358',:type => 'checking',
9
+ :account_number => '9900000001',
10
+ :name => 'Johann Bernoulli',
11
+ :routing_number => '121000358',
12
+ :type => 'checking'
10
13
  }
11
14
 
12
15
  credit = Balanced::Credit.new(
@@ -3,9 +3,9 @@ Balanced::Credit.find
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
10
- credit = Balanced::Credit.find('/v1/credits/CR4PR7caYHW7H4SFJsSDQ5So')
10
+ credit = Balanced::Credit.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/credits/CR5YK26rTyl5vlFK928nhxUI')
11
11
  % endif
@@ -3,9 +3,9 @@ Balanced::Customer.add_bank_account
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- customer = Balanced::Customer.find('/v1/customers/CU5NTZ8MGBW3x8Axx8fTzgeQ')
9
- customer.add_bank_account("/v1/bank_accounts/BA5ONs53HNn1Od9g99v0GNFJ")
8
+ customer = Balanced::Customer.find('/v1/customers/CU6n0viWQoT86ttbkCsPgV0Y')
9
+ customer.add_bank_account("/v1/bank_accounts/BA6oxYWJXxeM63vMorgtSIhI")
10
10
 
11
11
  % endif
@@ -3,9 +3,9 @@ Balanced::Customer.add_card
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- customer = Balanced::Customer.find('/v1/customers/CU5KrnM7ufxhgePgmghE6f5K')
9
- response = customer.add_card('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards/CC5Lx8CAHB3bRXG1sENg7urM')
8
+ customer = Balanced::Customer.find('/v1/customers/CU7gMTGKh2yGHYn1lUxH9STS')
9
+ response = customer.add_card('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC7iFRCb5AvLuZ9qzIF0VMmA')
10
10
 
11
11
  % endif
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  customer = Balanced::Customer.find('<%=request['uri']%>')
3
- customer.debit(:amount => '<%=payload['amount']%>', :hold_uri => '<%=payload['hold_uri']%>')
3
+ customer.debit(:amount => <%=payload['amount']%>, :hold_uri => '<%=payload['hold_uri']%>')
@@ -3,7 +3,7 @@ Balanced::Customer.new
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  customer = Balanced::Customer.new.save
9
9
 
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  customer = Balanced::Customer.find('<%=request['customer_uri']%>')
3
- customer.debit(:amount => '<%=payload['amount']%>')
3
+ customer.debit(:amount => <%=payload['amount']%>)
@@ -3,9 +3,9 @@ Balanced::Customer.debit
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('c72cb360d3ae11e29593026ba7d31e6f')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- customer = Balanced::Customer.find('/v1/customers/CU7GuPv9Y2F8ySwJHuHL0YWq')
9
- customer.debit(:amount => '1000')
8
+ customer = Balanced::Customer.find('/v1/customers/CU6vs1tjxBtifgTuzKjCGtVS')
9
+ customer.debit(:amount => 5000)
10
10
 
11
11
  % endif
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  customer = Balanced::Customer.find('<%=request['customer_uri']%>')
3
- customer.hold(:amount => '<%=payload['amount']%>')
3
+ customer.hold(:amount => <%=payload['amount']%>)
@@ -6,6 +6,6 @@ require 'balanced'
6
6
  Balanced.configure('c72cb360d3ae11e29593026ba7d31e6f')
7
7
 
8
8
  customer = Balanced::Customer.find('/v1/customers/CU7GuPv9Y2F8ySwJHuHL0YWq')
9
- customer.hold(:amount => '1000')
9
+ customer.hold(:amount => 1000)
10
10
 
11
11
  % endif
@@ -1,2 +1,2 @@
1
1
  customer = Balanced::Customer.find('<%=request['customer_uri']%>')
2
- customer.credit(:amount => '<%=payload['amount']%>')
2
+ customer.credit(:amount => <%=payload['amount']%>)
@@ -2,7 +2,7 @@
2
2
  Balanced::Customer.credit
3
3
 
4
4
  % else:
5
- customer = Balanced::Customer.find('/v1/customers/CU6PXyMacKRYKNJPJFKtONK0')
6
- customer.credit(:amount => '100')
5
+ customer = Balanced::Customer.find('/v1/customers/CU5f64LhFMO8cf7N1sQSRVOo')
6
+ customer.credit(:amount => 100)
7
7
 
8
8
  % endif
@@ -0,0 +1 @@
1
+ Balanced::Customer.unstore
@@ -0,0 +1,2 @@
1
+ customer = Balanced::Customer.find('<%=request['uri']%>')
2
+ customer.unstore
@@ -0,0 +1,8 @@
1
+ % if mode == 'definition':
2
+ Balanced::Customer.unstore
3
+
4
+ % else:
5
+ customer = Balanced::Customer.find('/v1/customers/CU6sqf8CB3M3l6VeSsBqVHhC')
6
+ customer.unstore
7
+
8
+ % endif
@@ -1,3 +1,5 @@
1
1
  <%= boiler_plate %>
2
2
  customer = Balanced::Customer.find('<%= request['customer_uri'] %>')
3
- customer.debit(<%= params_to_hash_for_args.call(payload) %>)
3
+ customer.debit(
4
+ <%= params_to_hash.call(payload).indent(2) %>
5
+ )
@@ -3,9 +3,13 @@ Balanced::Customer.debit()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- customer = Balanced::Customer.find('')
9
- customer.debit({:amount=>5000, :appears_on_statement_as=>"Statement text", :description=>"Some descriptive text for the debit in the dashboard"})
8
+ customer = Balanced::Customer.find('/v1/customers/CU7gMTGKh2yGHYn1lUxH9STS')
9
+ customer.debit(
10
+ :amount => 5000,
11
+ :appears_on_statement_as => 'Statement text',
12
+ :description => 'Some descriptive text for the debit in the dashboard'
13
+ )
10
14
 
11
15
  % endif
@@ -3,10 +3,10 @@ Balanced::Customer.debits
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('c72cb360d3ae11e29593026ba7d31e6f')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
 
9
- customer = Balanced::Customer.find('/v1/customers/CU6W5pSk2CUXQxhENqyGRvQe')
9
+ customer = Balanced::Customer.find('/v1/customers/CU6vs1tjxBtifgTuzKjCGtVS')
10
10
  debits = customer.debits
11
11
 
12
12
  % endif
@@ -3,7 +3,7 @@ Balanced::Debit.all
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  marketplace = Balanced::Marketplace.my_marketplace
9
9
 
@@ -3,8 +3,8 @@ Balanced::Debit.refund()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- debit = Balanced::Debit.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/debits/WD5aKzkNv487e4XjjbbfV5TU')
8
+ debit = Balanced::Debit.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/debits/WD6MTAHor9FhO4G2nvZwaXvi')
9
9
  debit.refund
10
10
  % endif