balanced 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile +1 -0
  4. data/balanced.gemspec +1 -1
  5. data/lib/balanced/client.rb +1 -2
  6. data/lib/balanced/error.rb +3 -3
  7. data/lib/balanced/resources/card.rb +15 -1
  8. data/lib/balanced/version.rb +1 -1
  9. data/scenarios/api_key_create/ruby.mako +6 -6
  10. data/scenarios/api_key_delete/ruby.mako +2 -2
  11. data/scenarios/api_key_list/ruby.mako +10 -10
  12. data/scenarios/api_key_show/ruby.mako +6 -6
  13. data/scenarios/bank_account_associate_to_customer/ruby.mako +14 -14
  14. data/scenarios/bank_account_create/ruby.mako +11 -11
  15. data/scenarios/bank_account_credit/ruby.mako +15 -15
  16. data/scenarios/bank_account_debit/ruby.mako +15 -15
  17. data/scenarios/bank_account_delete/ruby.mako +2 -2
  18. data/scenarios/bank_account_list/ruby.mako +22 -22
  19. data/scenarios/bank_account_show/ruby.mako +12 -12
  20. data/scenarios/bank_account_update/ruby.mako +12 -12
  21. data/scenarios/bank_account_verification_create/definition.rb +1 -1
  22. data/scenarios/bank_account_verification_create/ruby.mako +10 -10
  23. data/scenarios/bank_account_verification_show/definition.rb +1 -1
  24. data/scenarios/bank_account_verification_show/request.rb +1 -1
  25. data/scenarios/bank_account_verification_show/ruby.mako +10 -10
  26. data/scenarios/bank_account_verification_update/definition.rb +1 -1
  27. data/scenarios/bank_account_verification_update/request.rb +1 -1
  28. data/scenarios/bank_account_verification_update/ruby.mako +10 -10
  29. data/scenarios/callback_create/ruby.mako +4 -4
  30. data/scenarios/callback_delete/ruby.mako +2 -2
  31. data/scenarios/callback_list/ruby.mako +4 -4
  32. data/scenarios/callback_show/ruby.mako +5 -5
  33. data/scenarios/card_associate_to_customer/ruby.mako +21 -12
  34. data/scenarios/card_create/ruby.mako +18 -9
  35. data/scenarios/card_create_creditable/definition.rb +1 -0
  36. data/scenarios/card_create_creditable/request.rb +4 -0
  37. data/scenarios/card_create_creditable/ruby.mako +62 -0
  38. data/scenarios/card_create_dispute/ruby.mako +18 -9
  39. data/scenarios/card_credit/definition.rb +1 -0
  40. data/scenarios/card_credit/request.rb +5 -0
  41. data/scenarios/card_credit/ruby.mako +43 -0
  42. data/scenarios/card_debit/ruby.mako +16 -16
  43. data/scenarios/card_debit_dispute/ruby.mako +15 -15
  44. data/scenarios/card_delete/ruby.mako +2 -2
  45. data/scenarios/card_hold_capture/ruby.mako +16 -16
  46. data/scenarios/card_hold_create/ruby.mako +14 -14
  47. data/scenarios/card_hold_list/ruby.mako +25 -25
  48. data/scenarios/card_hold_show/ruby.mako +14 -14
  49. data/scenarios/card_hold_update/ruby.mako +14 -14
  50. data/scenarios/card_hold_void/ruby.mako +15 -15
  51. data/scenarios/card_list/ruby.mako +36 -18
  52. data/scenarios/card_show/ruby.mako +19 -10
  53. data/scenarios/card_update/ruby.mako +19 -10
  54. data/scenarios/credit_list/ruby.mako +14 -14
  55. data/scenarios/credit_list_bank_account/ruby.mako +2 -2
  56. data/scenarios/credit_order/definition.rb +1 -0
  57. data/scenarios/credit_order/request.rb +7 -0
  58. data/scenarios/credit_order/ruby.mako +26 -0
  59. data/scenarios/credit_show/ruby.mako +15 -15
  60. data/scenarios/credit_update/ruby.mako +15 -15
  61. data/scenarios/customer_create/ruby.mako +20 -18
  62. data/scenarios/customer_delete/ruby.mako +1 -1
  63. data/scenarios/customer_list/ruby.mako +39 -35
  64. data/scenarios/customer_show/ruby.mako +21 -19
  65. data/scenarios/customer_update/ruby.mako +21 -19
  66. data/scenarios/debit_dispute_show/ruby.mako +12 -12
  67. data/scenarios/debit_list/ruby.mako +34 -34
  68. data/scenarios/debit_order/definition.rb +1 -0
  69. data/scenarios/debit_order/request.rb +7 -0
  70. data/scenarios/debit_order/ruby.mako +49 -0
  71. data/scenarios/debit_show/ruby.mako +16 -16
  72. data/scenarios/debit_update/ruby.mako +16 -16
  73. data/scenarios/dispute_list/ruby.mako +11 -11
  74. data/scenarios/dispute_show/ruby.mako +12 -12
  75. data/scenarios/event_list/ruby.mako +56 -55
  76. data/scenarios/event_show/ruby.mako +41 -35
  77. data/scenarios/order_create/ruby.mako +14 -14
  78. data/scenarios/order_list/ruby.mako +45 -13
  79. data/scenarios/order_show/ruby.mako +14 -14
  80. data/scenarios/order_update/ruby.mako +14 -14
  81. data/scenarios/refund_create/ruby.mako +13 -13
  82. data/scenarios/refund_list/ruby.mako +12 -12
  83. data/scenarios/refund_show/ruby.mako +13 -13
  84. data/scenarios/refund_update/ruby.mako +13 -13
  85. data/scenarios/render_mako.rb +1 -1
  86. data/scenarios/reversal_create/ruby.mako +12 -12
  87. data/scenarios/reversal_list/ruby.mako +11 -11
  88. data/scenarios/reversal_show/ruby.mako +12 -12
  89. data/scenarios/reversal_update/ruby.mako +12 -12
  90. data/spec/balanced/resources/card_spec.rb +73 -11
  91. data/spec/balanced/resources/credit_spec.rb +155 -26
  92. data/spec/balanced/response/balanced_exception_middleware_spec.rb +1 -2
  93. data/spec/spec_helper.rb +3 -1
  94. metadata +22 -4
