balanced 1.0.beta1 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/LICENSE +2 -2
- data/balanced.gemspec +1 -1
- data/lib/balanced/resources.rb +1 -0
- data/lib/balanced/resources/customer.rb +0 -14
- data/lib/balanced/resources/dispute.rb +12 -0
- data/lib/balanced/version.rb +1 -1
- data/scenario.cache +142 -141
- data/scenarios/api_key_create/ruby.mako +6 -6
- data/scenarios/api_key_delete/ruby.mako +2 -2
- data/scenarios/api_key_list/ruby.mako +10 -10
- data/scenarios/api_key_show/ruby.mako +6 -6
- data/scenarios/bank_account_associate_to_customer/ruby.mako +13 -13
- data/scenarios/bank_account_create/ruby.mako +13 -13
- data/scenarios/bank_account_credit/ruby.mako +15 -15
- data/scenarios/bank_account_debit/ruby.mako +15 -15
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +22 -22
- data/scenarios/bank_account_show/ruby.mako +12 -12
- data/scenarios/bank_account_update/ruby.mako +12 -12
- data/scenarios/bank_account_verification_create/ruby.mako +9 -9
- data/scenarios/bank_account_verification_show/ruby.mako +9 -9
- data/scenarios/bank_account_verification_update/ruby.mako +9 -9
- data/scenarios/callback_create/ruby.mako +5 -4
- data/scenarios/callback_delete/ruby.mako +2 -2
- data/scenarios/callback_list/ruby.mako +4 -4
- data/scenarios/callback_show/ruby.mako +5 -5
- data/scenarios/card_associate_to_customer/ruby.mako +15 -15
- data/scenarios/card_create/ruby.mako +14 -14
- data/scenarios/card_debit/ruby.mako +16 -16
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +16 -16
- data/scenarios/card_hold_create/ruby.mako +16 -14
- data/scenarios/card_hold_list/ruby.mako +29 -25
- data/scenarios/card_hold_show/ruby.mako +16 -14
- data/scenarios/card_hold_update/ruby.mako +16 -14
- data/scenarios/card_hold_void/ruby.mako +16 -14
- data/scenarios/card_list/ruby.mako +24 -24
- data/scenarios/card_show/ruby.mako +13 -13
- data/scenarios/card_update/ruby.mako +13 -13
- data/scenarios/credit_list/ruby.mako +14 -14
- data/scenarios/credit_list_bank_account/ruby.mako +2 -2
- data/scenarios/credit_show/ruby.mako +15 -15
- data/scenarios/credit_update/ruby.mako +15 -15
- data/scenarios/customer_create/ruby.mako +19 -17
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +37 -33
- data/scenarios/customer_show/ruby.mako +20 -18
- data/scenarios/customer_update/ruby.mako +20 -18
- data/scenarios/debit_list/ruby.mako +28 -28
- data/scenarios/debit_show/ruby.mako +15 -15
- data/scenarios/debit_update/ruby.mako +15 -15
- data/scenarios/event_list/ruby.mako +67 -20
- data/scenarios/event_show/ruby.mako +23 -21
- data/scenarios/order_create/ruby.mako +14 -14
- data/scenarios/order_list/ruby.mako +13 -13
- data/scenarios/order_show/ruby.mako +14 -14
- data/scenarios/order_update/ruby.mako +14 -14
- data/scenarios/refund_create/ruby.mako +13 -13
- data/scenarios/refund_list/ruby.mako +12 -12
- data/scenarios/refund_show/ruby.mako +13 -13
- data/scenarios/refund_update/ruby.mako +13 -13
- data/scenarios/render_mako.rb +0 -1
- data/scenarios/reversal_create/ruby.mako +12 -12
- data/scenarios/reversal_list/ruby.mako +11 -11
- data/scenarios/reversal_show/ruby.mako +12 -12
- data/scenarios/reversal_update/ruby.mako +12 -12
- data/spec/balanced/resources/bank_account_spec.rb +0 -3
- data/spec/balanced/resources/debit_spec.rb +0 -13
- data/spec/balanced/resources/dispute_spec.rb +65 -0
- metadata +20 -18
- 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-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
customer = Balanced::Customer.fetch('/customers/
|
8
|
+
customer = Balanced::Customer.fetch('/customers/CU5YopHN07Ul5XQnILUifeQT')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Customer:
|
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-
|
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/
|
26
|
-
"id"=>"
|
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-
|
33
|
+
"updated_at"=>"2014-03-06T19:23:16.724050Z"},
|
34
34
|
@hyperlinks=
|
35
35
|
{"bank_accounts"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007ff2bdafb858/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"card_holds"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bdaf81d0/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"cards"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bc93c928/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"credits"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007ff2bc932428/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"debits"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007ff2bc92b588/lib/balanced/utils.rb:6 (lambda)>,
|
45
45
|
"destination"=>
|
46
|
-
#<Proc:
|
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:
|
50
|
+
#<Proc:0x007ff2bc921b78/lib/balanced/utils.rb:6 (lambda)>,
|
49
51
|
"refunds"=>
|
50
|
-
#<Proc:
|
52
|
+
#<Proc:0x007ff2bc913be0/lib/balanced/utils.rb:6 (lambda)>,
|
51
53
|
"reversals"=>
|
52
|
-
#<Proc:
|
54
|
+
#<Proc:0x007ff2bc9113b8/lib/balanced/utils.rb:6 (lambda)>,
|
53
55
|
"source"=>
|
54
|
-
#<Proc:
|
56
|
+
#<Proc:0x007ff2bc9105d0/lib/balanced/utils.rb:6 (lambda)>,
|
55
57
|
"transactions"=>
|
56
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
customer = Balanced::Customer.fetch('/customers/
|
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:
|
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-
|
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/
|
32
|
-
"id"=>"
|
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-
|
39
|
+
"updated_at"=>"2014-03-06T19:23:20.140160Z"},
|
40
40
|
@hyperlinks=
|
41
41
|
{"bank_accounts"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007ff2bdabe8e0/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"card_holds"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007ff2bdab78b0/lib/balanced/utils.rb:6 (lambda)>,
|
45
45
|
"cards"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007ff2bdaafd40/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"credits"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007ff2bdaad658/lib/balanced/utils.rb:6 (lambda)>,
|
49
49
|
"debits"=>
|
50
|
-
#<Proc:
|
50
|
+
#<Proc:0x007ff2bdaa7370/lib/balanced/utils.rb:6 (lambda)>,
|
51
51
|
"destination"=>
|
52
|
-
#<Proc:
|
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:
|
56
|
+
#<Proc:0x007ff2bda9da78/lib/balanced/utils.rb:6 (lambda)>,
|
55
57
|
"refunds"=>
|
56
|
-
#<Proc:
|
58
|
+
#<Proc:0x007ff2bda940b8/lib/balanced/utils.rb:6 (lambda)>,
|
57
59
|
"reversals"=>
|
58
|
-
#<Proc:
|
60
|
+
#<Proc:0x007ff2bc8ccd30/lib/balanced/utils.rb:6 (lambda)>,
|
59
61
|
"source"=>
|
60
|
-
#<Proc:
|
62
|
+
#<Proc:0x007ff2bc8c5440/lib/balanced/utils.rb:6 (lambda)>,
|
61
63
|
"transactions"=>
|
62
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
8
|
debits = Balanced::Debit.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Debit:
|
10
|
+
[#<Balanced::Debit:0x007ff2bda070c8
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
13
|
"appears_on_statement_as"=>"BAL*Statement text",
|
14
|
-
"created_at"=>"2014-
|
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/
|
20
|
-
"id"=>"
|
19
|
+
"href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
|
20
|
+
"id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
|
21
21
|
"links"=>
|
22
22
|
{"customer"=>nil,
|
23
23
|
"dispute"=>nil,
|
24
24
|
"order"=>nil,
|
25
|
-
"source"=>"
|
25
|
+
"source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
|
26
26
|
"meta"=>{},
|
27
27
|
"status"=>"succeeded",
|
28
|
-
"transaction_number"=>"
|
29
|
-
"updated_at"=>"2014-
|
28
|
+
"transaction_number"=>"W986-715-3969",
|
29
|
+
"updated_at"=>"2014-03-06T19:23:02.987552Z"},
|
30
30
|
@hyperlinks=
|
31
31
|
{"customer"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007ff2bda05c50/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"dispute"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007ff2bda04828/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007ff2bc140698/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"order"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bc13bda0/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"refunds"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bc131a58/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"source"=>
|
42
|
-
#<Proc:
|
43
|
-
#<Balanced::Debit:
|
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-
|
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/
|
53
|
-
"id"=>"
|
52
|
+
"href"=>"/debits/WD5Co9XwRZJg1QtvC5QeekhX",
|
53
|
+
"id"=>"WD5Co9XwRZJg1QtvC5QeekhX",
|
54
54
|
"links"=>
|
55
|
-
{"customer"=>"
|
55
|
+
{"customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
|
56
56
|
"dispute"=>nil,
|
57
57
|
"order"=>nil,
|
58
|
-
"source"=>"
|
58
|
+
"source"=>"CC5nCSU0yFp3qxR4p6UZST7y"},
|
59
59
|
"meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
|
60
60
|
"status"=>"succeeded",
|
61
|
-
"transaction_number"=>"
|
62
|
-
"updated_at"=>"2014-
|
61
|
+
"transaction_number"=>"W493-697-4873",
|
62
|
+
"updated_at"=>"2014-03-06T19:22:50.608819Z"},
|
63
63
|
@hyperlinks=
|
64
64
|
{"customer"=>
|
65
|
-
#<Proc:
|
65
|
+
#<Proc:0x007ff2bd9fe4c8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
66
66
|
"dispute"=>
|
67
|
-
#<Proc:
|
67
|
+
#<Proc:0x007ff2bd9fc970/lib/balanced/utils.rb:6 (lambda)>,
|
68
68
|
"events"=>
|
69
|
-
#<Proc:
|
69
|
+
#<Proc:0x007ff2bc12a280/lib/balanced/utils.rb:6 (lambda)>,
|
70
70
|
"order"=>
|
71
|
-
#<Proc:
|
71
|
+
#<Proc:0x007ff2bc8aedf8/lib/balanced/utils.rb:6 (lambda)>,
|
72
72
|
"refunds"=>
|
73
|
-
#<Proc:
|
73
|
+
#<Proc:0x007ff2bd9e6058/lib/balanced/utils.rb:6 (lambda)>,
|
74
74
|
"source"=>
|
75
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
debit = Balanced::Debit.fetch('/debits/
|
8
|
+
debit = Balanced::Debit.fetch('/debits/WD5PTwr2bwJLIyJio1pEpYBr')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Debit:
|
11
|
+
#<Balanced::Debit:0x007ff2bd9a5e18
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
14
|
"appears_on_statement_as"=>"BAL*Statement text",
|
15
|
-
"created_at"=>"2014-
|
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/
|
21
|
-
"id"=>"
|
20
|
+
"href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
|
21
|
+
"id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
|
22
22
|
"links"=>
|
23
23
|
{"customer"=>nil,
|
24
24
|
"dispute"=>nil,
|
25
25
|
"order"=>nil,
|
26
|
-
"source"=>"
|
26
|
+
"source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
|
27
27
|
"meta"=>{},
|
28
28
|
"status"=>"succeeded",
|
29
|
-
"transaction_number"=>"
|
30
|
-
"updated_at"=>"2014-
|
29
|
+
"transaction_number"=>"W986-715-3969",
|
30
|
+
"updated_at"=>"2014-03-06T19:23:02.987552Z"},
|
31
31
|
@hyperlinks=
|
32
32
|
{"customer"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007ff2bd9a4bd0/lib/balanced/utils.rb:6 (lambda)>,
|
34
34
|
"dispute"=>
|
35
|
-
#<Proc:
|
35
|
+
#<Proc:0x007ff2bd9a4040/lib/balanced/utils.rb:6 (lambda)>,
|
36
36
|
"events"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007ff2bd99e758/lib/balanced/utils.rb:6 (lambda)>,
|
38
38
|
"order"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007ff2bd99d290/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"refunds"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007ff2bd98b7c0/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"source"=>
|
43
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
debit = Balanced::Debit.fetch('/debits/
|
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:
|
17
|
+
#<Balanced::Debit:0x007ff2bd962960
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>5000,
|
20
20
|
"appears_on_statement_as"=>"BAL*Statement text",
|
21
|
-
"created_at"=>"2014-
|
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/
|
27
|
-
"id"=>"
|
26
|
+
"href"=>"/debits/WD5PTwr2bwJLIyJio1pEpYBr",
|
27
|
+
"id"=>"WD5PTwr2bwJLIyJio1pEpYBr",
|
28
28
|
"links"=>
|
29
29
|
{"customer"=>nil,
|
30
30
|
"dispute"=>nil,
|
31
31
|
"order"=>nil,
|
32
|
-
"source"=>"
|
32
|
+
"source"=>"CC5Buki6e4Kg4bDVZ3OSfQ8O"},
|
33
33
|
"meta"=>{"anykey"=>"valuegoeshere", "facebook.id"=>"1234567890"},
|
34
34
|
"status"=>"succeeded",
|
35
|
-
"transaction_number"=>"
|
36
|
-
"updated_at"=>"2014-
|
35
|
+
"transaction_number"=>"W986-715-3969",
|
36
|
+
"updated_at"=>"2014-03-06T19:23:33.383170Z"},
|
37
37
|
@hyperlinks=
|
38
38
|
{"customer"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007ff2bd961678/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"dispute"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007ff2bd9608e0/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"events"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007ff2bd95ad50/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"order"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007ff2bd95a030/lib/balanced/utils.rb:6 (lambda)>,
|
46
46
|
"refunds"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007ff2bd9534d8/lib/balanced/utils.rb:6 (lambda)>,
|
48
48
|
"source"=>
|
49
|
-
#<Proc:
|
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-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
8
|
events = Balanced::Event.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Event:
|
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"=>
|
18
|
-
"country_code"=>
|
17
|
+
{"city"=>"Nowhere",
|
18
|
+
"country_code"=>"USA",
|
19
19
|
"line1"=>nil,
|
20
20
|
"line2"=>nil,
|
21
|
-
"postal_code"=>
|
21
|
+
"postal_code"=>"90210",
|
22
22
|
"state"=>nil},
|
23
23
|
"business_name"=>nil,
|
24
|
-
"created_at"=>"2014-
|
25
|
-
"dob_month"=>
|
26
|
-
"dob_year"=>
|
24
|
+
"created_at"=>"2014-03-06T19:22:12.312268Z",
|
25
|
+
"dob_month"=>2,
|
26
|
+
"dob_year"=>1947,
|
27
27
|
"ein"=>nil,
|
28
|
-
"email"=>
|
29
|
-
"href"=>"/customers/
|
30
|
-
"id"=>"
|
28
|
+
"email"=>"whc@example.org",
|
29
|
+
"href"=>"/customers/CU4Wt8xSbREzV2NWtdVAFGeR",
|
30
|
+
"id"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
|
31
31
|
"links"=>{"destination"=>nil, "source"=>nil},
|
32
|
-
"merchant_status"=>"
|
32
|
+
"merchant_status"=>"underwritten",
|
33
33
|
"meta"=>{},
|
34
|
-
"name"=>
|
35
|
-
"phone"=>
|
36
|
-
"ssn_last4"=>
|
37
|
-
"updated_at"=>"2014-
|
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/
|
51
|
-
"id"=>"
|
52
|
+
"href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
|
53
|
+
"id"=>"EVa26caeeea56411e3838802219cc35fd9",
|
52
54
|
"links"=>{},
|
53
|
-
"occurred_at"=>"2014-
|
55
|
+
"occurred_at"=>"2014-03-06T19:22:12.718000Z",
|
54
56
|
"type"=>"account.created"},
|
55
57
|
@hyperlinks=
|
56
58
|
{"callbacks"=>
|
57
|
-
#<Proc:
|
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
|