balanced 1.0.beta1 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/LICENSE +2 -2
  5. data/balanced.gemspec +1 -1
  6. data/lib/balanced/resources.rb +1 -0
  7. data/lib/balanced/resources/customer.rb +0 -14
  8. data/lib/balanced/resources/dispute.rb +12 -0
  9. data/lib/balanced/version.rb +1 -1
  10. data/scenario.cache +142 -141
  11. data/scenarios/api_key_create/ruby.mako +6 -6
  12. data/scenarios/api_key_delete/ruby.mako +2 -2
  13. data/scenarios/api_key_list/ruby.mako +10 -10
  14. data/scenarios/api_key_show/ruby.mako +6 -6
  15. data/scenarios/bank_account_associate_to_customer/ruby.mako +13 -13
  16. data/scenarios/bank_account_create/ruby.mako +13 -13
  17. data/scenarios/bank_account_credit/ruby.mako +15 -15
  18. data/scenarios/bank_account_debit/ruby.mako +15 -15
  19. data/scenarios/bank_account_delete/ruby.mako +2 -2
  20. data/scenarios/bank_account_list/ruby.mako +22 -22
  21. data/scenarios/bank_account_show/ruby.mako +12 -12
  22. data/scenarios/bank_account_update/ruby.mako +12 -12
  23. data/scenarios/bank_account_verification_create/ruby.mako +9 -9
  24. data/scenarios/bank_account_verification_show/ruby.mako +9 -9
  25. data/scenarios/bank_account_verification_update/ruby.mako +9 -9
  26. data/scenarios/callback_create/ruby.mako +5 -4
  27. data/scenarios/callback_delete/ruby.mako +2 -2
  28. data/scenarios/callback_list/ruby.mako +4 -4
  29. data/scenarios/callback_show/ruby.mako +5 -5
  30. data/scenarios/card_associate_to_customer/ruby.mako +15 -15
  31. data/scenarios/card_create/ruby.mako +14 -14
  32. data/scenarios/card_debit/ruby.mako +16 -16
  33. data/scenarios/card_delete/ruby.mako +2 -2
  34. data/scenarios/card_hold_capture/ruby.mako +16 -16
  35. data/scenarios/card_hold_create/ruby.mako +16 -14
  36. data/scenarios/card_hold_list/ruby.mako +29 -25
  37. data/scenarios/card_hold_show/ruby.mako +16 -14
  38. data/scenarios/card_hold_update/ruby.mako +16 -14
  39. data/scenarios/card_hold_void/ruby.mako +16 -14
  40. data/scenarios/card_list/ruby.mako +24 -24
  41. data/scenarios/card_show/ruby.mako +13 -13
  42. data/scenarios/card_update/ruby.mako +13 -13
  43. data/scenarios/credit_list/ruby.mako +14 -14
  44. data/scenarios/credit_list_bank_account/ruby.mako +2 -2
  45. data/scenarios/credit_show/ruby.mako +15 -15
  46. data/scenarios/credit_update/ruby.mako +15 -15
  47. data/scenarios/customer_create/ruby.mako +19 -17
  48. data/scenarios/customer_delete/ruby.mako +1 -1
  49. data/scenarios/customer_list/ruby.mako +37 -33
  50. data/scenarios/customer_show/ruby.mako +20 -18
  51. data/scenarios/customer_update/ruby.mako +20 -18
  52. data/scenarios/debit_list/ruby.mako +28 -28
  53. data/scenarios/debit_show/ruby.mako +15 -15
  54. data/scenarios/debit_update/ruby.mako +15 -15
  55. data/scenarios/event_list/ruby.mako +67 -20
  56. data/scenarios/event_show/ruby.mako +23 -21
  57. data/scenarios/order_create/ruby.mako +14 -14
  58. data/scenarios/order_list/ruby.mako +13 -13
  59. data/scenarios/order_show/ruby.mako +14 -14
  60. data/scenarios/order_update/ruby.mako +14 -14
  61. data/scenarios/refund_create/ruby.mako +13 -13
  62. data/scenarios/refund_list/ruby.mako +12 -12
  63. data/scenarios/refund_show/ruby.mako +13 -13
  64. data/scenarios/refund_update/ruby.mako +13 -13
  65. data/scenarios/render_mako.rb +0 -1
  66. data/scenarios/reversal_create/ruby.mako +12 -12
  67. data/scenarios/reversal_list/ruby.mako +11 -11
  68. data/scenarios/reversal_show/ruby.mako +12 -12
  69. data/scenarios/reversal_update/ruby.mako +12 -12
  70. data/spec/balanced/resources/bank_account_spec.rb +0 -3
  71. data/spec/balanced/resources/debit_spec.rb +0 -13
  72. data/spec/balanced/resources/dispute_spec.rb +65 -0
  73. metadata +20 -18
  74. data/.rbenv-version +0 -1
