balanced 1.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +4 -0
  4. data/lib/balanced/error.rb +4 -2
  5. data/lib/balanced/resources/resource.rb +5 -0
  6. data/lib/balanced/version.rb +1 -1
  7. data/scenarios/api_key_create/ruby.mako +1 -1
  8. data/scenarios/api_key_list/ruby.mako +2 -2
  9. data/scenarios/api_key_show/ruby.mako +1 -1
  10. data/scenarios/bank_account_associate_to_customer/ruby.mako +6 -6
  11. data/scenarios/bank_account_create/ruby.mako +6 -6
  12. data/scenarios/bank_account_credit/ruby.mako +6 -6
  13. data/scenarios/bank_account_debit/ruby.mako +7 -7
  14. data/scenarios/bank_account_list/ruby.mako +12 -12
  15. data/scenarios/bank_account_show/ruby.mako +6 -6
  16. data/scenarios/bank_account_update/ruby.mako +6 -6
  17. data/scenarios/bank_account_verification_create/ruby.mako +2 -2
  18. data/scenarios/bank_account_verification_show/ruby.mako +2 -2
  19. data/scenarios/bank_account_verification_update/ruby.mako +2 -2
  20. data/scenarios/callback_create/ruby.mako +1 -1
  21. data/scenarios/callback_list/ruby.mako +1 -1
  22. data/scenarios/callback_show/ruby.mako +1 -1
  23. data/scenarios/card_associate_to_customer/definition.rb +1 -1
  24. data/scenarios/card_associate_to_customer/ruby.mako +5 -5
  25. data/scenarios/card_create/ruby.mako +4 -4
  26. data/scenarios/card_debit/ruby.mako +7 -7
  27. data/scenarios/card_hold_capture/ruby.mako +7 -7
  28. data/scenarios/card_hold_create/ruby.mako +5 -5
  29. data/scenarios/card_hold_list/ruby.mako +10 -10
  30. data/scenarios/card_hold_show/ruby.mako +5 -5
  31. data/scenarios/card_hold_update/ruby.mako +5 -5
  32. data/scenarios/card_hold_void/ruby.mako +5 -5
  33. data/scenarios/card_list/ruby.mako +8 -8
  34. data/scenarios/card_show/ruby.mako +4 -4
  35. data/scenarios/card_update/ruby.mako +4 -4
  36. data/scenarios/credit_list/ruby.mako +6 -6
  37. data/scenarios/credit_show/ruby.mako +6 -6
  38. data/scenarios/credit_update/ruby.mako +6 -6
  39. data/scenarios/customer_create/ruby.mako +13 -13
  40. data/scenarios/customer_list/ruby.mako +26 -26
  41. data/scenarios/customer_show/ruby.mako +13 -13
  42. data/scenarios/customer_update/ruby.mako +13 -13
  43. data/scenarios/debit_list/ruby.mako +14 -14
  44. data/scenarios/debit_show/ruby.mako +7 -7
  45. data/scenarios/debit_update/ruby.mako +7 -7
  46. data/scenarios/event_list/ruby.mako +4 -4
  47. data/scenarios/event_show/ruby.mako +2 -2
  48. data/scenarios/order_create/ruby.mako +7 -7
  49. data/scenarios/order_list/ruby.mako +7 -7
  50. data/scenarios/order_show/ruby.mako +7 -7
  51. data/scenarios/order_update/ruby.mako +7 -7
  52. data/scenarios/refund_create/ruby.mako +5 -5
  53. data/scenarios/refund_list/ruby.mako +5 -5
  54. data/scenarios/refund_show/ruby.mako +5 -5
  55. data/scenarios/refund_update/ruby.mako +5 -5
  56. data/scenarios/reversal_create/ruby.mako +4 -4
  57. data/scenarios/reversal_list/ruby.mako +4 -4
  58. data/scenarios/reversal_show/ruby.mako +4 -4
  59. data/scenarios/reversal_update/ruby.mako +4 -4
  60. data/spec/balanced/error_spec.rb +18 -0
  61. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4be53b1e7f19cda85a7856375b1571e93db52370
4
- data.tar.gz: 9e0cb8cffacfd960300021a5c3efe7ca7e9f1278
3
+ metadata.gz: 62543312811ec0d4471ffdad6f315b97a852980b
4
+ data.tar.gz: 94233502466ef24cccf974febc6ee8f759b175b7
5
5
  SHA512:
6
- metadata.gz: 39ac22106381f2600fbbb49ccf9f71ef7089bc7226a4bb4b5170590dc333e1e38213c88a66b8c3a48dddf4fae96d1e1960e9aabcd09c07d0c9d7918248d64865
7
- data.tar.gz: 04a6bd25924f34d499320c856948b92ea26d7cd30ee7e4f9c8c098d65f60f4907ffa4fe3de2034f0c652355997ef7e645df750034923ad4db104de495554294d
6
+ metadata.gz: 3b0d73d1f77586f2793121c0d7b696dce73aef2ca6b798b8c069d07cfa2c2bbc971d7543a751c404adea8754f4ea376e6232648cd727dd5eefe4c6b29d809f67
7
+ data.tar.gz: b3665359953b20bd00a3041251e491f80e8d5ad391e24ae942c2cd23a84afaff8ed688f731f438e400162ea263b392c45ce9f9cd7c5e23e5f28a1cd44d463c88
@@ -0,0 +1,11 @@
1
+ ## 1.0.1
2
+
3
+ * Fix for nil or empty string resource fetch
4
+
5
+
6
+ ## 1.0
7
+
8
+ * Requires Balanced API 1.1
9
+ * Hypermedia API support
10
+ * Debits and credits are now performed directly on funding instruments and not via Customer
11
+ * Support for new Order resource
data/README.md CHANGED
@@ -5,6 +5,10 @@ Online Marketplace Payments
5
5
  [![Build Status](https://secure.travis-ci.org/balanced/balanced-ruby.png)](http://travis-ci.org/balanced/balanced-ruby)
6
6
  [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/balanced/balanced-ruby)
7
7
 
8
+ **v1.x requires Balanced API 1.1. Use [v0.x](https://github.com/balanced/balanced-ruby/tree/rev0) for Balanced API 1.0.**
9
+
10
+
11
+
8
12
  ## Installation
9
13
 
10
14
  Add this line to your application's Gemfile:
@@ -5,9 +5,11 @@ module Balanced
5
5
  attr_reader :response
6
6
 
7
7
  # @param [Hash] response the decoded json response body
8
- def initialize(response)
8
+ def initialize(response=nil)
9
9
  @response = response
10
- super error_message
10
+ unless response.nil?
11
+ super error_message
12
+ end
11
13
  end
12
14
 
13
15
  # @return [Hash]
@@ -257,6 +257,11 @@ module Balanced
257
257
  end
258
258
 
259
259
  def fetch(*arguments)
260
+ if arguments.nil? ||
261
+ arguments.empty? ||
262
+ arguments[0].empty?
263
+ raise Balanced::NotFound
264
+ end
260
265
  scope = arguments.slice!(0)
261
266
  options = arguments.slice!(0) || {}
262
267
  case scope
@@ -1,3 +1,3 @@
1
1
  module Balanced
2
- VERSION = '1.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
8
8
  key = Balanced::ApiKey.new.save
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::ApiKey:0x007ff2bd9dc8a0
11
+ #<Balanced::ApiKey:0x007fa4e49e9748
12
12
  @attributes=
13
13
  {"created_at"=>"2014-03-06T19:22:18.256643Z",
14
14
  "href"=>"/api_keys/AK4Vt1mJyCtjdSiGgqAebarR",
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
  card = Balanced::ApiKey.all
8
8
 
9
9
  % elif mode == 'response':
10
- [#<Balanced::ApiKey:0x007ff2bd9c6398
10
+ [#<Balanced::ApiKey:0x007fa4e49d8858
11
11
  @attributes=
12
12
  {"created_at"=>"2014-03-06T19:22:18.256643Z",
13
13
  "href"=>"/api_keys/AK4Vt1mJyCtjdSiGgqAebarR",
@@ -15,7 +15,7 @@ card = Balanced::ApiKey.all
15
15
  "links"=>{},
16
16
  "meta"=>{}},
17
17
  @hyperlinks={}>,
18
- #<Balanced::ApiKey:0x007ff2bd9c60a0
18
+ #<Balanced::ApiKey:0x007fa4e49d85b0
19
19
  @attributes=
20
20
  {"created_at"=>"2014-03-06T19:22:11.872886Z",
21
21
  "href"=>"/api_keys/AK4OhVZUPzjD3YSCWBjU1dHO",
@@ -6,7 +6,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
6
6
 
7
7
  card = Balanced::ApiKey.fetch('/api_keys/AK4Vt1mJyCtjdSiGgqAebarR')
8
8
  % elif mode == 'response':
9
- #<Balanced::ApiKey:0x007ff2bc1124f0
9
+ #<Balanced::ApiKey:0x007fa4e49c1d88
10
10
  @attributes=
11
11
  {"created_at"=>"2014-03-06T19:22:18.256643Z",
12
12
  "href"=>"/api_keys/AK4Vt1mJyCtjdSiGgqAebarR",
@@ -9,7 +9,7 @@ customer = Balanced::Customer.fetch('/customers/CU64R7DS6DwuXYVg9RTskFK8')
9
9
  customer.add_bank_account("")
10
10
 
11
11
  % elif mode == 'response':
12
- #<Balanced::BankAccount:0x007ff2bd9ac0d8
12
+ #<Balanced::BankAccount:0x007fa4e49b1fc8
13
13
  @attributes=
14
14
  {"account_number"=>"xxxxxx0001",
15
15
  "account_type"=>"checking",
@@ -36,14 +36,14 @@ customer.add_bank_account("")
36
36
  "updated_at"=>"2014-03-06T19:23:28.930538Z"},
37
37
  @hyperlinks=
38
38
  {"bank_account_verification"=>
39
- #<Proc:0x007ff2bd9a6bb0/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fa4e49b09e8/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "bank_account_verifications"=>
41
- #<Proc:0x007ff2bd9a4630/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fa4e49a9f30/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "credits"=>
43
- #<Proc:0x007ff2bd99df60/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fa4e49a3ec8/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "customer"=>
45
- #<Proc:0x007ff2bd98bf18/lib/balanced/resources/resource.rb:60 (lambda)>,
45
+ #<Proc:0x007fa4e49a12b8/lib/balanced/resources/resource.rb:60 (lambda)>,
46
46
  "debits"=>
47
- #<Proc:0x007ff2bd9897b8/lib/balanced/utils.rb:6 (lambda)>}>
47
+ #<Proc:0x007fa4e499a558/lib/balanced/utils.rb:6 (lambda)>}>
48
48
 
49
49
  % endif
@@ -13,7 +13,7 @@ bank_account = Balanced::BankAccount.new(
13
13
  ).save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::BankAccount:0x007ff2bd9617b8
16
+ #<Balanced::BankAccount:0x007fa4e49749c0
17
17
  @attributes=
18
18
  {"account_number"=>"xxxxxx0001",
19
19
  "account_type"=>"checking",
@@ -39,14 +39,14 @@ bank_account = Balanced::BankAccount.new(
39
39
  "updated_at"=>"2014-03-06T19:23:27.876150Z"},
40
40
  @hyperlinks=
41
41
  {"bank_account_verification"=>
42
- #<Proc:0x007ff2bd960570/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa4e496f858/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "bank_account_verifications"=>
44
- #<Proc:0x007ff2bd959fb8/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa4e496d508/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "credits"=>
46
- #<Proc:0x007ff2bd953a00/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa4e4966b40/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "customer"=>
48
- #<Proc:0x007ff2bd952e98/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fa4e4965f60/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "debits"=>
50
- #<Proc:0x007ff2bd950bc0/lib/balanced/utils.rb:6 (lambda)>}>
50
+ #<Proc:0x007fa4e495fcc8/lib/balanced/utils.rb:6 (lambda)>}>
51
51
 
52
52
  % endif
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
8
8
  bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA6bLGpQZPOiTNRxF24rMd9m')
9
9
  bank_account.credit(:amount => 5000)
10
10
  % elif mode == 'response':
11
- #<Balanced::Credit:0x007ff2bd8c2a28
11
+ #<Balanced::Credit:0x007fa4e412db40
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
14
  "appears_on_statement_as"=>"example.com",
@@ -29,14 +29,14 @@ bank_account.credit(:amount => 5000)
29
29
  "updated_at"=>"2014-03-06T19:23:55.019500Z"},
30
30
  @hyperlinks=
31
31
  {"customer"=>
32
- #<Proc:0x007ff2bc106ba0/lib/balanced/resources/resource.rb:60 (lambda)>,
32
+ #<Proc:0x007fa4e411fe50/lib/balanced/resources/resource.rb:60 (lambda)>,
33
33
  "destination"=>
34
- #<Proc:0x007ff2be16a428/lib/balanced/resources/resource.rb:60 (lambda)>,
34
+ #<Proc:0x007fa4e411e230/lib/balanced/resources/resource.rb:60 (lambda)>,
35
35
  "events"=>
36
- #<Proc:0x007ff2be149250/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa4e4117980/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "order"=>
38
- #<Proc:0x007ff2be141550/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa4e4116dc8/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "reversals"=>
40
- #<Proc:0x007ff2be110540/lib/balanced/utils.rb:6 (lambda)>}>
40
+ #<Proc:0x007fa4e4114b90/lib/balanced/utils.rb:6 (lambda)>}>
41
41
 
42
42
  % endif
@@ -13,7 +13,7 @@ bank_account.debit(
13
13
  )
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Debit:0x007ff2bdb7ad60
16
+ #<Balanced::Debit:0x007fa4e40e2a78
17
17
  @attributes=
18
18
  {"amount"=>5000,
19
19
  "appears_on_statement_as"=>"BAL*Statement text",
@@ -35,16 +35,16 @@ bank_account.debit(
35
35
  "updated_at"=>"2014-03-06T19:22:36.418154Z"},
36
36
  @hyperlinks=
37
37
  {"customer"=>
38
- #<Proc:0x007ff2bdb79f28/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa4e40e1290/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "dispute"=>
40
- #<Proc:0x007ff2bdb79578/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa4e40dffa8/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "events"=>
42
- #<Proc:0x007ff2bdb736a0/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa4e40dd870/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "order"=>
44
- #<Proc:0x007ff2bdb72ca0/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007fa4e40dc718/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "refunds"=>
46
- #<Proc:0x007ff2bdb70e28/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa4e40d62a0/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "source"=>
48
- #<Proc:0x007ff2bdb6aa28/lib/balanced/resources/resource.rb:60 (lambda)>}>
48
+ #<Proc:0x007fa4e40d44f0/lib/balanced/resources/resource.rb:60 (lambda)>}>
49
49
 
50
50
  % endif
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
8
8
  Balanced::BankAccount.all
9
9
 
10
10
  % elif mode == 'response':
11
- [#<Balanced::BankAccount:0x007ff2bdb17710
11
+ [#<Balanced::BankAccount:0x007fa4e48ecca0
12
12
  @attributes=
13
13
  {"account_number"=>"xxxxxx0001",
14
14
  "account_type"=>"checking",
@@ -34,16 +34,16 @@ Balanced::BankAccount.all
34
34
  "updated_at"=>"2014-03-06T19:22:30.247410Z"},
35
35
  @hyperlinks=
36
36
  {"bank_account_verification"=>
37
- #<Proc:0x007ff2bdb166f8/lib/balanced/utils.rb:6 (lambda)>,
37
+ #<Proc:0x007fa4e48d78f0/lib/balanced/utils.rb:6 (lambda)>,
38
38
  "bank_account_verifications"=>
39
- #<Proc:0x007ff2bdb14678/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007fa4e48e7bb0/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "credits"=>
41
- #<Proc:0x007ff2bdb0d8f0/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007fa4e48e5540/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "customer"=>
43
- #<Proc:0x007ff2bdb0c6a8/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fa4e48e4988/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "debits"=>
45
- #<Proc:0x007ff2bdb054e8/lib/balanced/utils.rb:6 (lambda)>}>,
46
- #<Balanced::BankAccount:0x007ff2bdb05498
45
+ #<Proc:0x007fa4e48d2148/lib/balanced/utils.rb:6 (lambda)>}>,
46
+ #<Balanced::BankAccount:0x007fa4e48d20f8
47
47
  @attributes=
48
48
  {"account_number"=>"xxxxxx0001",
49
49
  "account_type"=>"checking",
@@ -71,14 +71,14 @@ Balanced::BankAccount.all
71
71
  "updated_at"=>"2014-03-06T19:22:27.888575Z"},
72
72
  @hyperlinks=
73
73
  {"bank_account_verification"=>
74
- #<Proc:0x007ff2bdafe670/lib/balanced/resources/resource.rb:60 (lambda)>,
74
+ #<Proc:0x007fa4e48df988/lib/balanced/resources/resource.rb:60 (lambda)>,
75
75
  "bank_account_verifications"=>
76
- #<Proc:0x007ff2bc0231e8/lib/balanced/utils.rb:6 (lambda)>,
76
+ #<Proc:0x007fa4e48dd430/lib/balanced/utils.rb:6 (lambda)>,
77
77
  "credits"=>
78
- #<Proc:0x007ff2bc0d9df8/lib/balanced/utils.rb:6 (lambda)>,
78
+ #<Proc:0x007fa4e48ced68/lib/balanced/utils.rb:6 (lambda)>,
79
79
  "customer"=>
80
- #<Proc:0x007ff2bc0d8e58/lib/balanced/utils.rb:6 (lambda)>,
80
+ #<Proc:0x007fa4e48ce0e8/lib/balanced/utils.rb:6 (lambda)>,
81
81
  "debits"=>
82
- #<Proc:0x007ff2bd823bf8/lib/balanced/utils.rb:6 (lambda)>}>]
82
+ #<Proc:0x007fa4e48cb780/lib/balanced/utils.rb:6 (lambda)>}>]
83
83
 
84
84
  % endif
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
  bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA58WYAEUMrEtAkW5KAvWo5V')
8
8
 
9
9
  % elif mode == 'response':
10
- #<Balanced::BankAccount:0x007ff2be0f38a0
10
+ #<Balanced::BankAccount:0x007fa4e315c040
11
11
  @attributes=
12
12
  {"account_number"=>"xxxxxx0001",
13
13
  "account_type"=>"checking",
@@ -33,14 +33,14 @@ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA58WYAEUMrEtAkW5KAvW
33
33
  "updated_at"=>"2014-03-06T19:22:30.247410Z"},
34
34
  @hyperlinks=
35
35
  {"bank_account_verification"=>
36
- #<Proc:0x007ff2be0fb370/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa4e314bf60/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "bank_account_verifications"=>
38
- #<Proc:0x007ff2be101d38/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa4e3130968/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "credits"=>
40
- #<Proc:0x007ff2be110c70/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa4e31218a0/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "customer"=>
42
- #<Proc:0x007ff2be111c60/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa4e31198f8/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "debits"=>
44
- #<Proc:0x007ff2be123758/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007fa4e3102ce8/lib/balanced/utils.rb:6 (lambda)>}>
45
45
 
46
46
  % endif
@@ -14,7 +14,7 @@ bank_account.meta = {
14
14
  bank_account.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::BankAccount:0x007ff2be1a93a8
17
+ #<Balanced::BankAccount:0x007fa4e303f310
18
18
  @attributes=
19
19
  {"account_number"=>"xxxxxx0001",
20
20
  "account_type"=>"checking",
@@ -43,14 +43,14 @@ bank_account.save
43
43
  "updated_at"=>"2014-03-06T19:22:33.744499Z"},
44
44
  @hyperlinks=
45
45
  {"bank_account_verification"=>
46
- #<Proc:0x007ff2bd88be10/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa4e304b778/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "bank_account_verifications"=>
48
- #<Proc:0x007ff2bd8aa810/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fa4e30399d8/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "credits"=>
50
- #<Proc:0x007ff2bd8bb098/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa4e40a7248/lib/balanced/utils.rb:6 (lambda)>,
51
51
  "customer"=>
52
- #<Proc:0x007ff2bd8b9ec8/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa4e2871570/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "debits"=>
54
- #<Proc:0x007ff2bd8c1a38/lib/balanced/utils.rb:6 (lambda)>}>
54
+ #<Proc:0x007fa4e4a78e70/lib/balanced/utils.rb:6 (lambda)>}>
55
55
 
56
56
  % endif
@@ -9,7 +9,7 @@ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA50LpPrCTB63Ecm0wEgd
9
9
  verification = bank_account.verify
10
10
 
11
11
  % elif mode == 'response':
12
- #<Balanced::BankAccountVerification:0x007ff2bd9290e8
12
+ #<Balanced::BankAccountVerification:0x007fa4e4a48518
13
13
  @attributes=
14
14
  {"attempts"=>0,
15
15
  "attempts_remaining"=>3,
@@ -23,6 +23,6 @@ verification = bank_account.verify
23
23
  "verification_status"=>"pending"},
24
24
  @hyperlinks=
25
25
  {"bank_account"=>
26
- #<Proc:0x007ff2bc8a70d0/lib/balanced/resources/resource.rb:60 (lambda)>}>
26
+ #<Proc:0x007fa4e4a41f60/lib/balanced/resources/resource.rb:60 (lambda)>}>
27
27
 
28
28
  % endif
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
8
8
  verification = Balanced::Verification.fetch('/verifications/BZ5alC0fajkuBOvOU7lVT7QJ')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::BankAccountVerification:0x007ff2bd93a6b8
11
+ #<Balanced::BankAccountVerification:0x007fa4e41c2358
12
12
  @attributes=
13
13
  {"attempts"=>0,
14
14
  "attempts_remaining"=>3,
@@ -22,6 +22,6 @@ verification = Balanced::Verification.fetch('/verifications/BZ5alC0fajkuBOvOU7lV
22
22
  "verification_status"=>"pending"},
23
23
  @hyperlinks=
24
24
  {"bank_account"=>
25
- #<Proc:0x007ff2bd942250/lib/balanced/resources/resource.rb:60 (lambda)>}>
25
+ #<Proc:0x007fa4e41c0300/lib/balanced/resources/resource.rb:60 (lambda)>}>
26
26
 
27
27
  % endif
@@ -13,7 +13,7 @@ verification.confirm(
13
13
 
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::BankAccountVerification:0x007ff2bd958938
16
+ #<Balanced::BankAccountVerification:0x007fa4e4a1ae60
17
17
  @attributes=
18
18
  {"attempts"=>1,
19
19
  "attempts_remaining"=>2,
@@ -27,6 +27,6 @@ verification.confirm(
27
27
  "verification_status"=>"succeeded"},
28
28
  @hyperlinks=
29
29
  {"bank_account"=>
30
- #<Proc:0x007ff2bd95a260/lib/balanced/resources/resource.rb:60 (lambda)>}>
30
+ #<Proc:0x007fa4e4a18070/lib/balanced/resources/resource.rb:60 (lambda)>}>
31
31
 
32
32
  % endif
@@ -10,7 +10,7 @@ callback = Balanced::Callback.new(
10
10
  ).save
11
11
 
12
12
  % elif mode == 'response':
13
- #<Balanced::Callback:0x007ff2bd972b08
13
+ #<Balanced::Callback:0x007fa4e327e810
14
14
  @attributes=
15
15
  {"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
16
16
  "id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
8
  callbacks = Balanced::Callback.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Callback:0x007ff2bd9948e8
10
+ [#<Balanced::Callback:0x007fa4e3266738
11
11
  @attributes=
12
12
  {"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
13
13
  "id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
8
  callback = Balanced::Callback.fetch('/callbacks/CB5pnz4XnaDpRFGlNMb6u50R')
9
9
  % elif mode == 'response':
10
- #<Balanced::Callback:0x007ff2bd99d628
10
+ #<Balanced::Callback:0x007fa4e3255f78
11
11
  @attributes=
12
12
  {"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
13
13
  "id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
@@ -1 +1 @@
1
- Balanced::Customer.add_card
1
+ Balanced::Customer.associate_to_customer
@@ -1,5 +1,5 @@
1
1
  % if mode == 'definition':
2
- Balanced::Customer.add_card
2
+ Balanced::Customer.associate_to_customer
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
@@ -9,7 +9,7 @@ card = Balanced::Card.fetch('/cards/CC68IoCVpoFlkugB7xt52p8C')
9
9
  card.associate_to_customer('/customers/CU64R7DS6DwuXYVg9RTskFK8')
10
10
 
11
11
  % elif mode == 'response':
12
- #<Balanced::Card:0x007ff2bd9b7190
12
+ #<Balanced::Card:0x007fa4e49f12e0
13
13
  @attributes=
14
14
  {"address"=>
15
15
  {"city"=>nil,
@@ -40,10 +40,10 @@ card.associate_to_customer('/customers/CU64R7DS6DwuXYVg9RTskFK8')
40
40
  "updated_at"=>"2014-03-06T19:23:25.633918Z"},
41
41
  @hyperlinks=
42
42
  {"card_holds"=>
43
- #<Proc:0x007ff2bc113940/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007fa4e49e9810/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "customer"=>
45
- #<Proc:0x007ff2bc111488/lib/balanced/resources/resource.rb:60 (lambda)>,
45
+ #<Proc:0x007fa4e49e39d8/lib/balanced/resources/resource.rb:60 (lambda)>,
46
46
  "debits"=>
47
- #<Proc:0x007ff2bc123408/lib/balanced/utils.rb:6 (lambda)>}>
47
+ #<Proc:0x007fa4e49e1ac0/lib/balanced/utils.rb:6 (lambda)>}>
48
48
 
49
49
  % endif