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
@@ -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-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
8
|
card = Balanced::Card.new(
|
9
9
|
:expiration_month => '05',
|
@@ -13,7 +13,7 @@ card = Balanced::Card.new(
|
|
13
13
|
).save
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::Card:
|
16
|
+
#<Balanced::Card:0x007fcde0963560
|
17
17
|
@attributes=
|
18
18
|
{"address"=>
|
19
19
|
{"city"=>nil,
|
@@ -30,7 +30,7 @@ card = Balanced::Card.new(
|
|
30
30
|
"can_credit"=>true,
|
31
31
|
"can_debit"=>true,
|
32
32
|
"category"=>"other",
|
33
|
-
"created_at"=>"2014-
|
33
|
+
"created_at"=>"2014-12-17T21:25:02.071736Z",
|
34
34
|
"cvv"=>nil,
|
35
35
|
"cvv_match"=>nil,
|
36
36
|
"cvv_result"=>nil,
|
@@ -38,25 +38,25 @@ card = Balanced::Card.new(
|
|
38
38
|
"expiration_year"=>2020,
|
39
39
|
"fingerprint"=>
|
40
40
|
"7dc93d35b59078a1da8e0ebd2cbec65a6ca205760a1be1b90a143d7f2b00e355",
|
41
|
-
"href"=>"/cards/
|
42
|
-
"id"=>"
|
41
|
+
"href"=>"/cards/CC7bBGoeKPe5DBKWgduZd5Cl",
|
42
|
+
"id"=>"CC7bBGoeKPe5DBKWgduZd5Cl",
|
43
43
|
"is_verified"=>true,
|
44
44
|
"links"=>{"customer"=>nil},
|
45
45
|
"meta"=>{},
|
46
46
|
"name"=>"Johannes Bach",
|
47
47
|
"number"=>"xxxxxxxxxxxx1118",
|
48
48
|
"type"=>"debit",
|
49
|
-
"updated_at"=>"2014-
|
49
|
+
"updated_at"=>"2014-12-17T21:25:02.071738Z"},
|
50
50
|
@hyperlinks=
|
51
51
|
{"card_holds"=>
|
52
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fcde0960ab8/lib/balanced/utils.rb:6 (lambda)>,
|
53
53
|
"credits"=>
|
54
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde093e800/lib/balanced/utils.rb:6 (lambda)>,
|
55
55
|
"customer"=>
|
56
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fcde093ddd8/lib/balanced/utils.rb:6 (lambda)>,
|
57
57
|
"debits"=>
|
58
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fcde0937bb8/lib/balanced/utils.rb:6 (lambda)>,
|
59
59
|
"disputes"=>
|
60
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fcde09357f0/lib/balanced/utils.rb:6 (lambda)>}>
|
61
61
|
|
62
62
|
% endif
|
@@ -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-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
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:0x007fcde3a41f88
|
17
17
|
@attributes=
|
18
18
|
{"address"=>
|
19
19
|
{"city"=>nil,
|
@@ -25,12 +25,12 @@ card = Balanced::Card.new(
|
|
25
25
|
"avs_postal_match"=>nil,
|
26
26
|
"avs_result"=>nil,
|
27
27
|
"avs_street_match"=>nil,
|
28
|
-
"
|
28
|
+
"bank_name"=>"BANK OF AMERICA",
|
29
29
|
"brand"=>"Discover",
|
30
30
|
"can_credit"=>true,
|
31
31
|
"can_debit"=>true,
|
32
|
-
"category"=>"
|
33
|
-
"created_at"=>"2014-
|
32
|
+
"category"=>"other",
|
33
|
+
"created_at"=>"2014-12-17T21:25:34.002704Z",
|
34
34
|
"cvv"=>"xxx",
|
35
35
|
"cvv_match"=>"yes",
|
36
36
|
"cvv_result"=>"Match",
|
@@ -38,25 +38,25 @@ card = Balanced::Card.new(
|
|
38
38
|
"expiration_year"=>3000,
|
39
39
|
"fingerprint"=>
|
40
40
|
"3c667a62653e187f29b5781eeb0703f26e99558080de0c0f9490b5f9c4ac2871",
|
41
|
-
"href"=>"/cards/
|
42
|
-
"id"=>"
|
41
|
+
"href"=>"/cards/CC7Lwi6mzKkqwXrIg5UY1BE9",
|
42
|
+
"id"=>"CC7Lwi6mzKkqwXrIg5UY1BE9",
|
43
43
|
"is_verified"=>true,
|
44
44
|
"links"=>{"customer"=>nil},
|
45
45
|
"meta"=>{},
|
46
46
|
"name"=>nil,
|
47
47
|
"number"=>"xxxxxxxxxxxx0002",
|
48
48
|
"type"=>"debit",
|
49
|
-
"updated_at"=>"2014-
|
49
|
+
"updated_at"=>"2014-12-17T21:25:34.002706Z"},
|
50
50
|
@hyperlinks=
|
51
51
|
{"card_holds"=>
|
52
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fcde3a28f10/lib/balanced/utils.rb:6 (lambda)>,
|
53
53
|
"credits"=>
|
54
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde3a168b0/lib/balanced/utils.rb:6 (lambda)>,
|
55
55
|
"customer"=>
|
56
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fcde39fc640/lib/balanced/utils.rb:6 (lambda)>,
|
57
57
|
"debits"=>
|
58
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fcde39dc480/lib/balanced/utils.rb:6 (lambda)>,
|
59
59
|
"disputes"=>
|
60
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fcde39cfe88/lib/balanced/utils.rb:6 (lambda)>}>
|
61
61
|
|
62
62
|
% endif
|
@@ -2,42 +2,44 @@
|
|
2
2
|
Balanced::Card.credit
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-25ZY8HQwZPuQtDecrxb671LilUya5t5G0')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC3iCCIHprJu5HPyP7vmE92B')
|
8
8
|
card.credit(
|
9
9
|
:amount => 5000,
|
10
10
|
:description => 'Some descriptive text for the debit in the dashboard'
|
11
11
|
)
|
12
12
|
|
13
13
|
% elif mode == 'response':
|
14
|
-
#<Balanced::Credit:
|
14
|
+
#<Balanced::Credit:0x007fb1e899b640
|
15
15
|
@attributes=
|
16
16
|
{"amount"=>5000,
|
17
17
|
"appears_on_statement_as"=>"example.com",
|
18
|
-
"created_at"=>"2014-
|
18
|
+
"created_at"=>"2014-11-14T19:29:19.110285Z",
|
19
19
|
"currency"=>"USD",
|
20
20
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
21
21
|
"failure_reason"=>nil,
|
22
22
|
"failure_reason_code"=>nil,
|
23
|
-
"href"=>"/credits/
|
24
|
-
"id"=>"
|
23
|
+
"href"=>"/credits/CR3vFNFFCyqipPjs5t4eaIVO",
|
24
|
+
"id"=>"CR3vFNFFCyqipPjs5t4eaIVO",
|
25
25
|
"links"=>
|
26
|
-
{"customer"=>
|
26
|
+
{"customer"=>"CU2718cI8PkMdFyPjboZLZfn",
|
27
|
+
"destination"=>"CC3iCCIHprJu5HPyP7vmE92B",
|
28
|
+
"order"=>nil},
|
27
29
|
"meta"=>{},
|
28
30
|
"status"=>"succeeded",
|
29
|
-
"transaction_number"=>"
|
30
|
-
"updated_at"=>"2014-
|
31
|
+
"transaction_number"=>"CR6R4-4OF-RNZ7",
|
32
|
+
"updated_at"=>"2014-11-14T19:29:19.965523Z"},
|
31
33
|
@hyperlinks=
|
32
34
|
{"customer"=>
|
33
|
-
#<Proc:
|
35
|
+
#<Proc:0x007fb1e8999980@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/resources/resource.rb:60 (lambda)>,
|
34
36
|
"destination"=>
|
35
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fb1e98e3d78@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/resources/resource.rb:60 (lambda)>,
|
36
38
|
"events"=>
|
37
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fb1e98e1bb8@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/utils.rb:6 (lambda)>,
|
38
40
|
"order"=>
|
39
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fb1e98e1168@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/utils.rb:6 (lambda)>,
|
40
42
|
"reversals"=>
|
41
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fb1e8993288@/Users/ben/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/balanced-1.1.1/lib/balanced/utils.rb:6 (lambda)>}>
|
42
44
|
|
43
45
|
% endif
|
@@ -0,0 +1 @@
|
|
1
|
+
Balanced::Order.credit_to
|
@@ -0,0 +1,45 @@
|
|
1
|
+
% if mode == 'definition':
|
2
|
+
Balanced::Order.credit_to
|
3
|
+
% elif mode == 'request':
|
4
|
+
require 'balanced'
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
|
+
|
7
|
+
order = Balanced::Order.fetch('/orders/OR6c6n11zKSFfjE6kGNKtsE8')
|
8
|
+
card = Balanced::Card.fetch('/cards/CC7bBGoeKPe5DBKWgduZd5Cl')
|
9
|
+
order.credit_to(
|
10
|
+
:source => card,
|
11
|
+
:amount => 5000
|
12
|
+
)
|
13
|
+
% elif mode == 'response':
|
14
|
+
#<Balanced::Credit:0x007fcde395cfc8
|
15
|
+
@attributes=
|
16
|
+
{"amount"=>5000,
|
17
|
+
"appears_on_statement_as"=>"example.com",
|
18
|
+
"created_at"=>"2014-12-17T21:25:06.303877Z",
|
19
|
+
"currency"=>"USD",
|
20
|
+
"description"=>"Order #12341234",
|
21
|
+
"failure_reason"=>nil,
|
22
|
+
"failure_reason_code"=>nil,
|
23
|
+
"href"=>"/credits/CR7gmj42wn3NG2br01RjK1k9",
|
24
|
+
"id"=>"CR7gmj42wn3NG2br01RjK1k9",
|
25
|
+
"links"=>
|
26
|
+
{"customer"=>"CU68iUpvvUwpRpuuBL3u9Slq",
|
27
|
+
"destination"=>"CC7bBGoeKPe5DBKWgduZd5Cl",
|
28
|
+
"order"=>"OR6c6n11zKSFfjE6kGNKtsE8"},
|
29
|
+
"meta"=>{},
|
30
|
+
"status"=>"succeeded",
|
31
|
+
"transaction_number"=>"CRPDQ-Y1M-24PV",
|
32
|
+
"updated_at"=>"2014-12-17T21:25:06.683745Z"},
|
33
|
+
@hyperlinks=
|
34
|
+
{"customer"=>
|
35
|
+
#<Proc:0x007fcde3954c60/lib/balanced/resources/resource.rb:56 (lambda)>,
|
36
|
+
"destination"=>
|
37
|
+
#<Proc:0x007fcde394c4e8/lib/balanced/resources/resource.rb:56 (lambda)>,
|
38
|
+
"events"=>
|
39
|
+
#<Proc:0x007fcde3944338/lib/balanced/utils.rb:6 (lambda)>,
|
40
|
+
"order"=>
|
41
|
+
#<Proc:0x007fcde393d9c0/lib/balanced/resources/resource.rb:56 (lambda)>,
|
42
|
+
"reversals"=>
|
43
|
+
#<Proc:0x007fcde39361e8/lib/balanced/utils.rb:6 (lambda)>}>
|
44
|
+
|
45
|
+
% 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-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC73IyzxPUu2z89NH8GrJhLn')
|
8
8
|
card.debit(
|
9
9
|
:amount => 5000,
|
10
10
|
:appears_on_statement_as => 'Statement text',
|
@@ -12,38 +12,41 @@ card.debit(
|
|
12
12
|
)
|
13
13
|
|
14
14
|
% elif mode == 'response':
|
15
|
-
#<Balanced::Debit:
|
15
|
+
#<Balanced::Debit:0x007fcde38ff620
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*Statement text",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-12-17T21:25:30.261603Z",
|
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/WD7HiEv2UJV5WlRSAcmGOFKJ",
|
25
|
+
"id"=>"WD7HiEv2UJV5WlRSAcmGOFKJ",
|
26
26
|
"links"=>
|
27
|
-
{"
|
27
|
+
{"card_hold"=>"HL7Hh1D6bok0wd3Xw3Haq08B",
|
28
|
+
"customer"=>nil,
|
28
29
|
"dispute"=>nil,
|
29
30
|
"order"=>nil,
|
30
|
-
"source"=>"
|
31
|
+
"source"=>"CC73IyzxPUu2z89NH8GrJhLn"},
|
31
32
|
"meta"=>{},
|
32
33
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
34
|
+
"transaction_number"=>"WTW1-5HD-0TVB",
|
35
|
+
"updated_at"=>"2014-12-17T21:25:30.976497Z"},
|
35
36
|
@hyperlinks=
|
36
|
-
{"
|
37
|
-
#<Proc:
|
37
|
+
{"card_hold"=>
|
38
|
+
#<Proc:0x007fcde38f6958/lib/balanced/resources/resource.rb:56 (lambda)>,
|
39
|
+
"customer"=>
|
40
|
+
#<Proc:0x007fcde38f56c0/lib/balanced/utils.rb:6 (lambda)>,
|
38
41
|
"dispute"=>
|
39
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde38eff90/lib/balanced/utils.rb:6 (lambda)>,
|
40
43
|
"events"=>
|
41
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fcde38d6298/lib/balanced/utils.rb:6 (lambda)>,
|
42
45
|
"order"=>
|
43
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde38cf3d0/lib/balanced/utils.rb:6 (lambda)>,
|
44
47
|
"refunds"=>
|
45
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde38c5498/lib/balanced/utils.rb:6 (lambda)>,
|
46
49
|
"source"=>
|
47
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde38bd900/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
48
51
|
|
49
52
|
% 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-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC7Lwi6mzKkqwXrIg5UY1BE9')
|
8
8
|
card.debit(
|
9
9
|
:amount => 5000,
|
10
10
|
:appears_on_statement_as => 'Statement text',
|
@@ -12,38 +12,41 @@ card.debit(
|
|
12
12
|
)
|
13
13
|
|
14
14
|
% elif mode == 'response':
|
15
|
-
#<Balanced::Debit:
|
15
|
+
#<Balanced::Debit:0x007fcde111ef70
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*Statement text",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-12-17T21:25:34.550152Z",
|
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/WD7M75BRYlRsQTImIHFf8O9W",
|
25
|
+
"id"=>"WD7M75BRYlRsQTImIHFf8O9W",
|
26
26
|
"links"=>
|
27
|
-
{"
|
27
|
+
{"card_hold"=>"HL7M4ZNQjlJRZhhMJGPBVCUM",
|
28
|
+
"customer"=>nil,
|
28
29
|
"dispute"=>nil,
|
29
30
|
"order"=>nil,
|
30
|
-
"source"=>"
|
31
|
+
"source"=>"CC7Lwi6mzKkqwXrIg5UY1BE9"},
|
31
32
|
"meta"=>{},
|
32
33
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
34
|
+
"transaction_number"=>"WMWY-ZDJ-0RIZ",
|
35
|
+
"updated_at"=>"2014-12-17T21:25:35.221519Z"},
|
35
36
|
@hyperlinks=
|
36
|
-
{"
|
37
|
-
#<Proc:
|
37
|
+
{"card_hold"=>
|
38
|
+
#<Proc:0x007fcde1115fb0/lib/balanced/resources/resource.rb:56 (lambda)>,
|
39
|
+
"customer"=>
|
40
|
+
#<Proc:0x007fcde1114610/lib/balanced/utils.rb:6 (lambda)>,
|
38
41
|
"dispute"=>
|
39
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde10fe158/lib/balanced/utils.rb:6 (lambda)>,
|
40
43
|
"events"=>
|
41
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fcde10f90b8/lib/balanced/utils.rb:6 (lambda)>,
|
42
45
|
"order"=>
|
43
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde1107320/lib/balanced/utils.rb:6 (lambda)>,
|
44
47
|
"refunds"=>
|
45
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde10e6d78/lib/balanced/utils.rb:6 (lambda)>,
|
46
49
|
"source"=>
|
47
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde10ce458/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
48
51
|
|
49
52
|
% 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-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC73IyzxPUu2z89NH8GrJhLn')
|
9
9
|
card.unstore
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
@@ -3,47 +3,50 @@ Balanced::CardHold.capture
|
|
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
|
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:0x007fcde10339d0
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-12-17T21:24:49.619850Z",
|
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/WD6XBI80Nwyl3IFdM5CktMwE",
|
25
|
+
"id"=>"WD6XBI80Nwyl3IFdM5CktMwE",
|
26
26
|
"links"=>
|
27
|
-
{"
|
27
|
+
{"card_hold"=>"HL6RKKEl9zNhtZGgnZaElcwU",
|
28
|
+
"customer"=>nil,
|
28
29
|
"dispute"=>nil,
|
29
30
|
"order"=>nil,
|
30
|
-
"source"=>"
|
31
|
+
"source"=>"CC6buB6OEtiIf7DMIKzpJ7k9"},
|
31
32
|
"meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
|
32
33
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
34
|
+
"transaction_number"=>"WCG4-HDE-UGM6",
|
35
|
+
"updated_at"=>"2014-12-17T21:24:50.054618Z"},
|
35
36
|
@hyperlinks=
|
36
|
-
{"
|
37
|
-
#<Proc:
|
37
|
+
{"card_hold"=>
|
38
|
+
#<Proc:0x007fcde101a980/lib/balanced/resources/resource.rb:56 (lambda)>,
|
39
|
+
"customer"=>
|
40
|
+
#<Proc:0x007fcde1013360/lib/balanced/utils.rb:6 (lambda)>,
|
38
41
|
"dispute"=>
|
39
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde10109d0/lib/balanced/utils.rb:6 (lambda)>,
|
40
43
|
"events"=>
|
41
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fcde08d07b0/lib/balanced/utils.rb:6 (lambda)>,
|
42
45
|
"order"=>
|
43
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde08c0810/lib/balanced/utils.rb:6 (lambda)>,
|
44
47
|
"refunds"=>
|
45
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde08a91b0/lib/balanced/utils.rb:6 (lambda)>,
|
46
49
|
"source"=>
|
47
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde089b1c8/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
48
51
|
|
49
52
|
% endif
|