@@ -3,11 +3,11 @@ Balanced::Customer.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- customer = Balanced::Customer.fetch('/customers/CU33Y4cut21qu1d1lGYDBseQ')
8
+ customer = Balanced::Customer.fetch('/customers/CU5YopHN07Ul5XQnILUifeQT')
9
9
  % elif mode == 'response':
10
- #<Balanced::Customer:0x007fdc9c278fc8
10
+ #<Balanced::Customer:0x007ff2bdaf2028
11
11
  @attributes=
12
12
  {"address"=>
13
13
  {"city"=>nil,
@@ -17,42 +17,44 @@ customer = Balanced::Customer.fetch('/customers/CU33Y4cut21qu1d1lGYDBseQ')
17
17
  "postal_code"=>"48120",
18
18
  "state"=>nil},
19
19
  "business_name"=>nil,
20
- "created_at"=>"2014-01-27T22:57:27.459187Z",
20
+ "created_at"=>"2014-03-06T19:23:15.982885Z",
21
21
  "dob_month"=>7,
22
22
  "dob_year"=>1963,
23
23
  "ein"=>nil,
24
24
  "email"=>nil,
25
- "href"=>"/customers/CU33Y4cut21qu1d1lGYDBseQ",
26
- "id"=>"CU33Y4cut21qu1d1lGYDBseQ",
25
+ "href"=>"/customers/CU5YopHN07Ul5XQnILUifeQT",
26
+ "id"=>"CU5YopHN07Ul5XQnILUifeQT",
27
27
  "links"=>{"destination"=>nil, "source"=>nil},
28
28
  "merchant_status"=>"underwritten",
29
29
  "meta"=>{},
30
30
  "name"=>"Henry Ford",
31
31
  "phone"=>nil,
32
32
  "ssn_last4"=>nil,
33
- "updated_at"=>"2014-01-27T22:57:29.488272Z"},
33
+ "updated_at"=>"2014-03-06T19:23:16.724050Z"},
34
34
  @hyperlinks=
