balanced 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +5 -0
- data/lib/balanced/resources/credit.rb +2 -7
- data/lib/balanced/resources/debit.rb +2 -7
- data/lib/balanced/resources/order.rb +10 -9
- data/lib/balanced/version.rb +1 -1
- 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/definition.rb +1 -1
- data/scenarios/bank_account_associate_to_customer/request.rb +2 -2
- data/scenarios/bank_account_associate_to_customer/ruby.mako +15 -15
- data/scenarios/bank_account_create/ruby.mako +11 -11
- 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 +4 -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/definition.rb +1 -1
- data/scenarios/card_associate_to_customer/request.rb +1 -1
- data/scenarios/card_associate_to_customer/ruby.mako +13 -14
- data/scenarios/card_create/ruby.mako +9 -9
- data/scenarios/card_create_dispute/definition.rb +1 -0
- data/scenarios/card_create_dispute/request.rb +4 -0
- data/scenarios/card_create_dispute/ruby.mako +53 -0
- data/scenarios/card_debit/ruby.mako +16 -16
- data/scenarios/card_debit_dispute/definition.rb +1 -0
- data/scenarios/card_debit_dispute/request.rb +5 -0
- data/scenarios/card_debit_dispute/ruby.mako +49 -0
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +16 -16
- data/scenarios/card_hold_create/ruby.mako +14 -14
- data/scenarios/card_hold_list/ruby.mako +25 -25
- data/scenarios/card_hold_show/ruby.mako +14 -14
- data/scenarios/card_hold_update/ruby.mako +14 -14
- data/scenarios/card_hold_void/definition.rb +1 -1
- data/scenarios/card_hold_void/request.rb +1 -1
- data/scenarios/card_hold_void/ruby.mako +17 -17
- data/scenarios/card_list/ruby.mako +18 -18
- data/scenarios/card_show/ruby.mako +10 -10
- data/scenarios/card_update/ruby.mako +10 -10
- 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 +18 -18
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +35 -35
- data/scenarios/customer_show/ruby.mako +19 -19
- data/scenarios/customer_update/ruby.mako +19 -19
- data/scenarios/debit_dispute_show/definition.rb +1 -0
- data/scenarios/debit_dispute_show/request.rb +3 -0
- data/scenarios/debit_dispute_show/ruby.mako +31 -0
- data/scenarios/debit_list/ruby.mako +29 -29
- data/scenarios/debit_show/ruby.mako +16 -16
- data/scenarios/debit_update/ruby.mako +16 -16
- data/scenarios/dispute_list/definition.rb +1 -0
- data/scenarios/dispute_list/request.rb +2 -0
- data/scenarios/dispute_list/ruby.mako +29 -0
- data/scenarios/dispute_show/definition.rb +1 -0
- data/scenarios/dispute_show/request.rb +2 -0
- data/scenarios/dispute_show/ruby.mako +31 -0
- data/scenarios/event_list/ruby.mako +55 -55
- data/scenarios/event_show/ruby.mako +35 -40
- 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 +15 -3
- 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/credit_spec.rb +26 -5
- data/spec/balanced/resources/debit_spec.rb +7 -2
- data/spec/balanced/resources/order_spec.rb +25 -3
- metadata +17 -3
- data/scenario.cache +0 -619
@@ -0,0 +1,31 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Debit.dispute
|
3
|
+
% elif mode == 'request':
|
4
|
+
require 'balanced'
|
5
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
|
+
|
7
|
+
debit = Balanced::Debit.fetch('/debits/WD4YCKAyFrQBFYuFCUCRynOx')
|
8
|
+
dispute = debit.dispute
|
9
|
+
|
10
|
+
% elif mode == 'response':
|
11
|
+
#<Balanced::Dispute:0x007fa93ebf4d68
|
12
|
+
@attributes=
|
13
|
+
{"amount"=>5000,
|
14
|
+
"created_at"=>"2014-04-25T20:18:33.022136Z",
|
15
|
+
"currency"=>"USD",
|
16
|
+
"href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
|
17
|
+
"id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
|
18
|
+
"initiated_at"=>"2014-04-25T20:10:26.554057Z",
|
19
|
+
"links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
|
20
|
+
"meta"=>{},
|
21
|
+
"reason"=>"fraud",
|
22
|
+
"respond_by"=>"2014-05-25T20:10:26.554061Z",
|
23
|
+
"status"=>"pending",
|
24
|
+
"updated_at"=>"2014-04-25T20:18:33.022139Z"},
|
25
|
+
@hyperlinks=
|
26
|
+
{"events"=>
|
27
|
+
#<Proc:0x007fa93ebfecc8/lib/balanced/utils.rb:6 (lambda)>,
|
28
|
+
"transaction"=>
|
29
|
+
#<Proc:0x007fa93ebfd328/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
30
|
+
|
31
|
+
% 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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
8
|
debits = Balanced::Debit.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Debit:
|
10
|
+
[#<Balanced::Debit:0x007fa93e9f7420
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
13
|
"appears_on_statement_as"=>"BAL*Statement text",
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-04-25T20:09:59.895549Z",
|
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/WD4vEUJj36IpPHTnLKMYzHgh",
|
20
|
+
"id"=>"WD4vEUJj36IpPHTnLKMYzHgh",
|
21
21
|
"links"=>
|
22
|
-
{"customer"=>
|
22
|
+
{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
|
23
23
|
"dispute"=>nil,
|
24
24
|
"order"=>nil,
|
25
|
-
"source"=>"
|
25
|
+
"source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
|
26
26
|
"meta"=>{},
|
27
27
|
"status"=>"succeeded",
|
28
|
-
"transaction_number"=>"
|
29
|
-
"updated_at"=>"2014-
|
28
|
+
"transaction_number"=>"W296-328-8320",
|
29
|
+
"updated_at"=>"2014-04-25T20:10:00.865462Z"},
|
30
30
|
@hyperlinks=
|
31
31
|
{"customer"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93e9f58a0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
33
33
|
"dispute"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93e9f4f18/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93ec1ed98/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"order"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93ec1e398/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"refunds"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93ec17bb0/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"source"=>
|
42
|
-
#<Proc:
|
43
|
-
#<Balanced::Debit:
|
42
|
+
#<Proc:0x007fa93ec16080/lib/balanced/resources/resource.rb:60 (lambda)>}>,
|
43
|
+
#<Balanced::Debit:0x007fa93ec15fb8
|
44
44
|
@attributes=
|
45
45
|
{"amount"=>5000,
|
46
46
|
"appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
|
47
|
-
"created_at"=>"2014-
|
47
|
+
"created_at"=>"2014-04-25T20:09:46.854710Z",
|
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/WD4gZDOJ1DB443FYcbwNN5EV",
|
53
|
+
"id"=>"WD4gZDOJ1DB443FYcbwNN5EV",
|
54
54
|
"links"=>
|
55
|
-
{"customer"=>"
|
55
|
+
{"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj",
|
56
56
|
"dispute"=>nil,
|
57
57
|
"order"=>nil,
|
58
|
-
"source"=>"
|
58
|
+
"source"=>"CC4auQXiAWMBxJcEUIMYeZFj"},
|
59
59
|
"meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
|
60
60
|
"status"=>"succeeded",
|
61
|
-
"transaction_number"=>"
|
62
|
-
"updated_at"=>"2014-
|
61
|
+
"transaction_number"=>"W815-967-5010",
|
62
|
+
"updated_at"=>"2014-04-25T20:09:47.351487Z"},
|
63
63
|
@hyperlinks=
|
64
64
|
{"customer"=>
|
65
|
-
#<Proc:
|
65
|
+
#<Proc:0x007fa93ec14348/lib/balanced/resources/resource.rb:60 (lambda)>,
|
66
66
|
"dispute"=>
|
67
|
-
#<Proc:
|
67
|
+
#<Proc:0x007fa93ec0f708/lib/balanced/utils.rb:6 (lambda)>,
|
68
68
|
"events"=>
|
69
|
-
#<Proc:
|
69
|
+
#<Proc:0x007fa93ec077b0/lib/balanced/utils.rb:6 (lambda)>,
|
70
70
|
"order"=>
|
71
|
-
#<Proc:
|
71
|
+
#<Proc:0x007fa93ec06dd8/lib/balanced/utils.rb:6 (lambda)>,
|
72
72
|
"refunds"=>
|
73
|
-
#<Proc:
|
73
|
+
#<Proc:0x007fa93ec04f10/lib/balanced/utils.rb:6 (lambda)>,
|
74
74
|
"source"=>
|
75
|
-
#<Proc:
|
75
|
+
#<Proc:0x007fa93ebdf558/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
debit = Balanced::Debit.fetch('/debits/
|
8
|
+
debit = Balanced::Debit.fetch('/debits/WD4vEUJj36IpPHTnLKMYzHgh')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Debit:
|
11
|
+
#<Balanced::Debit:0x007fa93eb35288
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
14
|
"appears_on_statement_as"=>"BAL*Statement text",
|
15
|
-
"created_at"=>"2014-
|
15
|
+
"created_at"=>"2014-04-25T20:09:59.895549Z",
|
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/WD4vEUJj36IpPHTnLKMYzHgh",
|
21
|
+
"id"=>"WD4vEUJj36IpPHTnLKMYzHgh",
|
22
22
|
"links"=>
|
23
|
-
{"customer"=>
|
23
|
+
{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
|
24
24
|
"dispute"=>nil,
|
25
25
|
"order"=>nil,
|
26
|
-
"source"=>"
|
26
|
+
"source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
|
27
27
|
"meta"=>{},
|
28
28
|
"status"=>"succeeded",
|
29
|
-
"transaction_number"=>"
|
30
|
-
"updated_at"=>"2014-
|
29
|
+
"transaction_number"=>"W296-328-8320",
|
30
|
+
"updated_at"=>"2014-04-25T20:10:00.865462Z"},
|
31
31
|
@hyperlinks=
|
32
32
|
{"customer"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fa93eb276b0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
34
34
|
"dispute"=>
|
35
|
-
#<Proc:
|
35
|
+
#<Proc:0x007fa93eb26d28/lib/balanced/utils.rb:6 (lambda)>,
|
36
36
|
"events"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fa93eb24e88/lib/balanced/utils.rb:6 (lambda)>,
|
38
38
|
"order"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa93eb244b0/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"refunds"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa93eb1c0a8/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"source"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa93eb07ab8/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
debit = Balanced::Debit.fetch('/debits/
|
8
|
+
debit = Balanced::Debit.fetch('/debits/WD4vEUJj36IpPHTnLKMYzHgh')
|
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:0x007fa93eade398
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>5000,
|
20
20
|
"appears_on_statement_as"=>"BAL*Statement text",
|
21
|
-
"created_at"=>"2014-
|
21
|
+
"created_at"=>"2014-04-25T20:09:59.895549Z",
|
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/WD4vEUJj36IpPHTnLKMYzHgh",
|
27
|
+
"id"=>"WD4vEUJj36IpPHTnLKMYzHgh",
|
28
28
|
"links"=>
|
29
|
-
{"customer"=>
|
29
|
+
{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
|
30
30
|
"dispute"=>nil,
|
31
31
|
"order"=>nil,
|
32
|
-
"source"=>"
|
32
|
+
"source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
|
33
33
|
"meta"=>{"anykey"=>"valuegoeshere", "facebook.id"=>"1234567890"},
|
34
34
|
"status"=>"succeeded",
|
35
|
-
"transaction_number"=>"
|
36
|
-
"updated_at"=>"2014-
|
35
|
+
"transaction_number"=>"W296-328-8320",
|
36
|
+
"updated_at"=>"2014-04-25T20:10:19.169392Z"},
|
37
37
|
@hyperlinks=
|
38
38
|
{"customer"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa93eadc7c8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
40
40
|
"dispute"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa93ead7db8/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"events"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa93ead5ea0/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"order"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa93ead54a0/lib/balanced/utils.rb:6 (lambda)>,
|
46
46
|
"refunds"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fa93eacf438/lib/balanced/utils.rb:6 (lambda)>,
|
48
48
|
"source"=>
|
49
|
-
#<Proc:
|
49
|
+
#<Proc:0x007fa93eacda48/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
50
50
|
|
51
51
|
% endif
|
@@ -0,0 +1 @@
|
|
1
|
+
Balanced::Dispute.all
|
@@ -0,0 +1,29 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Dispute.all
|
3
|
+
% elif mode == 'request':
|
4
|
+
require 'balanced'
|
5
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
|
+
|
7
|
+
disputes = Balanced::Dispute.all
|
8
|
+
% elif mode == 'response':
|
9
|
+
[#<Balanced::Dispute:0x007fa93eaad108
|
10
|
+
@attributes=
|
11
|
+
{"amount"=>5000,
|
12
|
+
"created_at"=>"2014-04-25T20:18:33.022136Z",
|
13
|
+
"currency"=>"USD",
|
14
|
+
"href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
|
15
|
+
"id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
|
16
|
+
"initiated_at"=>"2014-04-25T20:10:26.554057Z",
|
17
|
+
"links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
|
18
|
+
"meta"=>{},
|
19
|
+
"reason"=>"fraud",
|
20
|
+
"respond_by"=>"2014-05-25T20:10:26.554061Z",
|
21
|
+
"status"=>"pending",
|
22
|
+
"updated_at"=>"2014-04-25T20:18:33.022139Z"},
|
23
|
+
@hyperlinks=
|
24
|
+
{"events"=>
|
25
|
+
#<Proc:0x007fa93eaa6f60/lib/balanced/utils.rb:6 (lambda)>,
|
26
|
+
"transaction"=>
|
27
|
+
#<Proc:0x007fa93eaa54d0/lib/balanced/resources/resource.rb:60 (lambda)>}>]
|
28
|
+
|
29
|
+
% endif
|
@@ -0,0 +1 @@
|
|
1
|
+
Balanced::Dispute.fetch
|
@@ -0,0 +1,31 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Dispute.fetch
|
3
|
+
|
4
|
+
% elif mode == 'request':
|
5
|
+
require 'balanced'
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
|
+
|
8
|
+
dispute = Balanced::Dispute.fetch('/disputes/DT61IA2iRqyYBLqUCJNt5XNV')
|
9
|
+
|
10
|
+
% elif mode == 'response':
|
11
|
+
#<Balanced::Dispute:0x007fa93ea8d948
|
12
|
+
@attributes=
|
13
|
+
{"amount"=>5000,
|
14
|
+
"created_at"=>"2014-04-25T20:18:33.022136Z",
|
15
|
+
"currency"=>"USD",
|
16
|
+
"href"=>"/disputes/DT61IA2iRqyYBLqUCJNt5XNV",
|
17
|
+
"id"=>"DT61IA2iRqyYBLqUCJNt5XNV",
|
18
|
+
"initiated_at"=>"2014-04-25T20:10:26.554057Z",
|
19
|
+
"links"=>{"transaction"=>"WD4YCKAyFrQBFYuFCUCRynOx"},
|
20
|
+
"meta"=>{},
|
21
|
+
"reason"=>"fraud",
|
22
|
+
"respond_by"=>"2014-05-25T20:10:26.554061Z",
|
23
|
+
"status"=>"pending",
|
24
|
+
"updated_at"=>"2014-04-25T20:18:33.022139Z"},
|
25
|
+
@hyperlinks=
|
26
|
+
{"events"=>
|
27
|
+
#<Proc:0x007fa93ea87458/lib/balanced/utils.rb:6 (lambda)>,
|
28
|
+
"transaction"=>
|
29
|
+
#<Proc:0x007fa93ea856f8/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
30
|
+
|
31
|
+
% endif
|
@@ -3,11 +3,56 @@ Balanced::Event.all
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
8
|
events = Balanced::Event.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Event:
|
10
|
+
[#<Balanced::Event:0x007fa93ea4f170
|
11
|
+
@attributes=
|
12
|
+
{"callback_statuses"=>
|
13
|
+
{"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
|
14
|
+
"entity"=>
|
15
|
+
{"bank_accounts"=>
|
16
|
+
[{"account_number"=>"xxxxxxxxxxx5555",
|
17
|
+
"account_type"=>"CHECKING",
|
18
|
+
"address"=>
|
19
|
+
{"city"=>nil,
|
20
|
+
"country_code"=>nil,
|
21
|
+
"line1"=>nil,
|
22
|
+
"line2"=>nil,
|
23
|
+
"postal_code"=>nil,
|
24
|
+
"state"=>nil},
|
25
|
+
"bank_name"=>"WELLS FARGO BANK NA",
|
26
|
+
"can_credit"=>true,
|
27
|
+
"can_debit"=>true,
|
28
|
+
"created_at"=>"2014-04-25T20:09:08.031387Z",
|
29
|
+
"fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
|
30
|
+
"href"=>"/bank_accounts/BA3z8ko53HDEFwxjmNlc998p",
|
31
|
+
"id"=>"BA3z8ko53HDEFwxjmNlc998p",
|
32
|
+
"links"=>
|
33
|
+
{"bank_account_verification"=>nil,
|
34
|
+
"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
|
35
|
+
"meta"=>{},
|
36
|
+
"name"=>"TEST-MERCHANT-BANK-ACCOUNT",
|
37
|
+
"routing_number"=>"121042882",
|
38
|
+
"updated_at"=>"2014-04-25T20:09:08.031391Z"}],
|
39
|
+
"links"=>
|
40
|
+
{"bank_accounts.bank_account_verification"=>
|
41
|
+
"/verifications/{bank_accounts.bank_account_verification}",
|
42
|
+
"bank_accounts.bank_account_verifications"=>
|
43
|
+
"/bank_accounts/{bank_accounts.id}/verifications",
|
44
|
+
"bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
|
45
|
+
"bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
|
46
|
+
"bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
|
47
|
+
"href"=>"/events/EV754ca810ccb511e3b6ef061e5f402045",
|
48
|
+
"id"=>"EV754ca810ccb511e3b6ef061e5f402045",
|
49
|
+
"links"=>{},
|
50
|
+
"occurred_at"=>"2014-04-25T20:09:08.031000Z",
|
51
|
+
"type"=>"bank_account.created"},
|
52
|
+
@hyperlinks=
|
53
|
+
{"callbacks"=>
|
54
|
+
#<Proc:0x007fa93ea4dd70/lib/balanced/utils.rb:6 (lambda)>}>,
|
55
|
+
#<Balanced::Event:0x007fa93ea4dd20
|
11
56
|
@attributes=
|
12
57
|
{"callback_statuses"=>
|
13
58
|
{"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
|
@@ -21,20 +66,20 @@ events = Balanced::Event.all
|
|
21
66
|
"postal_code"=>"90210",
|
22
67
|
"state"=>nil},
|
23
68
|
"business_name"=>nil,
|
24
|
-
"created_at"=>"2014-
|
69
|
+
"created_at"=>"2014-04-25T20:09:07.786846Z",
|
25
70
|
"dob_month"=>2,
|
26
71
|
"dob_year"=>1947,
|
27
72
|
"ein"=>nil,
|
28
73
|
"email"=>"whc@example.org",
|
29
|
-
"href"=>"/customers/
|
30
|
-
"id"=>"
|
74
|
+
"href"=>"/customers/CU3z3rwGWGazDwwyLy0rNqfj",
|
75
|
+
"id"=>"CU3z3rwGWGazDwwyLy0rNqfj",
|
31
76
|
"links"=>{"destination"=>nil, "source"=>nil},
|
32
77
|
"merchant_status"=>"underwritten",
|
33
78
|
"meta"=>{},
|
34
79
|
"name"=>"William Henry Cavendish III",
|
35
80
|
"phone"=>"+16505551212",
|
36
81
|
"ssn_last4"=>"xxxx",
|
37
|
-
"updated_at"=>"2014-
|
82
|
+
"updated_at"=>"2014-04-25T20:09:07.845324Z"}],
|
38
83
|
"links"=>
|
39
84
|
{"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
|
40
85
|
"customers.card_holds"=>"/customers/{customers.id}/card_holds",
|
@@ -49,58 +94,13 @@ events = Balanced::Event.all
|
|
49
94
|
"customers.reversals"=>"/customers/{customers.id}/reversals",
|
50
95
|
"customers.source"=>"/resources/{customers.source}",
|
51
96
|
"customers.transactions"=>"/customers/{customers.id}/transactions"}},
|
52
|
-
"href"=>"/events/
|
53
|
-
"id"=>"
|
97
|
+
"href"=>"/events/EV75268b80ccb511e3b6ef061e5f402045",
|
98
|
+
"id"=>"EV75268b80ccb511e3b6ef061e5f402045",
|
54
99
|
"links"=>{},
|
55
|
-
"occurred_at"=>"2014-
|
100
|
+
"occurred_at"=>"2014-04-25T20:09:07.845000Z",
|
56
101
|
"type"=>"account.created"},
|
57
102
|
@hyperlinks=
|
58
103
|
{"callbacks"=>
|
59
|
-
#<Proc:
|
60
|
-
#<Balanced::Event:0x007fa4e49e9068
|
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:0x007fa4e49e3938/lib/balanced/utils.rb:6 (lambda)>}>]
|
104
|
+
#<Proc:0x007fa93ea4c920/lib/balanced/utils.rb:6 (lambda)>}>]
|
105
105
|
|
106
106
|
% endif
|