balanced 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +10 -6
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/balanced/resources.rb +2 -0
- data/lib/balanced/resources/account.rb +33 -0
- data/lib/balanced/resources/card.rb +1 -1
- data/lib/balanced/resources/customer.rb +8 -0
- data/lib/balanced/resources/resource.rb +4 -6
- data/lib/balanced/resources/settlement.rb +12 -0
- data/lib/balanced/response/balanced_exception_middleware.rb +1 -1
- data/lib/balanced/utils.rb +1 -1
- data/lib/balanced/version.rb +1 -1
- data/scenarios/account_credit/definition.rb +1 -0
- data/scenarios/account_credit/request.rb +5 -0
- data/scenarios/account_credit/ruby.mako +49 -0
- data/scenarios/account_list/definition.rb +1 -0
- data/scenarios/account_list/request.rb +2 -0
- data/scenarios/account_list/ruby.mako +64 -0
- data/scenarios/account_list_customer/definition.rb +1 -0
- data/scenarios/account_list_customer/request.rb +3 -0
- data/scenarios/account_list_customer/ruby.mako +38 -0
- data/scenarios/account_show/definition.rb +1 -0
- data/scenarios/account_show/request.rb +2 -0
- data/scenarios/account_show/ruby.mako +37 -0
- 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 +16 -14
- data/scenarios/bank_account_create/ruby.mako +13 -11
- data/scenarios/bank_account_credit/ruby.mako +16 -16
- data/scenarios/bank_account_debit/ruby.mako +21 -18
- data/scenarios/bank_account_debit_order/definition.rb +1 -0
- data/scenarios/bank_account_debit_order/request.rb +7 -0
- data/scenarios/bank_account_debit_order/ruby.mako +52 -0
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +26 -22
- data/scenarios/bank_account_show/ruby.mako +14 -12
- data/scenarios/bank_account_update/ruby.mako +14 -12
- data/scenarios/bank_account_verification_create/ruby.mako +10 -10
- data/scenarios/bank_account_verification_show/ruby.mako +10 -10
- 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/ruby.mako +26 -26
- data/scenarios/card_create/ruby.mako +13 -15
- data/scenarios/card_create_creditable/ruby.mako +11 -11
- data/scenarios/card_create_dispute/ruby.mako +13 -13
- data/scenarios/card_credit/ruby.mako +16 -14
- data/scenarios/card_credit_order/definition.rb +1 -0
- data/scenarios/card_credit_order/request.rb +7 -0
- data/scenarios/card_credit_order/ruby.mako +45 -0
- data/scenarios/card_debit/ruby.mako +20 -17
- data/scenarios/card_debit_dispute/ruby.mako +20 -17
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +20 -17
- data/scenarios/card_hold_create/ruby.mako +16 -14
- data/scenarios/card_hold_list/ruby.mako +33 -27
- data/scenarios/card_hold_order/definition.rb +1 -0
- data/scenarios/card_hold_order/request.rb +6 -0
- data/scenarios/card_hold_order/ruby.mako +45 -0
- 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 +17 -15
- data/scenarios/card_list/ruby.mako +25 -29
- data/scenarios/card_show/ruby.mako +14 -16
- data/scenarios/card_update/ruby.mako +14 -16
- data/scenarios/credit_list/ruby.mako +44 -14
- data/scenarios/credit_list_bank_account/ruby.mako +3 -3
- data/scenarios/credit_order/request.rb +2 -2
- data/scenarios/credit_order/ruby.mako +35 -14
- data/scenarios/credit_show/ruby.mako +16 -16
- data/scenarios/credit_update/ruby.mako +16 -16
- data/scenarios/customer_create/ruby.mako +22 -20
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +43 -39
- data/scenarios/customer_show/ruby.mako +23 -21
- data/scenarios/customer_update/ruby.mako +23 -21
- data/scenarios/debit_dispute_show/ruby.mako +12 -12
- data/scenarios/debit_list/ruby.mako +43 -37
- data/scenarios/debit_order/ruby.mako +22 -19
- data/scenarios/debit_show/ruby.mako +20 -17
- data/scenarios/debit_update/ruby.mako +20 -17
- data/scenarios/dispute_list/ruby.mako +11 -11
- data/scenarios/dispute_show/ruby.mako +12 -12
- data/scenarios/event_list/ruby.mako +55 -81
- data/scenarios/event_show/ruby.mako +35 -45
- data/scenarios/order_create/ruby.mako +16 -14
- data/scenarios/order_list/ruby.mako +33 -29
- data/scenarios/order_show/ruby.mako +16 -14
- data/scenarios/order_update/ruby.mako +16 -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/reversal_create/ruby.mako +13 -13
- data/scenarios/reversal_list/ruby.mako +12 -12
- data/scenarios/reversal_show/ruby.mako +13 -13
- data/scenarios/reversal_update/ruby.mako +13 -13
- data/scenarios/settlement_create/definition.rb +1 -0
- data/scenarios/settlement_create/request.rb +5 -0
- data/scenarios/settlement_create/ruby.mako +48 -0
- data/scenarios/settlement_list/definition.rb +1 -0
- data/scenarios/settlement_list/request.rb +2 -0
- data/scenarios/settlement_list/ruby.mako +40 -0
- data/scenarios/settlement_list_account/definition.rb +1 -0
- data/scenarios/settlement_list_account/request.rb +3 -0
- data/scenarios/settlement_list_account/ruby.mako +41 -0
- data/scenarios/settlement_show/definition.rb +1 -0
- data/scenarios/settlement_show/request.rb +2 -0
- data/scenarios/settlement_show/ruby.mako +40 -0
- data/snippets/account-balance.rb +1 -0
- data/snippets/bank-account-create.rb +6 -0
- data/snippets/bank-account-debit.rb +9 -0
- data/snippets/bank-account-verification-confirm.rb +5 -0
- data/snippets/bank-account-verification-create.rb +1 -0
- data/snippets/callback-create.rb +4 -0
- data/snippets/card-associate-to-customer.rb +2 -0
- data/snippets/card-create-dispute.rb +6 -0
- data/snippets/card-create.rb +7 -0
- data/snippets/card-credit.rb +9 -0
- data/snippets/card-debit.rb +9 -0
- data/snippets/card-hold-capture.rb +6 -0
- data/snippets/card-hold-create.rb +6 -0
- data/snippets/card-hold-void.rb +3 -0
- data/snippets/create-buyer-and-card.rb +13 -0
- data/snippets/credit-create.rb +8 -0
- data/snippets/credit-fetch.rb +1 -0
- data/snippets/credit-marketplace-escrow.rb +4 -0
- data/snippets/credit-reverse.rb +1 -0
- data/snippets/credit-soft-descriptor.rb +9 -0
- data/snippets/credit-split.rb +13 -0
- data/snippets/customer-create.rb +8 -0
- data/snippets/debit-dispute-show.rb +3 -0
- data/snippets/debit-fetch.rb +1 -0
- data/snippets/debit-marketplace-escrow.rb +4 -0
- data/snippets/debit-refund.rb +1 -0
- data/snippets/dispute-list.rb +1 -0
- data/snippets/dispute-show.rb +2 -0
- data/snippets/examine-order-after-refund.rb +3 -0
- data/snippets/examine-order-after-reversal.rb +3 -0
- data/snippets/example.rb +1 -0
- data/snippets/marketplace-in-escrow.rb +1 -0
- data/snippets/merchant-payable-account-fetch.rb +2 -0
- data/snippets/order-amount-escrowed.rb +3 -0
- data/snippets/order-bank-account-create.rb +8 -0
- data/snippets/order-create.rb +1 -0
- data/snippets/order-credit-marketplace.rb +5 -0
- data/snippets/order-credit-merchant-payable-account.rb +4 -0
- data/snippets/order-credit.rb +4 -0
- data/snippets/order-credits-fetch.rb +1 -0
- data/snippets/order-debit.rb +4 -0
- data/snippets/order-debits-fetch.rb +1 -0
- data/snippets/order-fetch.rb +1 -0
- data/snippets/order-update.rb +5 -0
- data/snippets/refund-create.rb +13 -0
- data/snippets/reversal-create.rb +13 -0
- data/snippets/settlement-create.rb +5 -0
- data/spec/balanced/resources/account_spec.rb +265 -0
- data/spec/balanced/resources/card_spec.rb +6 -6
- metadata +86 -2
@@ -2,39 +2,41 @@
|
|
2
2
|
Balanced::Card.hold
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC6buB6OEtiIf7DMIKzpJ7k9')
|
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:0x007fcde09b2868
|
14
14
|
@attributes=
|
15
15
|
{"amount"=>5000,
|
16
|
-
"created_at"=>"2014-
|
16
|
+
"created_at"=>"2014-12-17T21:24:51.371006Z",
|
17
17
|
"currency"=>"USD",
|
18
18
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
19
|
-
"expires_at"=>"2014-
|
19
|
+
"expires_at"=>"2014-12-24T21:24:51.517986Z",
|
20
20
|
"failure_reason"=>nil,
|
21
21
|
"failure_reason_code"=>nil,
|
22
|
-
"href"=>"/card_holds/
|
23
|
-
"id"=>"
|
24
|
-
"links"=>{"card"=>"
|
22
|
+
"href"=>"/card_holds/HL6ZzVVWQngH6S8RZOptz7Ak",
|
23
|
+
"id"=>"HL6ZzVVWQngH6S8RZOptz7Ak",
|
24
|
+
"links"=>{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9", "debit"=>nil, "order"=>nil},
|
25
25
|
"meta"=>{},
|
26
26
|
"status"=>"succeeded",
|
27
|
-
"transaction_number"=>"
|
28
|
-
"updated_at"=>"2014-
|
27
|
+
"transaction_number"=>"HL5JD-E88-HXCG",
|
28
|
+
"updated_at"=>"2014-12-17T21:24:51.624161Z",
|
29
29
|
"voided_at"=>nil},
|
30
30
|
@hyperlinks=
|
31
31
|
{"card"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fcde09b0d38/lib/balanced/resources/resource.rb:56 (lambda)>,
|
33
33
|
"debit"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fcde09b03b0/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"debits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fcde09ba400/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"events"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fcde09b8498/lib/balanced/utils.rb:6 (lambda)>,
|
39
|
+
"order"=>
|
40
|
+
#<Proc:0x007fcde09cba98/lib/balanced/utils.rb:6 (lambda)>}>
|
39
41
|
|
40
42
|
% endif
|
@@ -3,62 +3,68 @@ Balanced::CardHold.all
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
8
|
holds = Balanced::CardHold.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::CardHold:
|
10
|
+
[#<Balanced::CardHold:0x007fcde18c7bc8
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-12-17T21:24:44.413118Z",
|
14
14
|
"currency"=>"USD",
|
15
15
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
16
|
-
"expires_at"=>"2014-
|
16
|
+
"expires_at"=>"2014-12-24T21:24:44.632300Z",
|
17
17
|
"failure_reason"=>nil,
|
18
18
|
"failure_reason_code"=>nil,
|
19
|
-
"href"=>"/card_holds/
|
20
|
-
"id"=>"
|
21
|
-
"links"=>{"card"=>"
|
19
|
+
"href"=>"/card_holds/HL6RKKEl9zNhtZGgnZaElcwU",
|
20
|
+
"id"=>"HL6RKKEl9zNhtZGgnZaElcwU",
|
21
|
+
"links"=>{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9", "debit"=>nil, "order"=>nil},
|
22
22
|
"meta"=>{},
|
23
23
|
"status"=>"succeeded",
|
24
|
-
"transaction_number"=>"
|
25
|
-
"updated_at"=>"2014-
|
24
|
+
"transaction_number"=>"HL1YW-4PE-JOHZ",
|
25
|
+
"updated_at"=>"2014-12-17T21:24:44.745782Z",
|
26
26
|
"voided_at"=>nil},
|
27
27
|
@hyperlinks=
|
28
28
|
{"card"=>
|
29
|
-
#<Proc:
|
29
|
+
#<Proc:0x007fcde18c5f30/lib/balanced/resources/resource.rb:56 (lambda)>,
|
30
30
|
"debit"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007fcde18c55a8/lib/balanced/utils.rb:6 (lambda)>,
|
32
32
|
"debits"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fcde12ab7a8/lib/balanced/utils.rb:6 (lambda)>,
|
34
34
|
"events"=>
|
35
|
-
#<Proc:
|
36
|
-
|
35
|
+
#<Proc:0x007fcde12a9840/lib/balanced/utils.rb:6 (lambda)>,
|
36
|
+
"order"=>
|
37
|
+
#<Proc:0x007fcde12a8e90/lib/balanced/utils.rb:6 (lambda)>}>,
|
38
|
+
#<Balanced::CardHold:0x007fcde12a8e40
|
37
39
|
@attributes=
|
38
|
-
{"amount"=>
|
39
|
-
"created_at"=>"2014-
|
40
|
+
{"amount"=>5000,
|
41
|
+
"created_at"=>"2014-12-17T21:24:42.793067Z",
|
40
42
|
"currency"=>"USD",
|
41
|
-
"description"=>
|
42
|
-
"expires_at"=>"2014-
|
43
|
+
"description"=>"Some descriptive text for the debit in the dashboard",
|
44
|
+
"expires_at"=>"2014-12-24T21:24:43.058281Z",
|
43
45
|
"failure_reason"=>nil,
|
44
46
|
"failure_reason_code"=>nil,
|
45
|
-
"href"=>"/card_holds/
|
46
|
-
"id"=>"
|
47
|
+
"href"=>"/card_holds/HL6PVNaA1GWBdqnxhOfauxlm",
|
48
|
+
"id"=>"HL6PVNaA1GWBdqnxhOfauxlm",
|
47
49
|
"links"=>
|
48
|
-
{"card"=>"
|
50
|
+
{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9",
|
51
|
+
"debit"=>nil,
|
52
|
+
"order"=>"OR6c6n11zKSFfjE6kGNKtsE8"},
|
49
53
|
"meta"=>{},
|
50
54
|
"status"=>"succeeded",
|
51
|
-
"transaction_number"=>"
|
52
|
-
"updated_at"=>"2014-
|
55
|
+
"transaction_number"=>"HLRNL-8VJ-BWFX",
|
56
|
+
"updated_at"=>"2014-12-17T21:24:43.126760Z",
|
53
57
|
"voided_at"=>nil},
|
54
58
|
@hyperlinks=
|
55
59
|
{"card"=>
|
56
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fcde12bb2c0/lib/balanced/resources/resource.rb:56 (lambda)>,
|
57
61
|
"debit"=>
|
58
|
-
#<Proc:
|
62
|
+
#<Proc:0x007fcde12ba938/lib/balanced/utils.rb:6 (lambda)>,
|
59
63
|
"debits"=>
|
60
|
-
#<Proc:
|
64
|
+
#<Proc:0x007fcde12b8a20/lib/balanced/utils.rb:6 (lambda)>,
|
61
65
|
"events"=>
|
62
|
-
#<Proc:
|
66
|
+
#<Proc:0x007fcde12c2a98/lib/balanced/utils.rb:6 (lambda)>,
|
67
|
+
"order"=>
|
68
|
+
#<Proc:0x007fcde12c1120/lib/balanced/resources/resource.rb:56 (lambda)>}>]
|
63
69
|
|
64
70
|
% endif
|
@@ -0,0 +1 @@
|
|
1
|
+
Balanced::Card.hold
|
@@ -0,0 +1,45 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Card.hold
|
3
|
+
% elif mode == 'request':
|
4
|
+
require 'balanced'
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
|
+
|
7
|
+
card = Balanced::Card.fetch('/cards/CC6buB6OEtiIf7DMIKzpJ7k9')
|
8
|
+
card.hold(
|
9
|
+
:amount => 5000,
|
10
|
+
:order => '/orders/OR6c6n11zKSFfjE6kGNKtsE8'
|
11
|
+
)
|
12
|
+
% elif mode == 'response':
|
13
|
+
#<Balanced::CardHold:0x007fcde12f07e0
|
14
|
+
@attributes=
|
15
|
+
{"amount"=>5000,
|
16
|
+
"created_at"=>"2014-12-17T21:24:42.793067Z",
|
17
|
+
"currency"=>"USD",
|
18
|
+
"description"=>"Some descriptive text for the debit in the dashboard",
|
19
|
+
"expires_at"=>"2014-12-24T21:24:43.058281Z",
|
20
|
+
"failure_reason"=>nil,
|
21
|
+
"failure_reason_code"=>nil,
|
22
|
+
"href"=>"/card_holds/HL6PVNaA1GWBdqnxhOfauxlm",
|
23
|
+
"id"=>"HL6PVNaA1GWBdqnxhOfauxlm",
|
24
|
+
"links"=>
|
25
|
+
{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9",
|
26
|
+
"debit"=>nil,
|
27
|
+
"order"=>"OR6c6n11zKSFfjE6kGNKtsE8"},
|
28
|
+
"meta"=>{},
|
29
|
+
"status"=>"succeeded",
|
30
|
+
"transaction_number"=>"HLRNL-8VJ-BWFX",
|
31
|
+
"updated_at"=>"2014-12-17T21:24:43.126760Z",
|
32
|
+
"voided_at"=>nil},
|
33
|
+
@hyperlinks=
|
34
|
+
{"card"=>
|
35
|
+
#<Proc:0x007fcde12fac68/lib/balanced/resources/resource.rb:56 (lambda)>,
|
36
|
+
"debit"=>
|
37
|
+
#<Proc:0x007fcde12fa2e0/lib/balanced/utils.rb:6 (lambda)>,
|
38
|
+
"debits"=>
|
39
|
+
#<Proc:0x007fcde12f83a0/lib/balanced/utils.rb:6 (lambda)>,
|
40
|
+
"events"=>
|
41
|
+
#<Proc:0x007fcde13023f0/lib/balanced/utils.rb:6 (lambda)>,
|
42
|
+
"order"=>
|
43
|
+
#<Proc:0x007fcde1300a78/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
44
|
+
|
45
|
+
% endif
|
@@ -3,36 +3,38 @@ Balanced::CardHold.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL6RKKEl9zNhtZGgnZaElcwU')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::CardHold:
|
11
|
+
#<Balanced::CardHold:0x007fcde132a7d8
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-12-17T21:24:44.413118Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
|
-
"expires_at"=>"2014-
|
17
|
+
"expires_at"=>"2014-12-24T21:24:44.632300Z",
|
18
18
|
"failure_reason"=>nil,
|
19
19
|
"failure_reason_code"=>nil,
|
20
|
-
"href"=>"/card_holds/
|
21
|
-
"id"=>"
|
22
|
-
"links"=>{"card"=>"
|
20
|
+
"href"=>"/card_holds/HL6RKKEl9zNhtZGgnZaElcwU",
|
21
|
+
"id"=>"HL6RKKEl9zNhtZGgnZaElcwU",
|
22
|
+
"links"=>{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9", "debit"=>nil, "order"=>nil},
|
23
23
|
"meta"=>{},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
25
|
+
"transaction_number"=>"HL1YW-4PE-JOHZ",
|
26
|
+
"updated_at"=>"2014-12-17T21:24:44.745782Z",
|
27
27
|
"voided_at"=>nil},
|
28
28
|
@hyperlinks=
|
29
29
|
{"card"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fcde1328ca8/lib/balanced/resources/resource.rb:56 (lambda)>,
|
31
31
|
"debit"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fcde1328320/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fcde1332370/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fcde1330408/lib/balanced/utils.rb:6 (lambda)>,
|
37
|
+
"order"=>
|
38
|
+
#<Proc:0x007fcde133ba10/lib/balanced/utils.rb:6 (lambda)>}>
|
37
39
|
|
38
40
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::CardHold.save
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL6RKKEl9zNhtZGgnZaElcwU')
|
9
9
|
card_hold.description = 'update this description'
|
10
10
|
card_hold.meta = {
|
11
11
|
'holding.for' => 'user1',
|
@@ -14,31 +14,33 @@ card_hold.meta = {
|
|
14
14
|
card_hold.save
|
15
15
|
|
16
16
|
% elif mode == 'response':
|
17
|
-
#<Balanced::CardHold:
|
17
|
+
#<Balanced::CardHold:0x007fcde1359ab0
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>5000,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-12-17T21:24:44.413118Z",
|
21
21
|
"currency"=>"USD",
|
22
22
|
"description"=>"update this description",
|
23
|
-
"expires_at"=>"2014-
|
23
|
+
"expires_at"=>"2014-12-24T21:24:44.632300Z",
|
24
24
|
"failure_reason"=>nil,
|
25
25
|
"failure_reason_code"=>nil,
|
26
|
-
"href"=>"/card_holds/
|
27
|
-
"id"=>"
|
28
|
-
"links"=>{"card"=>"
|
26
|
+
"href"=>"/card_holds/HL6RKKEl9zNhtZGgnZaElcwU",
|
27
|
+
"id"=>"HL6RKKEl9zNhtZGgnZaElcwU",
|
28
|
+
"links"=>{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9", "debit"=>nil, "order"=>nil},
|
29
29
|
"meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
|
30
30
|
"status"=>"succeeded",
|
31
|
-
"transaction_number"=>"
|
32
|
-
"updated_at"=>"2014-
|
31
|
+
"transaction_number"=>"HL1YW-4PE-JOHZ",
|
32
|
+
"updated_at"=>"2014-12-17T21:24:48.351903Z",
|
33
33
|
"voided_at"=>nil},
|
34
34
|
@hyperlinks=
|
35
35
|
{"card"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fcde1363f38/lib/balanced/resources/resource.rb:56 (lambda)>,
|
37
37
|
"debit"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fcde13635b0/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"debits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fcde1361670/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"events"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde136b6c0/lib/balanced/utils.rb:6 (lambda)>,
|
43
|
+
"order"=>
|
44
|
+
#<Proc:0x007fcde136ad10/lib/balanced/utils.rb:6 (lambda)>}>
|
43
45
|
|
44
46
|
% endif
|
@@ -3,36 +3,38 @@ Balanced::CardHold.unstore
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL6ZzVVWQngH6S8RZOptz7Ak')
|
9
9
|
card_hold.unstore
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::CardHold:
|
11
|
+
#<Balanced::CardHold:0x007fcde18ff2f8
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-12-17T21:24:51.371006Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
|
-
"expires_at"=>"2014-
|
17
|
+
"expires_at"=>"2014-12-24T21:24:51.517986Z",
|
18
18
|
"failure_reason"=>nil,
|
19
19
|
"failure_reason_code"=>nil,
|
20
|
-
"href"=>"/card_holds/
|
21
|
-
"id"=>"
|
22
|
-
"links"=>{"card"=>"
|
20
|
+
"href"=>"/card_holds/HL6ZzVVWQngH6S8RZOptz7Ak",
|
21
|
+
"id"=>"HL6ZzVVWQngH6S8RZOptz7Ak",
|
22
|
+
"links"=>{"card"=>"CC6buB6OEtiIf7DMIKzpJ7k9", "debit"=>nil, "order"=>nil},
|
23
23
|
"meta"=>{},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
27
|
-
"voided_at"=>"2014-
|
25
|
+
"transaction_number"=>"HL5JD-E88-HXCG",
|
26
|
+
"updated_at"=>"2014-12-17T21:24:52.515923Z",
|
27
|
+
"voided_at"=>"2014-12-17T21:24:52.158210Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"card"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fcde18fd7c8/lib/balanced/resources/resource.rb:56 (lambda)>,
|
31
31
|
"debit"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fcde18fce40/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fcde1906eb8/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fcde1904f50/lib/balanced/utils.rb:6 (lambda)>,
|
37
|
+
"order"=>
|
38
|
+
#<Proc:0x007fcde19045a0/lib/balanced/utils.rb:6 (lambda)>}>
|
37
39
|
|
38
40
|
% endif
|
@@ -2,11 +2,11 @@
|
|
2
2
|
Balanced::Card.all
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
7
|
cards = Balanced::Card.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Card:
|
9
|
+
[#<Balanced::Card:0x007fcde192c910
|
10
10
|
@attributes=
|
11
11
|
{"address"=>
|
12
12
|
{"city"=>nil,
|
@@ -18,12 +18,12 @@ cards = Balanced::Card.all
|
|
18
18
|
"avs_postal_match"=>nil,
|
19
19
|
"avs_result"=>nil,
|
20
20
|
"avs_street_match"=>nil,
|
21
|
-
"
|
21
|
+
"bank_name"=>"BANK OF HAWAII",
|
22
22
|
"brand"=>"MasterCard",
|
23
23
|
"can_credit"=>false,
|
24
24
|
"can_debit"=>true,
|
25
|
-
"category"=>
|
26
|
-
"created_at"=>"2014-
|
25
|
+
"category"=>"other",
|
26
|
+
"created_at"=>"2014-12-17T21:24:55.056930Z",
|
27
27
|
"cvv"=>"xxx",
|
28
28
|
"cvv_match"=>"yes",
|
29
29
|
"cvv_result"=>"Match",
|
@@ -31,27 +31,25 @@ cards = Balanced::Card.all
|
|
31
31
|
"expiration_year"=>2020,
|
32
32
|
"fingerprint"=>
|
33
33
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
34
|
-
"href"=>"/cards/
|
35
|
-
"id"=>"
|
34
|
+
"href"=>"/cards/CC73IyzxPUu2z89NH8GrJhLn",
|
35
|
+
"id"=>"CC73IyzxPUu2z89NH8GrJhLn",
|
36
36
|
"is_verified"=>true,
|
37
37
|
"links"=>{"customer"=>nil},
|
38
38
|
"meta"=>{},
|
39
39
|
"name"=>nil,
|
40
40
|
"number"=>"xxxxxxxxxxxx5100",
|
41
|
-
"type"=>"",
|
42
|
-
"updated_at"=>"2014-
|
41
|
+
"type"=>"credit",
|
42
|
+
"updated_at"=>"2014-12-17T21:24:55.056933Z"},
|
43
43
|
@hyperlinks=
|
44
44
|
{"card_holds"=>
|
45
|
-
#<Proc:
|
46
|
-
"credits"=>
|
47
|
-
#<Proc:0x007fa7d3343af0/lib/balanced/utils.rb:6 (lambda)>,
|
45
|
+
#<Proc:0x007fcde1936820/lib/balanced/utils.rb:6 (lambda)>,
|
48
46
|
"customer"=>
|
49
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fcde1935e70/lib/balanced/utils.rb:6 (lambda)>,
|
50
48
|
"debits"=>
|
51
|
-
#<Proc:
|
49
|
+
#<Proc:0x007fcde1934020/lib/balanced/utils.rb:6 (lambda)>,
|
52
50
|
"disputes"=>
|
53
|
-
#<Proc:
|
54
|
-
#<Balanced::Card:
|
51
|
+
#<Proc:0x007fcde193e160/lib/balanced/utils.rb:6 (lambda)>}>,
|
52
|
+
#<Balanced::Card:0x007fcde193e110
|
55
53
|
@attributes=
|
56
54
|
{"address"=>
|
57
55
|
{"city"=>nil,
|
@@ -63,12 +61,12 @@ cards = Balanced::Card.all
|
|
63
61
|
"avs_postal_match"=>nil,
|
64
62
|
"avs_result"=>nil,
|
65
63
|
"avs_street_match"=>nil,
|
66
|
-
"
|
64
|
+
"bank_name"=>"BANK OF HAWAII",
|
67
65
|
"brand"=>"MasterCard",
|
68
66
|
"can_credit"=>false,
|
69
67
|
"can_debit"=>true,
|
70
|
-
"category"=>
|
71
|
-
"created_at"=>"2014-
|
68
|
+
"category"=>"other",
|
69
|
+
"created_at"=>"2014-12-17T21:24:06.842721Z",
|
72
70
|
"cvv"=>"xxx",
|
73
71
|
"cvv_match"=>"yes",
|
74
72
|
"cvv_result"=>"Match",
|
@@ -76,25 +74,23 @@ cards = Balanced::Card.all
|
|
76
74
|
"expiration_year"=>2020,
|
77
75
|
"fingerprint"=>
|
78
76
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
79
|
-
"href"=>"/cards/
|
80
|
-
"id"=>"
|
77
|
+
"href"=>"/cards/CC6buB6OEtiIf7DMIKzpJ7k9",
|
78
|
+
"id"=>"CC6buB6OEtiIf7DMIKzpJ7k9",
|
81
79
|
"is_verified"=>true,
|
82
80
|
"links"=>{"customer"=>nil},
|
83
81
|
"meta"=>{},
|
84
82
|
"name"=>nil,
|
85
83
|
"number"=>"xxxxxxxxxxxx5100",
|
86
|
-
"type"=>"",
|
87
|
-
"updated_at"=>"2014-
|
84
|
+
"type"=>"credit",
|
85
|
+
"updated_at"=>"2014-12-17T21:24:06.842723Z"},
|
88
86
|
@hyperlinks=
|
89
87
|
{"card_holds"=>
|
90
|
-
#<Proc:
|
91
|
-
"credits"=>
|
92
|
-
#<Proc:0x007fa7d3332f98/lib/balanced/utils.rb:6 (lambda)>,
|
88
|
+
#<Proc:0x007fcde193c0b8/lib/balanced/utils.rb:6 (lambda)>,
|
93
89
|
"customer"=>
|
94
|
-
#<Proc:
|
90
|
+
#<Proc:0x007fcde1947698/lib/balanced/utils.rb:6 (lambda)>,
|
95
91
|
"debits"=>
|
96
|
-
#<Proc:
|
92
|
+
#<Proc:0x007fcde1945870/lib/balanced/utils.rb:6 (lambda)>,
|
97
93
|
"disputes"=>
|
98
|
-
#<Proc:
|
94
|
+
#<Proc:0x007fcde194fa00/lib/balanced/utils.rb:6 (lambda)>}>]
|
99
95
|
|
100
96
|
% endif
|