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,9 +3,9 @@ Balanced::Account.add_card
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- account = Balanced::Account.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/accounts/AC4FqqEyFyTcd3eHhh2YXL4c')
9
- response = account.add_card('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards/CC4GL1SYTyLy6nW6nf4kWw0w')
8
+ account = Balanced::Account.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/accounts/CU4WT2fC14gzGQIEcMKs5gm3')
9
+ response = account.add_card('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC4Zor9L2DEKXy0LJJ8PtkMM')
10
10
 
11
11
  % endif
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  account = Balanced::Account.find('<%=request['uri']%>')
3
- account.debit(:amount => '<%=payload['amount']%>', :hold_uri => '<%=payload['hold_uri']%>')
3
+ account.debit(:amount => <%=payload['amount']%>, :hold_uri => '<%=payload['hold_uri']%>')
@@ -6,6 +6,6 @@ require 'balanced'
6
6
  Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
7
7
 
8
8
  account = Balanced::Account.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/accounts/AC6jdot989BbUks8LFIdRVcX/debits')
9
- account.debit(:amount => '1000', :hold_uri => '/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/holds/HL6t6iMvY9Touhig2PZnCOHk')
9
+ account.debit(:amount => 1000, :hold_uri => '/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/holds/HL6t6iMvY9Touhig2PZnCOHk')
10
10
 
11
11
  % endif
@@ -3,7 +3,7 @@ Balanced::Account.new
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  account = Balanced::Marketplace.my_marketplace.create_account
9
9
 
@@ -1,4 +1,5 @@
1
1
  <%= boiler_plate %>
2
2
 
3
3
  buyer = Balanced::Marketplace.my_marketplace.create_buyer(
4
- <%= params_to_hash.call(payload) %>)
4
+ <%= params_to_hash.call(payload) %>
5
+ )
@@ -3,10 +3,11 @@ Balanced::Marketplace.create_buyer
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
 
9
9
  buyer = Balanced::Marketplace.my_marketplace.create_buyer(
10
- :card_uri => '/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards/CC6iQ3QzBhyegVguKpz9ooAi',)
10
+ :card_uri => '/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC4WeeR0OUiQh9vvqNQvMl1o'
11
+ )
11
12
 
12
13
  % endif
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  account = Balanced::Account.find('<%=request['uri']%>')
3
- account.debit(:amount => '<%=payload['amount']%>')
3
+ account.debit(:amount => <%=payload['amount']%>)
@@ -6,6 +6,6 @@ require 'balanced'
6
6
  Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
7
7
 
8
8
  account = Balanced::Account.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/accounts/AC6jdot989BbUks8LFIdRVcX/debits')
9
- account.debit(:amount => '1000')
9
+ account.debit(:amount => 1000)
10
10
 
11
11
  % endif
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  account = Balanced::Account.find('<%=request['account_uri']%>')
3
- account.hold(:amount => '<%=payload['amount']%>')
3
+ account.hold(:amount => <%=payload['amount']%>)
@@ -6,6 +6,6 @@ require 'balanced'
6
6
  Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
7
7
 
8
8
  account = Balanced::Account.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/accounts/AC6jdot989BbUks8LFIdRVcX')
9
- account.hold(:amount => '1000')
9
+ account.hold(:amount => 1000)
10
10
 
11
11
  % endif
@@ -3,9 +3,9 @@ Balanced::Account.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
- account = Balanced::Account.find('/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/accounts/AC4FqqEyFyTcd3eHhh2YXL4c')
9
- account.add_bank_account("/v1/bank_accounts/BA4JrubjRE0vqvWWDBB5Kv1w")
8
+ account = Balanced::Account.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/accounts/CU4WT2fC14gzGQIEcMKs5gm3')
9
+ account.add_bank_account("/v1/bank_accounts/BA53NVwHAXYx7fo98SdK41dg")
10
10
 
11
11
  % endif
@@ -1,11 +1,9 @@
1
1
  <%= boiler_plate %>
2
2
 
3
3
  merchant_data = {
4
- <%="".tap { |s| payload['merchant'].each {|k, v| s << ":#{k} => '#{v}'," unless k == 'person'} }%>
5
- :person => {
6
- <%= params_to_hash.call(payload['merchant']['person']) %>
7
- }
4
+ <%= params_to_hash.call(payload['merchant']).indent(2) %>,
8
5
  }
6
+
9
7
  account = Balanced::Marketplace.my_marketplace.create_account
10
8
 
11
9
  begin
@@ -3,15 +3,25 @@ Balanced::Account.promote_to_merchant
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
 