@@ -2,12 +2,12 @@
2
2
  Balanced::BankAccount.fetch
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
5
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
6
 
7
- bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA3PDwDCkdeC4OgPtPNwoCWl')
7
+ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA2EmblHC08bmwiwwNrbI0Rj')
8
8
 
9
9
  % elif mode == 'response':
10
- #<Balanced::BankAccount:0x007fa93eb44e18
10
+ #<Balanced::BankAccount:0x007fa7d1b484c8
11
11
  @attributes=
12
12
  {"account_number"=>"xxxxxx0001",
13
13
  "account_type"=>"checking",
@@ -21,26 +21,26 @@ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA3PDwDCkdeC4OgPtPNwo
21
21
  "bank_name"=>"BANK OF AMERICA, N.A.",
22
22
  "can_credit"=>true,
23
23
  "can_debit"=>false,
24
- "created_at"=>"2014-04-25T20:09:22.528624Z",
24
+ "created_at"=>"2014-05-15T00:39:14.751497Z",
25
25
  "fingerprint"=>
26
26
  "5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14",
27
- "href"=>"/bank_accounts/BA3PDwDCkdeC4OgPtPNwoCWl",
28
- "id"=>"BA3PDwDCkdeC4OgPtPNwoCWl",
27
+ "href"=>"/bank_accounts/BA2EmblHC08bmwiwwNrbI0Rj",
28
+ "id"=>"BA2EmblHC08bmwiwwNrbI0Rj",
29
29
  "links"=>{"bank_account_verification"=>nil, "customer"=>nil},
30
30
  "meta"=>{},
31
31
  "name"=>"Johann Bernoulli",
32
32
  "routing_number"=>"121000358",
33
- "updated_at"=>"2014-04-25T20:09:22.528628Z"},
33
+ "updated_at"=>"2014-05-15T00:39:14.751501Z"},
34
34
  @hyperlinks=