35
35
  {"bank_accounts"=>
36
- #<Proc:0x007fdc9c2729c0/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007ff2bdafb858/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "card_holds"=>
38
- #<Proc:0x007fdc9c2705d0/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007ff2bdaf81d0/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "cards"=>
40
- #<Proc:0x007fdc9c26a8d8/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007ff2bc93c928/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "credits"=>
42
- #<Proc:0x007fdc9c2687b8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007ff2bc932428/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "debits"=>
44
- #<Proc:0x007fdc9c262f70/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007ff2bc92b588/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "destination"=>
46
- #<Proc:0x007fdc9c262368/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007ff2bc92a840/lib/balanced/utils.rb:6 (lambda)>,
47
+ "external_accounts"=>
48
+ #<Proc:0x007ff2bc9232e8/lib/balanced/utils.rb:6 (lambda)>,
47
49
  "orders"=>
48
- #<Proc:0x007fdc9c25bf90/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007ff2bc921b78/lib/balanced/utils.rb:6 (lambda)>,
49
51
  "refunds"=>
50
- #<Proc:0x007fdc9c25a5a0/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007ff2bc913be0/lib/balanced/utils.rb:6 (lambda)>,
51
53
  "reversals"=>
52
- #<Proc:0x007fdc9c258250/lib/balanced/utils.rb:6 (lambda)>,
54
+ #<Proc:0x007ff2bc9113b8/lib/balanced/utils.rb:6 (lambda)>,
53
55
  "source"=>
54
- #<Proc:0x007fdc9c07cbe8/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007ff2bc9105d0/lib/balanced/utils.rb:6 (lambda)>,
55
57
  "transactions"=>
56
- #<Proc:0x007fdc9c07e240/lib/balanced/utils.rb:6 (lambda)>}>
58
+ #<Proc:0x007ff2bc919ea0/lib/balanced/utils.rb:6 (lambda)>}>
57
59
 
58
60
  % endif
@@ -3,9 +3,9 @@ Balanced::Customer.save
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- customer = Balanced::Customer.fetch('/customers/CU33Y4cut21qu1d1lGYDBseQ')
8
+ customer = Balanced::Customer.fetch('/customers/CU5YopHN07Ul5XQnILUifeQT')
9
9
  customer.email = 'email@newdomain.com'
10
10
  customer.meta = {
11
11
  'shipping-preference' => 'ground'
@@ -13,7 +13,7 @@ customer.meta = {
13
13
  customer.save
14
14
 
15
15
  % elif mode == 'response':
16
- #<Balanced::Customer:0x007fdc9d2cd360
16
+ #<Balanced::Customer:0x007ff2bdac6e78
17
17
  @attributes=
18
18
  {"address"=>
19
19
  {"city"=>nil,
@@ -23,42 +23,44 @@ customer.save
23
23
  "postal_code"=>"48120",
24
24
  "state"=>nil},
25
25
  "business_name"=>nil,
26
- "created_at"=>"2014-01-27T22:57:27.459187Z",
26
+ "created_at"=>"2014-03-06T19:23:15.982885Z",
27
27
  "dob_month"=>7,
28
28
  "dob_year"=>1963,
29
29
  "ein"=>nil,
30
30
  "email"=>"email@newdomain.com",
31
- "href"=>"/customers/CU33Y4cut21qu1d1lGYDBseQ",
32
- "id"=>"CU33Y4cut21qu1d1lGYDBseQ",
31
+ "href"=>"/customers/CU5YopHN07Ul5XQnILUifeQT",
32
+ "id"=>"CU5YopHN07Ul5XQnILUifeQT",
33
33
  "links"=>{"destination"=>nil, "source"=>nil},
34
34
  "merchant_status"=>"underwritten",
35
35
  "meta"=>{"shipping-preference"=>"ground"},
36
36
  "name"=>"Henry Ford",
37
37
  "phone"=>nil,
38
38
  "ssn_last4"=>nil,
39
- "updated_at"=>"2014-01-27T22:57:34.512310Z"},
39
+ "updated_at"=>"2014-03-06T19:23:20.140160Z"},
40
40
  @hyperlinks=
41
41
  {"bank_accounts"=>
42
- #<Proc:0x007fdc9d2c74d8/lib/balanced/utils.rb:6 (lambda)>,
42
+ #<Proc:0x007ff2bdabe8e0/lib/balanced/utils.rb:6 (lambda)>,
43
43
  "card_holds"=>
44
- #<Proc:0x007fdc9d2c5480/lib/balanced/utils.rb:6 (lambda)>,
44
+ #<Proc:0x007ff2bdab78b0/lib/balanced/utils.rb:6 (lambda)>,
45
45
  "cards"=>
46
- #<Proc:0x007fdc9d2bf260/lib/balanced/utils.rb:6 (lambda)>,
46
+ #<Proc:0x007ff2bdaafd40/lib/balanced/utils.rb:6 (lambda)>,
47
47
  "credits"=>
48
- #<Proc:0x007fdc9d2bd2d0/lib/balanced/utils.rb:6 (lambda)>,
48
+ #<Proc:0x007ff2bdaad658/lib/balanced/utils.rb:6 (lambda)>,
49
49
  "debits"=>
50
- #<Proc:0x007fdc9d28f8f8/lib/balanced/utils.rb:6 (lambda)>,
50
+ #<Proc:0x007ff2bdaa7370/lib/balanced/utils.rb:6 (lambda)>,
51
51
  "destination"=>
52
- #<Proc:0x007fdc9d28ed40/lib/balanced/utils.rb:6 (lambda)>,
52
+ #<Proc:0x007ff2bdaa65b0/lib/balanced/utils.rb:6 (lambda)>,
53
+ "external_accounts"=>
54
+ #<Proc:0x007ff2bda9e3b0/lib/balanced/utils.rb:6 (lambda)>,
53
55
  "orders"=>
54
- #<Proc:0x007fdc9d28c978/lib/balanced/utils.rb:6 (lambda)>,
56
+ #<Proc:0x007ff2bda9da78/lib/balanced/utils.rb:6 (lambda)>,
55
57
  "refunds"=>
56
- #<Proc:0x007fdc9d289ea8/lib/balanced/utils.rb:6 (lambda)>,
58
+ #<Proc:0x007ff2bda940b8/lib/balanced/utils.rb:6 (lambda)>,
57
59
  "reversals"=>
58
- #<Proc:0x007fdc9d287748/lib/balanced/utils.rb:6 (lambda)>,
60
+ #<Proc:0x007ff2bc8ccd30/lib/balanced/utils.rb:6 (lambda)>,
59
61
  "source"=>
60
- #<Proc:0x007fdc9d285740/lib/balanced/utils.rb:6 (lambda)>,
62
+ #<Proc:0x007ff2bc8c5440/lib/balanced/utils.rb:6 (lambda)>,
61
63
  "transactions"=>
62
- #<Proc:0x007fdc9d2b4608/lib/balanced/utils.rb:6 (lambda)>}>
64
+ #<Proc:0x007ff2bc8c5ff8/lib/balanced/utils.rb:6 (lambda)>}>
63
65
 
64
66
  % endif
@@ -3,75 +3,75 @@ Balanced::Debit.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
8
  debits = Balanced::Debit.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Debit:0x007fdc9d24a140
10
+ [#<Balanced::Debit:0x007ff2bda070c8
11
11
  @attributes=
12
12
  {"amount"=>5000,
13
13
  "appears_on_statement_as"=>"BAL*Statement text",
14
- "created_at"=>"2014-01-27T22:57:05.511023Z",
14
+ "created_at"=>"2014-03-06T19:23:01.594300Z",
15
15
  "currency"=>"USD",
16
16
  "description"=>"Some descriptive text for the debit in the dashboard",
17
17
  "failure_reason"=>nil,
18
18
  "failure_reason_code"=>nil,
19
- "href"=>"/debits/WD2Fd3jVcMZEWyXHtG3U1LRM",
20
- "id"=>"WD2Fd3jVcMZEWyXHtG3U1LRM",
19
+ "href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
20
+ "id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
21
21
  "links"=>
22
22
  {"customer"=>nil,
23
23
  "dispute"=>nil,
24
24
  "order"=>nil,
25
- "source"=>"CC2uc8iPDjgyxOXHVtnZloyI"},
25
+ "source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
26
26
  "meta"=>{},
27
27
  "status"=>"succeeded",
28
- "transaction_number"=>"W906-153-1439",
29
- "updated_at"=>"2014-01-27T22:57:10.153696Z"},
28
+ "transaction_number"=>"W986-715-3969",
29
+ "updated_at"=>"2014-03-06T19:23:02.987552Z"},
30
30
  @hyperlinks=
31
31
  {"customer"=>
32
- #<Proc:0x007fdc9d248f70/lib/balanced/utils.rb:6 (lambda)>,
32
+ #<Proc:0x007ff2bda05c50/lib/balanced/utils.rb:6 (lambda)>,
33
33
  "dispute"=>
34
- #<Proc:0x007fdc9d240410/lib/balanced/utils.rb:6 (lambda)>,
34
+ #<Proc:0x007ff2bda04828/lib/balanced/utils.rb:6 (lambda)>,
35
35
  "events"=>
36
- #<Proc:0x007fdc9d242058/lib/balanced/utils.rb:6 (lambda)>,
36
+ #<Proc:0x007ff2bc140698/lib/balanced/utils.rb:6 (lambda)>,
37
37
  "order"=>
38
- #<Proc:0x007fdc9d2413d8/lib/balanced/utils.rb:6 (lambda)>,
38
+ #<Proc:0x007ff2bc13bda0/lib/balanced/utils.rb:6 (lambda)>,
39
39
  "refunds"=>
40
- #<Proc:0x007fdc9d23bb68/lib/balanced/utils.rb:6 (lambda)>,
40
+ #<Proc:0x007ff2bc131a58/lib/balanced/utils.rb:6 (lambda)>,
41
41
  "source"=>
42
- #<Proc:0x007fdc9d2391d8/lib/balanced/resources/resource.rb:60 (lambda)>}>,
43
- #<Balanced::Debit:0x007fdc9d239188
42
+ #<Proc:0x007ff2bc131eb8/lib/balanced/resources/resource.rb:60 (lambda)>}>,
43
+ #<Balanced::Debit:0x007ff2bc131e40
44
44
  @attributes=
45
45
  {"amount"=>5000,
46
46
  "appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
47
- "created_at"=>"2014-01-27T22:56:45.623268Z",
47
+ "created_at"=>"2014-03-06T19:22:49.584629Z",
48
48
  "currency"=>"USD",
49
49
  "description"=>"Some descriptive text for the debit in the dashboard",
50
50
  "failure_reason"=>nil,
51
51
  "failure_reason_code"=>nil,
52
- "href"=>"/debits/WD2iSCukjXyeRdkvX3cW0PmC",
53
- "id"=>"WD2iSCukjXyeRdkvX3cW0PmC",
52
+ "href"=>"/debits/WD5Co9XwRZJg1QtvC5QeekhX",
53
+ "id"=>"WD5Co9XwRZJg1QtvC5QeekhX",
54
54
  "links"=>
55
- {"customer"=>"CU1f8Ygc4t0F2FKNcw235x9I",
55
+ {"customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
56
56
  "dispute"=>nil,
57
57
  "order"=>nil,
58
- "source"=>"CC2abDOQVm5aNFhHpcRvWS02"},
58
+ "source"=>"CC5nCSU0yFp3qxR4p6UZST7y"},
59
59
  "meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
60
60
  "status"=>"succeeded",
61
- "transaction_number"=>"W744-719-1832",
62
- "updated_at"=>"2014-01-27T22:56:47.926021Z"},
61
+ "transaction_number"=>"W493-697-4873",
62
+ "updated_at"=>"2014-03-06T19:22:50.608819Z"},
63
63
  @hyperlinks=
64
64
  {"customer"=>
65
- #<Proc:0x007fdc9d233120/lib/balanced/resources/resource.rb:60 (lambda)>,
65
+ #<Proc:0x007ff2bd9fe4c8/lib/balanced/resources/resource.rb:60 (lambda)>,
66
66
  "dispute"=>
67
- #<Proc:0x007fdc9d231a00/lib/balanced/utils.rb:6 (lambda)>,
67
+ #<Proc:0x007ff2bd9fc970/lib/balanced/utils.rb:6 (lambda)>,
68
68
  "events"=>
69
- #<Proc:0x007fdc9d22b380/lib/balanced/utils.rb:6 (lambda)>,
69
+ #<Proc:0x007ff2bc12a280/lib/balanced/utils.rb:6 (lambda)>,
70
70
  "order"=>
71
- #<Proc:0x007fdc9d22a930/lib/balanced/utils.rb:6 (lambda)>,
71
+ #<Proc:0x007ff2bc8aedf8/lib/balanced/utils.rb:6 (lambda)>,
72
72
  "refunds"=>
73
- #<Proc:0x007fdc9d222488/lib/balanced/utils.rb:6 (lambda)>,
73
+ #<Proc:0x007ff2bd9e6058/lib/balanced/utils.rb:6 (lambda)>,
74
74
  "source"=>
75
- #<Proc:0x007fdc9d222550/lib/balanced/resources/resource.rb:60 (lambda)>}>]
75
+ #<Proc:0x007ff2bd9dd778/lib/balanced/resources/resource.rb:60 (lambda)>}>]
76
76
 
77
77
  % endif
@@ -3,43 +3,43 @@ Balanced::Debit.fetch
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- debit = Balanced::Debit.fetch('/debits/WD2Fd3jVcMZEWyXHtG3U1LRM')
8
+ debit = Balanced::Debit.fetch('/debits/WD5PTwr2bwJLIyJio1pEpYBr')
9
9
 
10
10
  % elif mode == 'response':
11
- #<Balanced::Debit:0x007fdc9d1e3058
11
+ #<Balanced::Debit:0x007ff2bd9a5e18
12
12
  @attributes=
13
13
  {"amount"=>5000,
14
14
  "appears_on_statement_as"=>"BAL*Statement text",
15
- "created_at"=>"2014-01-27T22:57:05.511023Z",
15
+ "created_at"=>"2014-03-06T19:23:01.594300Z",
16
16
  "currency"=>"USD",
17
17
  "description"=>"Some descriptive text for the debit in the dashboard",
18
18
  "failure_reason"=>nil,
19
19
  "failure_reason_code"=>nil,
20
- "href"=>"/debits/WD2Fd3jVcMZEWyXHtG3U1LRM",
21
- "id"=>"WD2Fd3jVcMZEWyXHtG3U1LRM",
20
+ "href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
21
+ "id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
22
22
  "links"=>
23
23
  {"customer"=>nil,
24
24
  "dispute"=>nil,
25
25
  "order"=>nil,
26
- "source"=>"CC2uc8iPDjgyxOXHVtnZloyI"},
26
+ "source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
27
27
  "meta"=>{},
28
28
  "status"=>"succeeded",
29
- "transaction_number"=>"W906-153-1439",
30
- "updated_at"=>"2014-01-27T22:57:10.153696Z"},
29
+ "transaction_number"=>"W986-715-3969",
30
+ "updated_at"=>"2014-03-06T19:23:02.987552Z"},
31
31
  @hyperlinks=
32
32
  {"customer"=>
33
- #<Proc:0x007fdc9d1e1e10/lib/balanced/utils.rb:6 (lambda)>,
33
+ #<Proc:0x007ff2bd9a4bd0/lib/balanced/utils.rb:6 (lambda)>,
34
34
  "dispute"=>
35
- #<Proc:0x007fdc9d1e1320/lib/balanced/utils.rb:6 (lambda)>,
35
+ #<Proc:0x007ff2bd9a4040/lib/balanced/utils.rb:6 (lambda)>,
36
36
  "events"=>
37
- #<Proc:0x007fdc9d1db8d0/lib/balanced/utils.rb:6 (lambda)>,
37
+ #<Proc:0x007ff2bd99e758/lib/balanced/utils.rb:6 (lambda)>,
38
38
  "order"=>
39
- #<Proc:0x007fdc9d1dac28/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007ff2bd99d290/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "refunds"=>
41
- #<Proc:0x007fdc9d1d8770/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007ff2bd98b7c0/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "source"=>
43
- #<Proc:0x007fdc9d1d2e88/lib/balanced/resources/resource.rb:60 (lambda)>}>
43
+ #<Proc:0x007ff2bd988958/lib/balanced/resources/resource.rb:60 (lambda)>}>
44
44
 
45
45
  % endif
@@ -3,9 +3,9 @@ Balanced::Debit.save
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
- debit = Balanced::Debit.fetch('/debits/WD2Fd3jVcMZEWyXHtG3U1LRM')
8
+ debit = Balanced::Debit.fetch('/debits/WD5PTwr2bwJLIyJio1pEpYBr')
9
9
  debit.description = 'New description for debit'
10
10
  debit.meta = {
11
11
  'anykey' => 'valuegoeshere',
@@ -14,38 +14,38 @@ debit.meta = {
14
14
  debit.save
15
15
 
16
16
  % elif mode == 'response':
17
- #<Balanced::Debit:0x007fdc9d1b2750
17
+ #<Balanced::Debit:0x007ff2bd962960
18
18
  @attributes=
19
19
  {"amount"=>5000,
20
20
  "appears_on_statement_as"=>"BAL*Statement text",
21
- "created_at"=>"2014-01-27T22:57:05.511023Z",
21
+ "created_at"=>"2014-03-06T19:23:01.594300Z",
22
22
  "currency"=>"USD",
23
23
  "description"=>"New description for debit",
24
24
  "failure_reason"=>nil,
25
25
  "failure_reason_code"=>nil,
26
- "href"=>"/debits/WD2Fd3jVcMZEWyXHtG3U1LRM",
27
- "id"=>"WD2Fd3jVcMZEWyXHtG3U1LRM",
26
+ "href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
27
+ "id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
28
28
  "links"=>
29
29
  {"customer"=>nil,
30
30
  "dispute"=>nil,
31
31
  "order"=>nil,
32
- "source"=>"CC2uc8iPDjgyxOXHVtnZloyI"},
32
+ "source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
33
33
  "meta"=>{"anykey"=>"valuegoeshere", "facebook.id"=>"1234567890"},
34
34
  "status"=>"succeeded",
35
- "transaction_number"=>"W906-153-1439",
36
- "updated_at"=>"2014-01-27T22:57:53.776191Z"},
35
+ "transaction_number"=>"W986-715-3969",
36
+ "updated_at"=>"2014-03-06T19:23:33.383170Z"},
37
37
  @hyperlinks=
38
38
  {"customer"=>
39
- #<Proc:0x007fdc9d1b1800/lib/balanced/utils.rb:6 (lambda)>,
39
+ #<Proc:0x007ff2bd961678/lib/balanced/utils.rb:6 (lambda)>,
40
40
  "dispute"=>
41
- #<Proc:0x007fdc9d1b0dd8/lib/balanced/utils.rb:6 (lambda)>,
41
+ #<Proc:0x007ff2bd9608e0/lib/balanced/utils.rb:6 (lambda)>,
42
42
  "events"=>
43
- #<Proc:0x007fdc9d1ab478/lib/balanced/utils.rb:6 (lambda)>,
43
+ #<Proc:0x007ff2bd95ad50/lib/balanced/utils.rb:6 (lambda)>,
44
44
  "order"=>
45
- #<Proc:0x007fdc9d1aa938/lib/balanced/utils.rb:6 (lambda)>,
45
+ #<Proc:0x007ff2bd95a030/lib/balanced/utils.rb:6 (lambda)>,
46
46
  "refunds"=>
47
- #<Proc:0x007fdc9d1a85c0/lib/balanced/utils.rb:6 (lambda)>,
47
+ #<Proc:0x007ff2bd9534d8/lib/balanced/utils.rb:6 (lambda)>,
48
48
  "source"=>
49
- #<Proc:0x007fdc9d1a3228/lib/balanced/resources/resource.rb:60 (lambda)>}>
49
+ #<Proc:0x007ff2bd951d90/lib/balanced/resources/resource.rb:60 (lambda)>}>
50
50
 
51
51
  % endif
@@ -3,38 +3,38 @@ Balanced::Event.all
3
3
 
4
4
  % elif mode == 'request':
5
5
  require 'balanced'
6
- Balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyc')
6
+ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
7
7
 
8
8
  events = Balanced::Event.all
9
9
  % elif mode == 'response':
10
- [#<Balanced::Event:0x007fdc9d1787a8
10
+ [#<Balanced::Event:0x007ff2bd8c3798
11
11
  @attributes=
12
12
  {"callback_statuses"=>
13
13
  {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
14
14
  "entity"=>
15
15
  {"customers"=>
16
16
  [{"address"=>
17
- {"city"=>nil,
18
- "country_code"=>nil,
17
+ {"city"=>"Nowhere",
18
+ "country_code"=>"USA",
19
19
  "line1"=>nil,
20
20
  "line2"=>nil,
21
- "postal_code"=>nil,
21
+ "postal_code"=>"90210",
22
22
  "state"=>nil},
23
23
  "business_name"=>nil,
24
- "created_at"=>"2014-01-27T22:55:50.253066Z",
25
- "dob_month"=>nil,
26
- "dob_year"=>nil,
24
+ "created_at"=>"2014-03-06T19:22:12.312268Z",
25
+ "dob_month"=>2,
26
+ "dob_year"=>1947,
27
27
  "ein"=>nil,
28
- "email"=>nil,
29
- "href"=>"/customers/CU1iDnBalzHoZg47Np92rNrV",
30
- "id"=>"CU1iDnBalzHoZg47Np92rNrV",
28
+ "email"=>"whc@example.org",
29
+ "href"=>"/customers/CU4Wt8xSbREzV2NWtdVAFGeR",
30
+ "id"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
31
31
  "links"=>{"destination"=>nil, "source"=>nil},
32
- "merchant_status"=>"no-match",
32
+ "merchant_status"=>"underwritten",
33
33
  "meta"=>{},
34
- "name"=>nil,
35
- "phone"=>nil,
36
- "ssn_last4"=>nil,
37
- "updated_at"=>"2014-01-27T22:55:50.767858Z"}],
34
+ "name"=>"William Henry Cavendish III",
35
+ "phone"=>"+16505551212",
36
+ "ssn_last4"=>"xxxx",
37
+ "updated_at"=>"2014-03-06T19:22:12.718847Z"}],
38
38
  "links"=>
39
39
  {"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
40
40
  "customers.card_holds"=>"/customers/{customers.id}/card_holds",
@@ -42,18 +42,65 @@ events = Balanced::Event.all
42
42
  "customers.credits"=>"/customers/{customers.id}/credits",
43
43
  "customers.debits"=>"/customers/{customers.id}/debits",
44
44
  "customers.destination"=>"/resources/{customers.destination}",
45
+ "customers.external_accounts"=>
46
+ "/customers/{customers.id}/external_accounts",
45
47
  "customers.orders"=>"/customers/{customers.id}/orders",
46
48
  "customers.refunds"=>"/customers/{customers.id}/refunds",
47
49
  "customers.reversals"=>"/customers/{customers.id}/reversals",
48
50
  "customers.source"=>"/resources/{customers.source}",
49
51
  "customers.transactions"=>"/customers/{customers.id}/transactions"}},
50
- "href"=>"/events/EV2abbb98487a611e3a86f026ba7d31e6f",
51
- "id"=>"EV2abbb98487a611e3a86f026ba7d31e6f",
52
+ "href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
53
+ "id"=>"EVa26caeeea56411e3838802219cc35fd9",
52
54
  "links"=>{},
53
- "occurred_at"=>"2014-01-27T22:55:50.767000Z",
55
+ "occurred_at"=>"2014-03-06T19:22:12.718000Z",
54
56
  "type"=>"account.created"},
55
57
  @hyperlinks=
56
58
  {"callbacks"=>
57
- #<Proc:0x007fdc9d17a968/lib/balanced/utils.rb:6 (lambda)>}>]
59
+ #<Proc:0x007ff2bd8bb7f0/lib/balanced/utils.rb:6 (lambda)>}>,
60
+ #<Balanced::Event:0x007ff2bd8bbde0
61
+ @attributes=
62
+ {"callback_statuses"=>
63
+ {"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
64
+ "entity"=>
65
+ {"bank_accounts"=>
66
+ [{"account_number"=>"xxxxxxxxxxx5555",
67
+ "account_type"=>"CHECKING",
68
+ "address"=>
69
+ {"city"=>nil,
70
+ "country_code"=>nil,
71
+ "line1"=>nil,
72
+ "line2"=>nil,
73
+ "postal_code"=>nil,
74
+ "state"=>nil},
75
+ "bank_name"=>"WELLS FARGO BANK NA",
76
+ "can_credit"=>true,
77
+ "can_debit"=>true,
78
+ "created_at"=>"2014-03-06T19:22:12.982029Z",
79
+ "fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
80
+ "href"=>"/bank_accounts/BA4WYHt1wCRMAJGm6k0BDaeR",
81
+ "id"=>"BA4WYHt1wCRMAJGm6k0BDaeR",
82
+ "links"=>
83
+ {"bank_account_verification"=>nil,
84
+ "customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR"},
85
+ "meta"=>{},
86
+ "name"=>"TEST-MERCHANT-BANK-ACCOUNT",
87
+ "routing_number"=>"121042882",
88
+ "updated_at"=>"2014-03-06T19:22:12.982032Z"}],
89
+ "links"=>
90
+ {"bank_accounts.bank_account_verification"=>
91
+ "/verifications/{bank_accounts.bank_account_verification}",
92
+ "bank_accounts.bank_account_verifications"=>
93
+ "/bank_accounts/{bank_accounts.id}/verifications",
94
+ "bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
95
+ "bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
96
+ "bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
97
+ "href"=>"/events/EVa2d381faa56411e3838802219cc35fd9",
98
+ "id"=>"EVa2d381faa56411e3838802219cc35fd9",
99
+ "links"=>{},
100
+ "occurred_at"=>"2014-03-06T19:22:12.982000Z",
101
+ "type"=>"bank_account.created"},
102
+ @hyperlinks=
103
+ {"callbacks"=>
104
+ #<Proc:0x007ff2bd8b0f30/lib/balanced/utils.rb:6 (lambda)>}>]
58
105
 
59
106
  % endif