9
9
  merchant_data = {
10
- :name => 'Skripts4Kids',:phone_number => '+140899188155',:postal_code => '91111',:street_address => '555 VoidMain Road',:tax_id => '211111111',:type => 'business',
10
+ :name => 'Skripts4Kids',
11
11
  :person => {
12
- :dob => '1989-12',:name => 'Timmy Q. CopyPasta',:phone_number => '+14089999999',:postal_code => '94110',:street_address => '121 Skriptkid Row',
13
- }
12
+ :dob => '1989-12',
13
+ :name => 'Timmy Q. CopyPasta',
14
+ :phone_number => '+14089999999',
15
+ :postal_code => '94110',
16
+ :street_address => '121 Skriptkid Row'
17
+ },
18
+ :phone_number => '+140899188155',
19
+ :postal_code => '91111',
20
+ :street_address => '555 VoidMain Road',
21
+ :tax_id => '211111111',
22
+ :type => 'business',
14
23
  }
24
+
15
25
  account = Balanced::Marketplace.my_marketplace.create_account
16
26
 
17
27
  begin
@@ -2,7 +2,7 @@
2
2
  marketplace = Balanced::Marketplace.my_marketplace
3
3
 
4
4
  merchant_data = {
5
- <%= params_to_hash.call(payload['merchant']) %>
5
+ <%= params_to_hash.call(payload['merchant']).indent(2) %>
6
6
  }
7
7
 
8
8
  account = Balanced::Marketplace.my_marketplace.create_account
@@ -3,12 +3,17 @@ Balanced::Account.promote_to_merchant
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
10
  merchant_data = {
11
- :dob => '1989-12',:name => 'Timmy Q. CopyPasta',:phone_number => '+14089999999',:postal_code => '94110',:street_address => '121 Skriptkid Row',:type => 'person',
11
+ :dob => '1989-12',
12
+ :name => 'Timmy Q. CopyPasta',
13
+ :phone_number => '+14089999999',
14
+ :postal_code => '94110',
15
+ :street_address => '121 Skriptkid Row',
16
+ :type => 'person'
12
17
  }
13
18
 
14
19
  account = Balanced::Marketplace.my_marketplace.create_account
@@ -1,4 +1,4 @@
1
1
  <%= boiler_plate %>
2
2
  bank_account = Balanced::BankAccount.new(
3
- <%= params_to_hash.call(payload) %>
3
+ <%= params_to_hash.call(payload).indent(2) %>
4
4
  ).save
@@ -3,10 +3,13 @@ Balanced::BankAccount.save
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  bank_account = Balanced::BankAccount.new(
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
  ).save
11
14
 
12
15
  % endif
@@ -3,9 +3,9 @@ Balanced::BankAccount.unstore
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA4eTWiY1VPXkGpjaU6XPBhu')
8
+ bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA5uvDqG8xk4bGmwX3JTbIee')
9
9
  bank_account.unstore
10
10
 
11
11
  % endif
@@ -1,5 +1,8 @@
1
1
  <%= boiler_plate %>
2
- bank_account = Balanced::BankAccount.new( :uri => '<%=request['uri']%>', <%= payload.map {|k,v| ":#{k} => '#{v}'"}.join(",") %>)
2
+ bank_account = Balanced::BankAccount.new(
3
+ :uri => '<%=request['uri']%>',
4
+ <%= params_to_hash.call(payload).indent(2) %>
5
+ )
3
6
 
4
7
  begin
5
8
  bank_account.save
@@ -3,9 +3,15 @@ Balanced::BadRequest
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-1p1Tsac7gHeMQowL2seB7ieliuAJAufyq')
7
7
 
8
- bank_account = Balanced::BankAccount.new( :uri => '/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/bank_accounts', :account_number => '9900000001',:name => 'Johann Bernoulli',:routing_number => '100000007',:type => 'checking')
8
+ bank_account = Balanced::BankAccount.new(
9
+ :uri => '/v1/marketplaces/TEST-MP5FKPQwyjvVgTDt7EiRw3Kq/bank_accounts',
10
+ :account_number => '9900000001',
11
+ :name => 'Johann Bernoulli',
12
+ :routing_number => '100000007',
13
+ :type => 'checking'
14
+ )
9
15
 
10
16
  begin
11
17
  bank_account.save
@@ -3,7 +3,7 @@ Balanced::BankAccount.all
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  Balanced::BankAccount.all
9
9
 
@@ -3,8 +3,8 @@ Balanced::BankAccount.find()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA4jgL1IYTPL1da2wmwdWvPp')
8
+ bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA5A8YcoSCEPQyCaPCTvmFnW')
9
9
 
10
10
  % endif
@@ -3,9 +3,9 @@
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA4p71EIOhci5Z6leAjFthCq')
8
+ bank_account = Balanced::BankAccount.find('/v1/bank_accounts/BA5gy1b8X8dIGaBWFuoWvkxO')
9
9
  verification = bank_account.verify
10
10
 
11
11
  % endif
@@ -3,8 +3,8 @@ Balanced::Verification.find()
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- verification = Balanced::Verification.find('/v1/bank_accounts/BA4rddoEDsMKlG1vSXAnkrT2/verifications/BZ4rN0mLXhpypdxLvRaKFt3F')
8
+ verification = Balanced::Verification.find('/v1/bank_accounts/BA5nW8SMsXjaU3GVWdhR9d60/verifications/BZ5rcuNvebC49kZyTGAaJu2A')
9
9
 