35
35
  {"bank_account_verification"=>
36
- #<Proc:0x007fa93eb442b0/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007fa7d1b41a10/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "bank_account_verifications"=>
38
- #<Proc:0x007fa93eb36368/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007fa7d1b32100/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "credits"=>
40
- #<Proc:0x007fa93eb34400/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007fa7d1b28970/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "customer"=>
42
- #<Proc:0x007fa93eb279d0/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007fa7d1b22b60/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "debits"=>
44
- #<Proc:0x007fa93eb259f0/lib/balanced/utils.rb:6 (lambda)>}>
44
+ #<Proc:0x007fa7d1b11360/lib/balanced/utils.rb:6 (lambda)>}>
45
45
 
46
46
  % endif
@@ -3,9 +3,9 @@ Balanced::BankAccount.save
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA3PDwDCkdeC4OgPtPNwoCWl')
8
+ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA2EmblHC08bmwiwwNrbI0Rj')
9
9
  bank_account.meta = {
10
10
  'facebook.user_id' => '0192837465',
11
11
  'my-own-customer-id' => '12345',
@@ -14,7 +14,7 @@ bank_account.meta = {
14
14
  bank_account.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::BankAccount:0x007fa93eae5a80
17
+ #<Balanced::BankAccount:0x007fa7d1a9a2d8
18
18
  @attributes=
19
19
  {"account_number"=>"xxxxxx0001",
20
20
  "account_type"=>"checking",
@@ -28,11 +28,11 @@ bank_account.save
28
28
  "bank_name"=>"BANK OF AMERICA, N.A.",
29
29
  "can_credit"=>true,
30
30
  "can_debit"=>false,
31
- "created_at"=>"2014-04-25T20:09:22.528624Z",
31
+ "created_at"=>"2014-05-15T00:39:14.751497Z",
32
32
  "fingerprint"=>
33
33
  "5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14",
34
- "href"=>"/bank_accounts/BA3PDwDCkdeC4OgPtPNwoCWl",
35
- "id"=>"BA3PDwDCkdeC4OgPtPNwoCWl",
34
+ "href"=>"/bank_accounts/BA2EmblHC08bmwiwwNrbI0Rj",
35
+ "id"=>"BA2EmblHC08bmwiwwNrbI0Rj",
36
36
  "links"=>{"bank_account_verification"=>nil, "customer"=>nil},
37
37
  "meta"=>
38
38
  {"facebook.user_id"=>"0192837465",
@@ -40,17 +40,17 @@ bank_account.save
40
40
  "twitter.id"=>"1234987650"},
41
41
  "name"=>"Johann Bernoulli",
42
42
  "routing_number"=>"121000358",
43
- "updated_at"=>"2014-04-25T20:09:25.975494Z"},
43
+ "updated_at"=>"2014-05-15T00:39:18.442760Z"},
44
44
  @hyperlinks=
45
45
  {"bank_account_verification"=>
46
- #<Proc:0x007fa93eae4e00/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007fa7d1a92768/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "bank_account_verifications"=>
48
- #<Proc:0x007fa93eadede8/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007fa7d1a82020/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "credits"=>
50
- #<Proc:0x007fa93eadcae8/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007fa7d1a7b018/lib/balanced/utils.rb:6 (lambda)>,
51
51
  "customer"=>
52
- #<Proc:0x007fa93eadc0e8/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa7d1a79ab0/lib/balanced/utils.rb:6 (lambda)>,
53
53
  "debits"=>
54
- #<Proc:0x007fa93ead6350/lib/balanced/utils.rb:6 (lambda)>}>
54
+ #<Proc:0x007fa7d1a68fa8/lib/balanced/utils.rb:6 (lambda)>}>
55
55
 
56
56
  % endif
@@ -1 +1 @@
1
- Balanced::Verification.new.save
1
+ Balanced::BankAccount.verify
@@ -1,28 +1,28 @@
1
1
  % if mode == 'definition':
2
- Balanced::Verification.new.save
2
+ Balanced::BankAccount.verify
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA3IhKG3bIN22cLHbaOIGtHb')
8
+ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA1W9SQLf5YRaGbUGiNIO2fb')
9
9
  verification = bank_account.verify
10
10
 
11
11
  % elif mode == 'response':
12
- #<Balanced::BankAccountVerification:0x007fa93eab4ae8
12
+ #<Balanced::BankAccountVerification:0x007fa7d19ffc10
13
13
  @attributes=
14
14
  {"attempts"=>0,
15
15
  "attempts_remaining"=>3,
16
- "created_at"=>"2014-04-25T20:09:17.814785Z",
16
+ "created_at"=>"2014-05-15T00:38:54.349838Z",
17
17
  "deposit_status"=>"succeeded",
18
- "href"=>"/verifications/BZ3KkIZuSazKfqFrFIfsrhmB",
19
- "id"=>"BZ3KkIZuSazKfqFrFIfsrhmB",
20
- "links"=>{"bank_account"=>"BA3IhKG3bIN22cLHbaOIGtHb"},
18
+ "href"=>"/verifications/BZ2hpl7vb9rgWVZxrXRzZb93",
19
+ "id"=>"BZ2hpl7vb9rgWVZxrXRzZb93",
20
+ "links"=>{"bank_account"=>"BA1W9SQLf5YRaGbUGiNIO2fb"},
21
21
  "meta"=>{},
22
- "updated_at"=>"2014-04-25T20:09:18.218504Z",
22
+ "updated_at"=>"2014-05-15T00:39:05.155113Z",
23
23
  "verification_status"=>"pending"},
24
24
  @hyperlinks=
25
25
  {"bank_account"=>
26
- #<Proc:0x007fa93eaae2b0/lib/balanced/resources/resource.rb:60 (lambda)>}>
26
+ #<Proc:0x007fa7d19fc628/lib/balanced/resources/resource.rb:60 (lambda)>}>
27
27
 
28
28
  % endif
@@ -1 +1 @@
1
- Balanced::Verification.fetch
1
+ Balanced::BankAccountVerification.fetch
@@ -1,2 +1,2 @@
1
1
  <%= boiler_plate %>
2
- verification = Balanced::Verification.fetch('<%=request['uri']%>')
2
+ verification = Balanced::BankAccountVerification.fetch('<%=request['uri']%>')
@@ -1,27 +1,27 @@
1
1
  % if mode == 'definition':
2
- Balanced::Verification.fetch
2
+ Balanced::BankAccountVerification.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- verification = Balanced::Verification.fetch('/verifications/BZ3KkIZuSazKfqFrFIfsrhmB')
8
+ verification = Balanced::BankAccountVerification.fetch('/verifications/BZ2hpl7vb9rgWVZxrXRzZb93')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::BankAccountVerification:0x007fa93ea9c8d0
11
+ #<Balanced::BankAccountVerification:0x007fa7d1978508
12
12
  @attributes=
13
13
  {"attempts"=>0,
14
14
  "attempts_remaining"=>3,
15
- "created_at"=>"2014-04-25T20:09:17.814785Z",
15
+ "created_at"=>"2014-05-15T00:38:54.349838Z",
16
16
  "deposit_status"=>"succeeded",
17
- "href"=>"/verifications/BZ3KkIZuSazKfqFrFIfsrhmB",
18
- "id"=>"BZ3KkIZuSazKfqFrFIfsrhmB",
19
- "links"=>{"bank_account"=>"BA3IhKG3bIN22cLHbaOIGtHb"},
17
+ "href"=>"/verifications/BZ2hpl7vb9rgWVZxrXRzZb93",
18
+ "id"=>"BZ2hpl7vb9rgWVZxrXRzZb93",
19
+ "links"=>{"bank_account"=>"BA1W9SQLf5YRaGbUGiNIO2fb"},
20
20
  "meta"=>{},
21
- "updated_at"=>"2014-04-25T20:09:18.218504Z",
21
+ "updated_at"=>"2014-05-15T00:39:05.155113Z",
22
22
  "verification_status"=>"pending"},
23
23
  @hyperlinks=
24
24
  {"bank_account"=>
25
- #<Proc:0x007fa93ea96b88/lib/balanced/resources/resource.rb:60 (lambda)>}>
25
+ #<Proc:0x007fa7d19706f0/lib/balanced/resources/resource.rb:60 (lambda)>}>
26
26
 
27
27
  % endif
@@ -1 +1 @@
1
- Balanced::Verification.confirm
1
+ Balanced::BankAccountVerification.confirm
@@ -1,5 +1,5 @@
1
1
  <%= boiler_plate %>
2
- verification = Balanced::Verification.fetch('<%=request['uri']%>')
2
+ verification = Balanced::BankAccountVerification.fetch('<%=request['uri']%>')
3
3
  verification.confirm(
4
4
  <%= params_to_key_word_arguments.call(payload).indent(2)%>
5
5
  )
@@ -1,11 +1,11 @@
1
1
  % if mode == 'definition':
2
- Balanced::Verification.confirm
2
+ Balanced::BankAccountVerification.confirm
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- verification = Balanced::Verification.fetch('/verifications/BZ3KkIZuSazKfqFrFIfsrhmB')
8
+ verification = Balanced::BankAccountVerification.fetch('/verifications/BZ2hpl7vb9rgWVZxrXRzZb93')
9
9
  verification.confirm(
10
10
  amount_1 = 1,
11
11
  amount_2 = 1
@@ -13,20 +13,20 @@ verification.confirm(
13
13
 
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::BankAccountVerification:0x007fa93ea84a78
16
+ #<Balanced::BankAccountVerification:0x007fa7d19439e8
17
17
  @attributes=
18
18
  {"attempts"=>1,
19
19
  "attempts_remaining"=>2,
20
- "created_at"=>"2014-04-25T20:09:17.814785Z",
20
+ "created_at"=>"2014-05-15T00:38:54.349838Z",
21
21
  "deposit_status"=>"succeeded",
22
- "href"=>"/verifications/BZ3KkIZuSazKfqFrFIfsrhmB",
23
- "id"=>"BZ3KkIZuSazKfqFrFIfsrhmB",
24
- "links"=>{"bank_account"=>"BA3IhKG3bIN22cLHbaOIGtHb"},
22
+ "href"=>"/verifications/BZ2hpl7vb9rgWVZxrXRzZb93",
23
+ "id"=>"BZ2hpl7vb9rgWVZxrXRzZb93",
24
+ "links"=>{"bank_account"=>"BA1W9SQLf5YRaGbUGiNIO2fb"},
25
25
  "meta"=>{},
26
- "updated_at"=>"2014-04-25T20:09:20.852682Z",
26
+ "updated_at"=>"2014-05-15T00:39:12.507804Z",
27
27
  "verification_status"=>"succeeded"},
28
28
  @hyperlinks=
29
29
  {"bank_account"=>
30
- #<Proc:0x007fa93ea7ebf0/lib/balanced/resources/resource.rb:60 (lambda)>}>
30
+ #<Proc:0x007fa7d1931fb8/lib/balanced/resources/resource.rb:60 (lambda)>}>
31
31
 
32
32
  % endif
@@ -2,7 +2,7 @@
2
2
  Balanced::Callback.new
3
3
  % elif mode == 'request':
4
4
  require 'balanced'
5
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
5
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
6
6
 
7
7
  callback = Balanced::Callback.new(
8
8
  :method => 'post',
@@ -10,10 +10,10 @@ callback = Balanced::Callback.new(
10
10
  ).save
11
11
 
12
12
  % elif mode == 'response':
13
- #<Balanced::Callback:0x007fa93ea6c9c8
13
+ #<Balanced::Callback:0x007fa7d18d5d58
14
14
  @attributes=
15
- {"href"=>"/callbacks/CB44XaMOcxsUnuQoA5A4VKCx",
16
- "id"=>"CB44XaMOcxsUnuQoA5A4VKCx",
15
+ {"href"=>"/callbacks/CB2YCHTwHXMx9fZRKSbW3wNj",
16
+ "id"=>"CB2YCHTwHXMx9fZRKSbW3wNj",
17
17
  "links"=>{},
18
18
  "method"=>"post",
19
19
  "revision"=>"1.1",
@@ -3,9 +3,9 @@ Balanced::Callback.unstore
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- callback = Balanced::Callback.fetch('/callbacks/CB44XaMOcxsUnuQoA5A4VKCx')
8
+ callback = Balanced::Callback.fetch('/callbacks/CB2YCHTwHXMx9fZRKSbW3wNj')
9
9
  callback.unstore
10
10
  % elif mode == 'response':
11
11
 
@@ -3,14 +3,14 @@ Balanced::Callback.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
8
  callbacks = Balanced::Callback.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Callback:0x007fa93ea565b0
10
+ [#<Balanced::Callback:0x007fa7d18987a0
11
11
  @attributes=
12
- {"href"=>"/callbacks/CB44XaMOcxsUnuQoA5A4VKCx",
13
- "id"=>"CB44XaMOcxsUnuQoA5A4VKCx",
12
+ {"href"=>"/callbacks/CB2YCHTwHXMx9fZRKSbW3wNj",
13
+ "id"=>"CB2YCHTwHXMx9fZRKSbW3wNj",
14
14
  "links"=>{},
15
15
  "method"=>"post",
16
16
  "revision"=>"1.1",
@@ -3,14 +3,14 @@ Balanced::Callback.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- callback = Balanced::Callback.fetch('/callbacks/CB44XaMOcxsUnuQoA5A4VKCx')
8
+ callback = Balanced::Callback.fetch('/callbacks/CB2YCHTwHXMx9fZRKSbW3wNj')
9
9
  % elif mode == 'response':
10
- #<Balanced::Callback:0x007fa93ea4c3f8
10
+ #<Balanced::Callback:0x007fa7d18425f8
11
11
  @attributes=
12
- {"href"=>"/callbacks/CB44XaMOcxsUnuQoA5A4VKCx",
13
- "id"=>"CB44XaMOcxsUnuQoA5A4VKCx",
12
+ {"href"=>"/callbacks/CB2YCHTwHXMx9fZRKSbW3wNj",
13
+ "id"=>"CB2YCHTwHXMx9fZRKSbW3wNj",
14
14
  "links"=>{},
15
15
  "method"=>"post",
16
16
  "revision"=>"1.1",
@@ -3,12 +3,12 @@ Balanced::Card.associate_to_customer
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
- card = Balanced::Card.fetch('/cards/CC4tvKLTKXcBJAgkGvPEW58N')
9
- card.associate_to_customer('/customers/CU3VYCUIfwngJsidJWdGw2W5')
8
+ card = Balanced::Card.fetch('/cards/CC4xXVOyMBDdk7FtzG9HwtBv')
9
+ card.associate_to_customer('/customers/CU2L981m9AtPY8pjpGpjnjnf')
10
10
  % elif mode == 'response':
11
- #<Balanced::Card:0x007fa93ea3d100
11
+ #<Balanced::Card:0x007fa7d40a7818
12
12
  @attributes=
13
13
  {"address"=>
14
14
  {"city"=>nil,
@@ -20,8 +20,12 @@ card.associate_to_customer('/customers/CU3VYCUIfwngJsidJWdGw2W5')
20
20
  "avs_postal_match"=>nil,
21
21
  "avs_result"=>nil,
22
22
  "avs_street_match"=>nil,
23
+ "bank"=>"BANK OF HAWAII",
23
24
  "brand"=>"MasterCard",
24
- "created_at"=>"2014-04-25T20:09:57.984444Z",
25
+ "can_credit"=>false,
26
+ "can_debit"=>true,
27
+ "category"=>nil,
28
+ "created_at"=>"2014-05-15T00:40:59.321023Z",
25
29
  "cvv"=>"xxx",
26
30
  "cvv_match"=>"yes",
27
31
  "cvv_result"=>"Match",
@@ -29,20 +33,25 @@ card.associate_to_customer('/customers/CU3VYCUIfwngJsidJWdGw2W5')
29
33
  "expiration_year"=>2020,
30
34
  "fingerprint"=>
31
35
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
32
- "href"=>"/cards/CC4tvKLTKXcBJAgkGvPEW58N",
33
- "id"=>"CC4tvKLTKXcBJAgkGvPEW58N",
36
+ "href"=>"/cards/CC4xXVOyMBDdk7FtzG9HwtBv",
37
+ "id"=>"CC4xXVOyMBDdk7FtzG9HwtBv",
34
38
  "is_verified"=>true,
35
- "links"=>{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5"},
39
+ "links"=>{"customer"=>"CU2L981m9AtPY8pjpGpjnjnf"},
36
40
  "meta"=>{},
37
41
  "name"=>nil,
38
42
  "number"=>"xxxxxxxxxxxx5100",
39
- "updated_at"=>"2014-04-25T20:09:58.467948Z"},
43
+ "type"=>"",
44
+ "updated_at"=>"2014-05-15T00:41:01.104489Z"},
40
45
  @hyperlinks=
41
46
  {"card_holds"=>
42
- #<Proc:0x007fa93ea36788/lib/balanced/utils.rb:6 (lambda)>,
47
+ #<Proc:0x007fa7d40a5770/lib/balanced/utils.rb:6 (lambda)>,
48
+ "credits"=>
49
+ #<Proc:0x007fa7d40e78a0/lib/balanced/utils.rb:6 (lambda)>,
43
50
  "customer"=>
44
- #<Proc:0x007fa93ea34190/lib/balanced/resources/resource.rb:60 (lambda)>,
51
+ #<Proc:0x007fa7d40e5f00/lib/balanced/resources/resource.rb:60 (lambda)>,
45
52
  "debits"=>
46
- #<Proc:0x007fa93ea2e240/lib/balanced/utils.rb:6 (lambda)>}>
53
+ #<Proc:0x007fa7d40e40b0/lib/balanced/utils.rb:6 (lambda)>,
54
+ "disputes"=>
55
+ #<Proc:0x007fa7d40ee1f0/lib/balanced/utils.rb:6 (lambda)>}>
47
56
 
48
57
  % endif
@@ -3,7 +3,7 @@ Balanced::Card.new
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
6
+ Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
7
7
 
8
8
  card = Balanced::Card.new(
9
9
  :cvv => '123',
@@ -13,7 +13,7 @@ card = Balanced::Card.new(
13
13
  ).save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Card:0x007fa93ea04be8
16
+ #<Balanced::Card:0x007fa7d419e870
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -25,8 +25,12 @@ card = Balanced::Card.new(
25
25
  "avs_postal_match"=>nil,
26
26
  "avs_result"=>nil,
27
27
  "avs_street_match"=>nil,
28
+ "bank"=>"BANK OF HAWAII",
28
29
  "brand"=>"MasterCard",
29
- "created_at"=>"2014-04-25T20:09:57.984444Z",
30
+ "can_credit"=>false,
31
+ "can_debit"=>true,
32
+ "category"=>nil,
33
+ "created_at"=>"2014-05-15T00:40:59.321023Z",
30
34
  "cvv"=>"xxx",
31
35
  "cvv_match"=>"yes",
32
36
  "cvv_result"=>"Match",
@@ -34,20 +38,25 @@ card = Balanced::Card.new(
34
38
  "expiration_year"=>2020,
35
39
  "fingerprint"=>
36
40
  "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
37
- "href"=>"/cards/CC4tvKLTKXcBJAgkGvPEW58N",
38
- "id"=>"CC4tvKLTKXcBJAgkGvPEW58N",
41
+ "href"=>"/cards/CC4xXVOyMBDdk7FtzG9HwtBv",
42
+ "id"=>"CC4xXVOyMBDdk7FtzG9HwtBv",
39
43
  "is_verified"=>true,
40
44
  "links"=>{"customer"=>nil},
41
45
  "meta"=>{},
42
46
  "name"=>nil,
43
47
  "number"=>"xxxxxxxxxxxx5100",
44
- "updated_at"=>"2014-04-25T20:09:57.984446Z"},
48
+ "type"=>"",
49
+ "updated_at"=>"2014-05-15T00:40:59.321027Z"},
45
50
  @hyperlinks=
46
51
  {"card_holds"=>
47
- #<Proc:0x007fa93e9fe568/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007fa7d419c7f0/lib/balanced/utils.rb:6 (lambda)>,
53
+ "credits"=>
54
+ #<Proc:0x007fa7d419d8f8/lib/balanced/utils.rb:6 (lambda)>,
48
55
  "customer"=>
49
- #<Proc:0x007fa93e9fd500/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007fa7d419cf48/lib/balanced/utils.rb:6 (lambda)>,
50
57
  "debits"=>
51
- #<Proc:0x007fa93e9cf678/lib/balanced/utils.rb:6 (lambda)>}>
58
+ #<Proc:0x007fa7d4196d28/lib/balanced/utils.rb:6 (lambda)>,
59
+ "disputes"=>
60
+ #<Proc:0x007fa7d4194d98/lib/balanced/utils.rb:6 (lambda)>}>
52
61
 
53
62
  % endif