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
@@ -3,7 +3,7 @@ Balanced::Card.new
|
|
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
|
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:
|
16
|
+
#<Balanced::Card:0x007fa93ea04be8
|
17
17
|
@attributes=
|
18
18
|
{"address"=>
|
19
19
|
{"city"=>nil,
|
@@ -26,7 +26,7 @@ card = Balanced::Card.new(
|
|
26
26
|
"avs_result"=>nil,
|
27
27
|
"avs_street_match"=>nil,
|
28
28
|
"brand"=>"MasterCard",
|
29
|
-
"created_at"=>"2014-
|
29
|
+
"created_at"=>"2014-04-25T20:09:57.984444Z",
|
30
30
|
"cvv"=>"xxx",
|
31
31
|
"cvv_match"=>"yes",
|
32
32
|
"cvv_result"=>"Match",
|
@@ -34,20 +34,20 @@ card = Balanced::Card.new(
|
|
34
34
|
"expiration_year"=>2020,
|
35
35
|
"fingerprint"=>
|
36
36
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
37
|
-
"href"=>"/cards/
|
38
|
-
"id"=>"
|
37
|
+
"href"=>"/cards/CC4tvKLTKXcBJAgkGvPEW58N",
|
38
|
+
"id"=>"CC4tvKLTKXcBJAgkGvPEW58N",
|
39
39
|
"is_verified"=>true,
|
40
40
|
"links"=>{"customer"=>nil},
|
41
41
|
"meta"=>{},
|
42
42
|
"name"=>nil,
|
43
43
|
"number"=>"xxxxxxxxxxxx5100",
|
44
|
-
"updated_at"=>"2014-
|
44
|
+
"updated_at"=>"2014-04-25T20:09:57.984446Z"},
|
45
45
|
@hyperlinks=
|
46
46
|
{"card_holds"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fa93e9fe568/lib/balanced/utils.rb:6 (lambda)>,
|
48
48
|
"customer"=>
|
49
|
-
#<Proc:
|
49
|
+
#<Proc:0x007fa93e9fd500/lib/balanced/utils.rb:6 (lambda)>,
|
50
50
|
"debits"=>
|
51
|
-
#<Proc:
|
51
|
+
#<Proc:0x007fa93e9cf678/lib/balanced/utils.rb:6 (lambda)>}>
|
52
52
|
|
53
53
|
% endif
|
@@ -0,0 +1 @@
|
|
1
|
+
Balanced::Card.new
|
@@ -0,0 +1,53 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Card.new
|
3
|
+
|
4
|
+
% elif mode == 'request':
|
5
|
+
require 'balanced'
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
|
+
|
8
|
+
card = Balanced::Card.new(
|
9
|
+
:cvv => '123',
|
10
|
+
:expiration_month => '12',
|
11
|
+
:expiration_year => '3000',
|
12
|
+
:number => '6500000000000002'
|
13
|
+
).save
|
14
|
+
|
15
|
+
% elif mode == 'response':
|
16
|
+
#<Balanced::Card:0x007fa93e98c9e0
|
17
|
+
@attributes=
|
18
|
+
{"address"=>
|
19
|
+
{"city"=>nil,
|
20
|
+
"country_code"=>nil,
|
21
|
+
"line1"=>nil,
|
22
|
+
"line2"=>nil,
|
23
|
+
"postal_code"=>nil,
|
24
|
+
"state"=>nil},
|
25
|
+
"avs_postal_match"=>nil,
|
26
|
+
"avs_result"=>nil,
|
27
|
+
"avs_street_match"=>nil,
|
28
|
+
"brand"=>"Discover",
|
29
|
+
"created_at"=>"2014-04-25T20:10:24.900273Z",
|
30
|
+
"cvv"=>"xxx",
|
31
|
+
"cvv_match"=>"yes",
|
32
|
+
"cvv_result"=>"Match",
|
33
|
+
"expiration_month"=>12,
|
34
|
+
"expiration_year"=>3000,
|
35
|
+
"fingerprint"=>
|
36
|
+
"3c667a62653e187f29b5781eeb0703f26e99558080de0c0f9490b5f9c4ac2871",
|
37
|
+
"href"=>"/cards/CC4XMSQg2OY6rrcrkeEGtLcZ",
|
38
|
+
"id"=>"CC4XMSQg2OY6rrcrkeEGtLcZ",
|
39
|
+
"is_verified"=>true,
|
40
|
+
"links"=>{"customer"=>nil},
|
41
|
+
"meta"=>{},
|
42
|
+
"name"=>nil,
|
43
|
+
"number"=>"xxxxxxxxxxxx0002",
|
44
|
+
"updated_at"=>"2014-04-25T20:10:24.900275Z"},
|
45
|
+
@hyperlinks=
|
46
|
+
{"card_holds"=>
|
47
|
+
#<Proc:0x007fa93e985fa0/lib/balanced/utils.rb:6 (lambda)>,
|
48
|
+
"customer"=>
|
49
|
+
#<Proc:0x007fa93e9852a8/lib/balanced/utils.rb:6 (lambda)>,
|
50
|
+
"debits"=>
|
51
|
+
#<Proc:0x007fa93e97eae8/lib/balanced/utils.rb:6 (lambda)>}>
|
52
|
+
|
53
|
+
% endif
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Balanced::Card.debit
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC4tvKLTKXcBJAgkGvPEW58N')
|
8
8
|
card.debit(
|
9
9
|
:amount => 5000,
|
10
10
|
:appears_on_statement_as => 'Statement text',
|
@@ -12,38 +12,38 @@ card.debit(
|
|
12
12
|
)
|
13
13
|
|
14
14
|
% elif mode == 'response':
|
15
|
-
#<Balanced::Debit:
|
15
|
+
#<Balanced::Debit:0x007fa93e9568e0
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*Statement text",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-04-25T20:10:20.485474Z",
|
20
20
|
"currency"=>"USD",
|
21
21
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
22
22
|
"failure_reason"=>nil,
|
23
23
|
"failure_reason_code"=>nil,
|
24
|
-
"href"=>"/debits/
|
25
|
-
"id"=>"
|
24
|
+
"href"=>"/debits/WD4SOTNKiZbBFrmMk6mfszIl",
|
25
|
+
"id"=>"WD4SOTNKiZbBFrmMk6mfszIl",
|
26
26
|
"links"=>
|
27
|
-
{"customer"=>"
|
27
|
+
{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
|
28
28
|
"dispute"=>nil,
|
29
29
|
"order"=>nil,
|
30
|
-
"source"=>"
|
30
|
+
"source"=>"CC4tvKLTKXcBJAgkGvPEW58N"},
|
31
31
|
"meta"=>{},
|
32
32
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
33
|
+
"transaction_number"=>"W060-183-8881",
|
34
|
+
"updated_at"=>"2014-04-25T20:10:21.476140Z"},
|
35
35
|
@hyperlinks=
|
36
36
|
{"customer"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fa93e954c48/lib/balanced/resources/resource.rb:60 (lambda)>,
|
38
38
|
"dispute"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa93e954270/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"events"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa93e94e348/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"order"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa93e94d970/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"refunds"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa93e9477c8/lib/balanced/utils.rb:6 (lambda)>,
|
46
46
|
"source"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fa93e9456a8/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
48
48
|
|
49
49
|
% endif
|
@@ -0,0 +1 @@
|
|
1
|
+
Balanced::Card.debit
|
@@ -0,0 +1,49 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Card.debit
|
3
|
+
% elif mode == 'request':
|
4
|
+
require 'balanced'
|
5
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
|
+
|
7
|
+
card = Balanced::Card.fetch('/cards/CC4XMSQg2OY6rrcrkeEGtLcZ')
|
8
|
+
card.debit(
|
9
|
+
:amount => 5000,
|
10
|
+
:appears_on_statement_as => 'Statement text',
|
11
|
+
:description => 'Some descriptive text for the debit in the dashboard'
|
12
|
+
)
|
13
|
+
|
14
|
+
% elif mode == 'response':
|
15
|
+
#<Balanced::Debit:0x007fa93e856df0
|
16
|
+
@attributes=
|
17
|
+
{"amount"=>5000,
|
18
|
+
"appears_on_statement_as"=>"BAL*Statement text",
|
19
|
+
"created_at"=>"2014-04-25T20:10:25.648099Z",
|
20
|
+
"currency"=>"USD",
|
21
|
+
"description"=>"Some descriptive text for the debit in the dashboard",
|
22
|
+
"failure_reason"=>nil,
|
23
|
+
"failure_reason_code"=>nil,
|
24
|
+
"href"=>"/debits/WD4YCKAyFrQBFYuFCUCRynOx",
|
25
|
+
"id"=>"WD4YCKAyFrQBFYuFCUCRynOx",
|
26
|
+
"links"=>
|
27
|
+
{"customer"=>nil,
|
28
|
+
"dispute"=>nil,
|
29
|
+
"order"=>nil,
|
30
|
+
"source"=>"CC4XMSQg2OY6rrcrkeEGtLcZ"},
|
31
|
+
"meta"=>{},
|
32
|
+
"status"=>"succeeded",
|
33
|
+
"transaction_number"=>"W630-477-8252",
|
34
|
+
"updated_at"=>"2014-04-25T20:10:26.775361Z"},
|
35
|
+
@hyperlinks=
|
36
|
+
{"customer"=>
|
37
|
+
#<Proc:0x007fa93e856198/lib/balanced/utils.rb:6 (lambda)>,
|
38
|
+
"dispute"=>
|
39
|
+
#<Proc:0x007fa93e8557e8/lib/balanced/utils.rb:6 (lambda)>,
|
40
|
+
"events"=>
|
41
|
+
#<Proc:0x007fa93e84f8e8/lib/balanced/utils.rb:6 (lambda)>,
|
42
|
+
"order"=>
|
43
|
+
#<Proc:0x007fa93e84ef10/lib/balanced/utils.rb:6 (lambda)>,
|
44
|
+
"refunds"=>
|
45
|
+
#<Proc:0x007fa93e84d048/lib/balanced/utils.rb:6 (lambda)>,
|
46
|
+
"source"=>
|
47
|
+
#<Proc:0x007fa93e847670/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
48
|
+
|
49
|
+
% endif
|
@@ -3,9 +3,9 @@ Balanced::Card.unstore
|
|
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
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
|
9
9
|
card.unstore
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
@@ -3,47 +3,47 @@ Balanced::CardHold.capture
|
|
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
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl')
|
9
9
|
debit = card_hold.capture(
|
10
10
|
:appears_on_statement_as => 'ShowsUpOnStmt',
|
11
11
|
:description => 'Some descriptive text for the debit in the dashboard'
|
12
12
|
)
|
13
13
|
|
14
14
|
% elif mode == 'response':
|
15
|
-
#<Balanced::Debit:
|
15
|
+
#<Balanced::Debit:0x007fa93e819d38
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-04-25T20:09:46.854710Z",
|
20
20
|
"currency"=>"USD",
|
21
21
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
22
22
|
"failure_reason"=>nil,
|
23
23
|
"failure_reason_code"=>nil,
|
24
|
-
"href"=>"/debits/
|
25
|
-
"id"=>"
|
24
|
+
"href"=>"/debits/WD4gZDOJ1DB443FYcbwNN5EV",
|
25
|
+
"id"=>"WD4gZDOJ1DB443FYcbwNN5EV",
|
26
26
|
"links"=>
|
27
|
-
{"customer"=>"
|
27
|
+
{"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj",
|
28
28
|
"dispute"=>nil,
|
29
29
|
"order"=>nil,
|
30
|
-
"source"=>"
|
30
|
+
"source"=>"CC4auQXiAWMBxJcEUIMYeZFj"},
|
31
31
|
"meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
|
32
32
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
33
|
+
"transaction_number"=>"W815-967-5010",
|
34
|
+
"updated_at"=>"2014-04-25T20:09:47.351487Z"},
|
35
35
|
@hyperlinks=
|
36
36
|
{"customer"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fa93e8180c8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
38
38
|
"dispute"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa93e8270c8/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"events"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa93e825070/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"order"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa93e8245d0/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"refunds"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa93e810e90/lib/balanced/utils.rb:6 (lambda)>,
|
46
46
|
"source"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fa93e80aa90/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
48
48
|
|
49
49
|
% endif
|
@@ -2,39 +2,39 @@
|
|
2
2
|
Balanced::Card.hold
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC4auQXiAWMBxJcEUIMYeZFj')
|
8
8
|
card.hold(
|
9
9
|
:amount => 5000,
|
10
10
|
:description => 'Some descriptive text for the debit in the dashboard'
|
11
11
|
)
|
12
12
|
% elif mode == 'response':
|
13
|
-
#<Balanced::CardHold:
|
13
|
+
#<Balanced::CardHold:0x007fa93b7e5ea0
|
14
14
|
@attributes=
|
15
15
|
{"amount"=>5000,
|
16
|
-
"created_at"=>"2014-
|
16
|
+
"created_at"=>"2014-04-25T20:09:48.990540Z",
|
17
17
|
"currency"=>"USD",
|
18
18
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
19
|
-
"expires_at"=>"2014-
|
19
|
+
"expires_at"=>"2014-05-02T20:09:49.096484Z",
|
20
20
|
"failure_reason"=>nil,
|
21
21
|
"failure_reason_code"=>nil,
|
22
|
-
"href"=>"/card_holds/
|
23
|
-
"id"=>"
|
24
|
-
"links"=>{"card"=>"
|
22
|
+
"href"=>"/card_holds/HL4joUazeM3BJE6emmv2Q8EF",
|
23
|
+
"id"=>"HL4joUazeM3BJE6emmv2Q8EF",
|
24
|
+
"links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
|
25
25
|
"meta"=>{},
|
26
26
|
"status"=>"succeeded",
|
27
|
-
"transaction_number"=>"
|
28
|
-
"updated_at"=>"2014-
|
27
|
+
"transaction_number"=>"HL161-849-8610",
|
28
|
+
"updated_at"=>"2014-04-25T20:09:49.228091Z",
|
29
29
|
"voided_at"=>nil},
|
30
30
|
@hyperlinks=
|
31
31
|
{"card"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93b7e41e0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
33
33
|
"debit"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93b7df898/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"debits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93b7dd8e0/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"events"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93b7d78a0/lib/balanced/utils.rb:6 (lambda)>}>
|
39
39
|
|
40
40
|
% endif
|
@@ -3,62 +3,62 @@ Balanced::CardHold.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
|
holds = Balanced::CardHold.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::CardHold:
|
10
|
+
[#<Balanced::CardHold:0x007fa93b7bd4f0
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-04-25T20:09:41.712497Z",
|
14
14
|
"currency"=>"USD",
|
15
15
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
16
|
-
"expires_at"=>"2014-
|
16
|
+
"expires_at"=>"2014-05-02T20:09:41.878825Z",
|
17
17
|
"failure_reason"=>nil,
|
18
18
|
"failure_reason_code"=>nil,
|
19
|
-
"href"=>"/card_holds/
|
20
|
-
"id"=>"
|
21
|
-
"links"=>{"card"=>"
|
19
|
+
"href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
|
20
|
+
"id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
|
21
|
+
"links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
|
22
22
|
"meta"=>{},
|
23
23
|
"status"=>"succeeded",
|
24
|
-
"transaction_number"=>"
|
25
|
-
"updated_at"=>"2014-
|
24
|
+
"transaction_number"=>"HL244-046-8353",
|
25
|
+
"updated_at"=>"2014-04-25T20:09:42.023214Z",
|
26
26
|
"voided_at"=>nil},
|
27
27
|
@hyperlinks=
|
28
28
|
{"card"=>
|
29
|
-
#<Proc:
|
29
|
+
#<Proc:0x007fa93b7b79b0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
30
30
|
"debit"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007fa93b7b6f60/lib/balanced/utils.rb:6 (lambda)>,
|
32
32
|
"debits"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fa93b7b4df0/lib/balanced/utils.rb:6 (lambda)>,
|
34
34
|
"events"=>
|
35
|
-
#<Proc:
|
36
|
-
#<Balanced::CardHold:
|
35
|
+
#<Proc:0x007fa93b7aefb8/lib/balanced/utils.rb:6 (lambda)>}>,
|
36
|
+
#<Balanced::CardHold:0x007fa93b7aef68
|
37
37
|
@attributes=
|
38
38
|
{"amount"=>10000000,
|
39
|
-
"created_at"=>"2014-
|
39
|
+
"created_at"=>"2014-04-25T20:09:10.201844Z",
|
40
40
|
"currency"=>"USD",
|
41
41
|
"description"=>nil,
|
42
|
-
"expires_at"=>"2014-
|
42
|
+
"expires_at"=>"2014-05-02T20:09:10.501460Z",
|
43
43
|
"failure_reason"=>nil,
|
44
44
|
"failure_reason_code"=>nil,
|
45
|
-
"href"=>"/card_holds/
|
46
|
-
"id"=>"
|
45
|
+
"href"=>"/card_holds/HL3BLQCYcUDdnWRrsy01Yqhf",
|
46
|
+
"id"=>"HL3BLQCYcUDdnWRrsy01Yqhf",
|
47
47
|
"links"=>
|
48
|
-
{"card"=>"
|
48
|
+
{"card"=>"CC3B0K4gs5gKB5e1wawj8Rgx", "debit"=>"WD3BMUJeA9K2L4m7jqc7w9db"},
|
49
49
|
"meta"=>{},
|
50
50
|
"status"=>"succeeded",
|
51
|
-
"transaction_number"=>"
|
52
|
-
"updated_at"=>"2014-
|
51
|
+
"transaction_number"=>"HL048-561-7017",
|
52
|
+
"updated_at"=>"2014-04-25T20:09:10.970666Z",
|
53
53
|
"voided_at"=>nil},
|
54
54
|
@hyperlinks=
|
55
55
|
{"card"=>
|
56
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fa93b7ad2f8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
57
57
|
"debit"=>
|
58
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fa93b7a7948/lib/balanced/resources/resource.rb:60 (lambda)>,
|
59
59
|
"debits"=>
|
60
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fa93b7a5788/lib/balanced/utils.rb:6 (lambda)>,
|
61
61
|
"events"=>
|
62
|
-
#<Proc:
|
62
|
+
#<Proc:0x007fa93b79f7e8/lib/balanced/utils.rb:6 (lambda)>}>]
|
63
63
|
|
64
64
|
% endif
|