10
10
  % endif
@@ -1,7 +1,6 @@
1
1
  <%= boiler_plate %>
2
2
  verification = Balanced::Verification.find('<%=request['uri']%>')
3
-
4
3
  <% payload.each do |k,v| %>
5
- verification.<%=k%> = <%=v%>
4
+ verification.<%=k%> = <%=v%>
6
5
  <% end %>
7
6
  verification.save
@@ -3,14 +3,13 @@ Balanced::Verification.save
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
- verification = Balanced::Verification.find('/v1/bank_accounts/BA4tfzTrmuV1wXzXGg8Nf2t0/verifications/BZ4tXRVE6BovN95NQN1AsIKr')
8
+ verification = Balanced::Verification.find('/v1/bank_accounts/BA5uvDqG8xk4bGmwX3JTbIee/verifications/BZ5wpXXDTZxqLCHiX6V4XXvA')
9
9
 
10
+ verification.amount_1 = 1
10
11
 
11
- verification.amount_1 = 1
12
-
13
- verification.amount_2 = 1
12
+ verification.amount_2 = 1
14
13
 
15
14
  verification.save
16
15
 
@@ -1 +1 @@
1
- Balanced::Callback.save
1
+ Balanced::Callback.new
@@ -1,4 +1,4 @@
1
1
  <%= boiler_plate %>
2
2
  callback = Balanced::Callback.new(
3
3
  <%= params_to_hash.call(payload) %>
4
- ).save
4
+ ).save
@@ -0,0 +1,11 @@
1
+ % if mode == 'definition':
2
+ Balanced::Callback.new
3
+ % else:
4
+ require 'balanced'
5
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
6
+
7
+ callback = Balanced::Callback.new(
8
+ :url => 'http://www.example.com/callback'
9
+ ).save
10
+
11
+ % endif
@@ -1 +1 @@
1
- Balanced::Callback.destroy
1
+ Balanced::Callback.unstore
@@ -1,3 +1,3 @@
1
1
  <%= boiler_plate %>
2
2
  callback = Balanced::Callback.find('<%=request['uri']%>')
3
- callback.destroy
3
+ callback.unstore
@@ -0,0 +1,10 @@
1
+ % if mode == 'definition':
2
+ Balanced::Callback.unstore
3
+
4
+ % else:
5
+ require 'balanced'
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
+
8
+ callback = Balanced::Callback.find('/v1/callbacks/CB5GFgGfugkhbKueLUJL6hAa')
9
+ callback.unstore
10
+ % endif
@@ -1 +1 @@
1
- Balanced::Callback.all
1
+ Balanced::Callback.all
@@ -0,0 +1,10 @@
1
+ % if mode == 'definition':
2
+ Balanced::Callback.all
3
+
4
+ % else:
5
+ require 'balanced'
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
+
8
+ marketplace = Balanced::Marketplace.my_marketplace
9
+ callbacks = Balanced::Callback.all(:limit => 2)
10
+ % endif
@@ -1 +1 @@
1
- Balanced::Callback.find()
1
+ Balanced::Callback.find
@@ -0,0 +1,9 @@
1
+ % if mode == 'definition':
2
+ Balanced::Callback.find
3
+
4
+ % else:
5
+ require 'balanced'
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
+
8
+ callback = Balanced::Callback.find('/v1/callbacks/CB5GFgGfugkhbKueLUJL6hAa')
9
+ % endif
@@ -1,5 +1,4 @@
1
1
  <%= boiler_plate %>
2
2
  card = Balanced::Card.new(
3
- :uri => '<%= request['uri']%>',
4
- <%= params_to_hash.call(payload) %>
3
+ <%= params_to_hash.call(payload).indent(2) %>
5
4
  ).save
@@ -3,11 +3,13 @@ Balanced::Card.new
3
3
 
4
4
  % else:
5
5
  require 'balanced'
6
- Balanced.configure('8af725c6d54611e2bf5e026ba7f8ec28')
6
+ Balanced.configure('ak-test-2KZfoLyijij3Y6OyhDAvFRF9tXzelBLpD')
7
7
 
8
8
  card = Balanced::Card.new(
9
- :uri => '/v1/marketplaces/TEST-MP4erLnXCYoaeyr3tx95WSKc/cards',
10
- :card_number => '5105105105105100',:expiration_month => '12',:expiration_year => '2020',:security_code => '123',
9
+ :card_number => '5105105105105100',
10
+ :expiration_month => '12',
11
+ :expiration_year => '2020',
12
+ :security_code => '123'
11
13
  ).save
12
14
 
13
15
  % endif
@@ -3,9 +3,9 @@ Balanced::Card.unstore
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/bank_accounts/BA4eTWiY1VPXkGpjaU6XPBhu')
8
+ card = Balanced::Card.find('/v1/marketplaces/TEST-MP4K6K0PWGyPtXL4LZ42sQSb/cards/CC5N3HHUDrAyvhNwQOoUd3UX')
9
9
  card.unstore
10
10
 
11
11
  % endif