balanced 1.0.beta1 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/LICENSE +2 -2
- data/balanced.gemspec +1 -1
- data/lib/balanced/resources.rb +1 -0
- data/lib/balanced/resources/customer.rb +0 -14
- data/lib/balanced/resources/dispute.rb +12 -0
- data/lib/balanced/version.rb +1 -1
- data/scenario.cache +142 -141
- data/scenarios/api_key_create/ruby.mako +6 -6
- data/scenarios/api_key_delete/ruby.mako +2 -2
- data/scenarios/api_key_list/ruby.mako +10 -10
- data/scenarios/api_key_show/ruby.mako +6 -6
- data/scenarios/bank_account_associate_to_customer/ruby.mako +13 -13
- data/scenarios/bank_account_create/ruby.mako +13 -13
- data/scenarios/bank_account_credit/ruby.mako +15 -15
- data/scenarios/bank_account_debit/ruby.mako +15 -15
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +22 -22
- data/scenarios/bank_account_show/ruby.mako +12 -12
- data/scenarios/bank_account_update/ruby.mako +12 -12
- data/scenarios/bank_account_verification_create/ruby.mako +9 -9
- data/scenarios/bank_account_verification_show/ruby.mako +9 -9
- data/scenarios/bank_account_verification_update/ruby.mako +9 -9
- data/scenarios/callback_create/ruby.mako +5 -4
- data/scenarios/callback_delete/ruby.mako +2 -2
- data/scenarios/callback_list/ruby.mako +4 -4
- data/scenarios/callback_show/ruby.mako +5 -5
- data/scenarios/card_associate_to_customer/ruby.mako +15 -15
- data/scenarios/card_create/ruby.mako +14 -14
- data/scenarios/card_debit/ruby.mako +16 -16
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +16 -16
- data/scenarios/card_hold_create/ruby.mako +16 -14
- data/scenarios/card_hold_list/ruby.mako +29 -25
- data/scenarios/card_hold_show/ruby.mako +16 -14
- data/scenarios/card_hold_update/ruby.mako +16 -14
- data/scenarios/card_hold_void/ruby.mako +16 -14
- data/scenarios/card_list/ruby.mako +24 -24
- data/scenarios/card_show/ruby.mako +13 -13
- data/scenarios/card_update/ruby.mako +13 -13
- data/scenarios/credit_list/ruby.mako +14 -14
- data/scenarios/credit_list_bank_account/ruby.mako +2 -2
- data/scenarios/credit_show/ruby.mako +15 -15
- data/scenarios/credit_update/ruby.mako +15 -15
- data/scenarios/customer_create/ruby.mako +19 -17
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +37 -33
- data/scenarios/customer_show/ruby.mako +20 -18
- data/scenarios/customer_update/ruby.mako +20 -18
- data/scenarios/debit_list/ruby.mako +28 -28
- data/scenarios/debit_show/ruby.mako +15 -15
- data/scenarios/debit_update/ruby.mako +15 -15
- data/scenarios/event_list/ruby.mako +67 -20
- data/scenarios/event_show/ruby.mako +23 -21
- data/scenarios/order_create/ruby.mako +14 -14
- data/scenarios/order_list/ruby.mako +13 -13
- data/scenarios/order_show/ruby.mako +14 -14
- data/scenarios/order_update/ruby.mako +14 -14
- data/scenarios/refund_create/ruby.mako +13 -13
- data/scenarios/refund_list/ruby.mako +12 -12
- data/scenarios/refund_show/ruby.mako +13 -13
- data/scenarios/refund_update/ruby.mako +13 -13
- data/scenarios/render_mako.rb +0 -1
- data/scenarios/reversal_create/ruby.mako +12 -12
- data/scenarios/reversal_list/ruby.mako +11 -11
- data/scenarios/reversal_show/ruby.mako +12 -12
- data/scenarios/reversal_update/ruby.mako +12 -12
- data/spec/balanced/resources/bank_account_spec.rb +0 -3
- data/spec/balanced/resources/debit_spec.rb +0 -13
- data/spec/balanced/resources/dispute_spec.rb +65 -0
- metadata +20 -18
- data/.rbenv-version +0 -1
@@ -3,9 +3,9 @@ Balanced::BankAccount.save
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
bank_account = Balanced::BankAccount.fetch('/bank_accounts/
|
8
|
+
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA58WYAEUMrEtAkW5KAvWo5V')
|
9
9
|
bank_account.meta = {
|
10
10
|
'facebook.user_id' => '0192837465',
|
11
11
|
'my-own-customer-id' => '12345',
|
@@ -14,7 +14,7 @@ bank_account.meta = {
|
|
14
14
|
bank_account.save
|
15
15
|
|
16
16
|
% elif mode == 'response':
|
17
|
-
#<Balanced::BankAccount:
|
17
|
+
#<Balanced::BankAccount:0x007ff2be1a93a8
|
18
18
|
@attributes=
|
19
19
|
{"account_number"=>"xxxxxx0001",
|
20
20
|
"account_type"=>"checking",
|
@@ -28,11 +28,11 @@ bank_account.save
|
|
28
28
|
"bank_name"=>"BANK OF AMERICA, N.A.",
|
29
29
|
"can_credit"=>true,
|
30
30
|
"can_debit"=>false,
|
31
|
-
"created_at"=>"2014-
|
31
|
+
"created_at"=>"2014-03-06T19:22:30.247406Z",
|
32
32
|
"fingerprint"=>
|
33
33
|
"5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14",
|
34
|
-
"href"=>"/bank_accounts/
|
35
|
-
"id"=>"
|
34
|
+
"href"=>"/bank_accounts/BA58WYAEUMrEtAkW5KAvWo5V",
|
35
|
+
"id"=>"BA58WYAEUMrEtAkW5KAvWo5V",
|
36
36
|
"links"=>{"bank_account_verification"=>nil, "customer"=>nil},
|
37
37
|
"meta"=>
|
38
38
|
{"facebook.user_id"=>"0192837465",
|
@@ -40,17 +40,17 @@ bank_account.save
|
|
40
40
|
"twitter.id"=>"1234987650"},
|
41
41
|
"name"=>"Johann Bernoulli",
|
42
42
|
"routing_number"=>"121000358",
|
43
|
-
"updated_at"=>"2014-
|
43
|
+
"updated_at"=>"2014-03-06T19:22:33.744499Z"},
|
44
44
|
@hyperlinks=
|
45
45
|
{"bank_account_verification"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007ff2bd88be10/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"bank_account_verifications"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007ff2bd8aa810/lib/balanced/utils.rb:6 (lambda)>,
|
49
49
|
"credits"=>
|
50
|
-
#<Proc:
|
50
|
+
#<Proc:0x007ff2bd8bb098/lib/balanced/utils.rb:6 (lambda)>,
|
51
51
|
"customer"=>
|
52
|
-
#<Proc:
|
52
|
+
#<Proc:0x007ff2bd8b9ec8/lib/balanced/utils.rb:6 (lambda)>,
|
53
53
|
"debits"=>
|
54
|
-
#<Proc:
|
54
|
+
#<Proc:0x007ff2bd8c1a38/lib/balanced/utils.rb:6 (lambda)>}>
|
55
55
|
|
56
56
|
% endif
|
@@ -3,26 +3,26 @@
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
bank_account = Balanced::BankAccount.fetch('/bank_accounts/
|
8
|
+
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA50LpPrCTB63Ecm0wEgdOQM')
|
9
9
|
verification = bank_account.verify
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
12
|
-
#<Balanced::BankAccountVerification:
|
12
|
+
#<Balanced::BankAccountVerification:0x007ff2bd9290e8
|
13
13
|
@attributes=
|
14
14
|
{"attempts"=>0,
|
15
15
|
"attempts_remaining"=>3,
|
16
|
-
"created_at"=>"2014-
|
16
|
+
"created_at"=>"2014-03-06T19:22:24.651572Z",
|
17
17
|
"deposit_status"=>"succeeded",
|
18
|
-
"href"=>"/verifications/
|
19
|
-
"id"=>"
|
20
|
-
"links"=>{"bank_account"=>"
|
18
|
+
"href"=>"/verifications/BZ5alC0fajkuBOvOU7lVT7QJ",
|
19
|
+
"id"=>"BZ5alC0fajkuBOvOU7lVT7QJ",
|
20
|
+
"links"=>{"bank_account"=>"BA50LpPrCTB63Ecm0wEgdOQM"},
|
21
21
|
"meta"=>{},
|
22
|
-
"updated_at"=>"2014-
|
22
|
+
"updated_at"=>"2014-03-06T19:22:25.233126Z",
|
23
23
|
"verification_status"=>"pending"},
|
24
24
|
@hyperlinks=
|
25
25
|
{"bank_account"=>
|
26
|
-
#<Proc:
|
26
|
+
#<Proc:0x007ff2bc8a70d0/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
27
27
|
|
28
28
|
% endif
|
@@ -3,25 +3,25 @@ Balanced::Verification.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
verification = Balanced::Verification.fetch('/verifications/
|
8
|
+
verification = Balanced::Verification.fetch('/verifications/BZ5alC0fajkuBOvOU7lVT7QJ')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::BankAccountVerification:
|
11
|
+
#<Balanced::BankAccountVerification:0x007ff2bd93a6b8
|
12
12
|
@attributes=
|
13
13
|
{"attempts"=>0,
|
14
14
|
"attempts_remaining"=>3,
|
15
|
-
"created_at"=>"2014-
|
15
|
+
"created_at"=>"2014-03-06T19:22:24.651572Z",
|
16
16
|
"deposit_status"=>"succeeded",
|
17
|
-
"href"=>"/verifications/
|
18
|
-
"id"=>"
|
19
|
-
"links"=>{"bank_account"=>"
|
17
|
+
"href"=>"/verifications/BZ5alC0fajkuBOvOU7lVT7QJ",
|
18
|
+
"id"=>"BZ5alC0fajkuBOvOU7lVT7QJ",
|
19
|
+
"links"=>{"bank_account"=>"BA50LpPrCTB63Ecm0wEgdOQM"},
|
20
20
|
"meta"=>{},
|
21
|
-
"updated_at"=>"2014-
|
21
|
+
"updated_at"=>"2014-03-06T19:22:25.233126Z",
|
22
22
|
"verification_status"=>"pending"},
|
23
23
|
@hyperlinks=
|
24
24
|
{"bank_account"=>
|
25
|
-
#<Proc:
|
25
|
+
#<Proc:0x007ff2bd942250/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
26
26
|
|
27
27
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::Verification.confirm
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
verification = Balanced::Verification.fetch('/verifications/
|
8
|
+
verification = Balanced::Verification.fetch('/verifications/BZ5alC0fajkuBOvOU7lVT7QJ')
|
9
9
|
verification.confirm(
|
10
10
|
amount_1 = 1,
|
11
11
|
amount_2 = 1
|
@@ -13,20 +13,20 @@ verification.confirm(
|
|
13
13
|
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::BankAccountVerification:
|
16
|
+
#<Balanced::BankAccountVerification:0x007ff2bd958938
|
17
17
|
@attributes=
|
18
18
|
{"attempts"=>1,
|
19
19
|
"attempts_remaining"=>2,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-03-06T19:22:24.651572Z",
|
21
21
|
"deposit_status"=>"succeeded",
|
22
|
-
"href"=>"/verifications/
|
23
|
-
"id"=>"
|
24
|
-
"links"=>{"bank_account"=>"
|
22
|
+
"href"=>"/verifications/BZ5alC0fajkuBOvOU7lVT7QJ",
|
23
|
+
"id"=>"BZ5alC0fajkuBOvOU7lVT7QJ",
|
24
|
+
"links"=>{"bank_account"=>"BA50LpPrCTB63Ecm0wEgdOQM"},
|
25
25
|
"meta"=>{},
|
26
|
-
"updated_at"=>"2014-
|
26
|
+
"updated_at"=>"2014-03-06T19:22:27.893114Z",
|
27
27
|
"verification_status"=>"succeeded"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"bank_account"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007ff2bd95a260/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
31
31
|
|
32
32
|
% endif
|
@@ -2,17 +2,18 @@
|
|
2
2
|
Balanced::Callback.new
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
6
6
|
|
7
7
|
callback = Balanced::Callback.new(
|
8
|
+
:method => 'post',
|
8
9
|
:url => 'http://www.example.com/callback'
|
9
10
|
).save
|
10
11
|
|
11
12
|
% elif mode == 'response':
|
12
|
-
#<Balanced::Callback:
|
13
|
+
#<Balanced::Callback:0x007ff2bd972b08
|
13
14
|
@attributes=
|
14
|
-
{"href"=>"/callbacks/
|
15
|
-
"id"=>"
|
15
|
+
{"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
|
16
|
+
"id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
|
16
17
|
"links"=>{},
|
17
18
|
"method"=>"post",
|
18
19
|
"revision"=>"1.1",
|
@@ -3,9 +3,9 @@ Balanced::Callback.unstore
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
callback = Balanced::Callback.fetch('/callbacks/
|
8
|
+
callback = Balanced::Callback.fetch('/callbacks/CB5pnz4XnaDpRFGlNMb6u50R')
|
9
9
|
callback.unstore
|
10
10
|
% elif mode == 'response':
|
11
11
|
|
@@ -3,14 +3,14 @@ Balanced::Callback.all
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
8
|
callbacks = Balanced::Callback.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Callback:
|
10
|
+
[#<Balanced::Callback:0x007ff2bd9948e8
|
11
11
|
@attributes=
|
12
|
-
{"href"=>"/callbacks/
|
13
|
-
"id"=>"
|
12
|
+
{"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
|
13
|
+
"id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
|
14
14
|
"links"=>{},
|
15
15
|
"method"=>"post",
|
16
16
|
"revision"=>"1.1",
|
@@ -3,14 +3,14 @@ Balanced::Callback.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
callback = Balanced::Callback.fetch('/callbacks/
|
8
|
+
callback = Balanced::Callback.fetch('/callbacks/CB5pnz4XnaDpRFGlNMb6u50R')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Callback:
|
10
|
+
#<Balanced::Callback:0x007ff2bd99d628
|
11
11
|
@attributes=
|
12
|
-
{"href"=>"/callbacks/
|
13
|
-
"id"=>"
|
12
|
+
{"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
|
13
|
+
"id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
|
14
14
|
"links"=>{},
|
15
15
|
"method"=>"post",
|
16
16
|
"revision"=>"1.1",
|
@@ -3,13 +3,13 @@ Balanced::Customer.add_card
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
9
|
-
card.associate_to_customer('/customers/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC68IoCVpoFlkugB7xt52p8C')
|
9
|
+
card.associate_to_customer('/customers/CU64R7DS6DwuXYVg9RTskFK8')
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
12
|
-
#<Balanced::Card:
|
12
|
+
#<Balanced::Card:0x007ff2bd9b7190
|
13
13
|
@attributes=
|
14
14
|
{"address"=>
|
15
15
|
{"city"=>nil,
|
@@ -22,28 +22,28 @@ card.associate_to_customer('/customers/CU3eeasZ9yQ86uzzIYZkrPGg')
|
|
22
22
|
"avs_result"=>nil,
|
23
23
|
"avs_street_match"=>nil,
|
24
24
|
"brand"=>"MasterCard",
|
25
|
-
"created_at"=>"2014-
|
26
|
-
"cvv"=>
|
27
|
-
"cvv_match"=>
|
28
|
-
"cvv_result"=>
|
25
|
+
"created_at"=>"2014-03-06T19:23:25.159503Z",
|
26
|
+
"cvv"=>"xxx",
|
27
|
+
"cvv_match"=>"yes",
|
28
|
+
"cvv_result"=>"Match",
|
29
29
|
"expiration_month"=>12,
|
30
30
|
"expiration_year"=>2020,
|
31
31
|
"fingerprint"=>
|
32
32
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
33
|
-
"href"=>"/cards/
|
34
|
-
"id"=>"
|
33
|
+
"href"=>"/cards/CC68IoCVpoFlkugB7xt52p8C",
|
34
|
+
"id"=>"CC68IoCVpoFlkugB7xt52p8C",
|
35
35
|
"is_verified"=>true,
|
36
|
-
"links"=>{"customer"=>"
|
36
|
+
"links"=>{"customer"=>"CU64R7DS6DwuXYVg9RTskFK8"},
|
37
37
|
"meta"=>{},
|
38
38
|
"name"=>nil,
|
39
39
|
"number"=>"xxxxxxxxxxxx5100",
|
40
|
-
"updated_at"=>"2014-
|
40
|
+
"updated_at"=>"2014-03-06T19:23:25.633918Z"},
|
41
41
|
@hyperlinks=
|
42
42
|
{"card_holds"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007ff2bc113940/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"customer"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007ff2bc111488/lib/balanced/resources/resource.rb:60 (lambda)>,
|
46
46
|
"debits"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007ff2bc123408/lib/balanced/utils.rb:6 (lambda)>}>
|
48
48
|
|
49
49
|
% endif
|
@@ -3,17 +3,17 @@ Balanced::Card.new
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
8
|
card = Balanced::Card.new(
|
9
|
+
:cvv => '123',
|
9
10
|
:expiration_month => '12',
|
10
11
|
:expiration_year => '2020',
|
11
|
-
:number => '5105105105105100'
|
12
|
-
:security_code => '123'
|
12
|
+
:number => '5105105105105100'
|
13
13
|
).save
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::Card:
|
16
|
+
#<Balanced::Card:0x007ff2bd9dc800
|
17
17
|
@attributes=
|
18
18
|
{"address"=>
|
19
19
|
{"city"=>nil,
|
@@ -26,28 +26,28 @@ card = Balanced::Card.new(
|
|
26
26
|
"avs_result"=>nil,
|
27
27
|
"avs_street_match"=>nil,
|
28
28
|
"brand"=>"MasterCard",
|
29
|
-
"created_at"=>"2014-
|
30
|
-
"cvv"=>
|
31
|
-
"cvv_match"=>
|
32
|
-
"cvv_result"=>
|
29
|
+
"created_at"=>"2014-03-06T19:23:25.159503Z",
|
30
|
+
"cvv"=>"xxx",
|
31
|
+
"cvv_match"=>"yes",
|
32
|
+
"cvv_result"=>"Match",
|
33
33
|
"expiration_month"=>12,
|
34
34
|
"expiration_year"=>2020,
|
35
35
|
"fingerprint"=>
|
36
36
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
37
|
-
"href"=>"/cards/
|
38
|
-
"id"=>"
|
37
|
+
"href"=>"/cards/CC68IoCVpoFlkugB7xt52p8C",
|
38
|
+
"id"=>"CC68IoCVpoFlkugB7xt52p8C",
|
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-03-06T19:23:25.159506Z"},
|
45
45
|
@hyperlinks=
|
46
46
|
{"card_holds"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007ff2bc8ad0e8/lib/balanced/utils.rb:6 (lambda)>,
|
48
48
|
"customer"=>
|
49
|
-
#<Proc:
|
49
|
+
#<Proc:0x007ff2bc12a550/lib/balanced/utils.rb:6 (lambda)>,
|
50
50
|
"debits"=>
|
51
|
-
#<Proc:
|
51
|
+
#<Proc:0x007ff2bd9febf8/lib/balanced/utils.rb:6 (lambda)>}>
|
52
52
|
|
53
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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
6
6
|
|
7
|
-
card = Balanced::Card.fetch('/cards/
|
7
|
+
card = Balanced::Card.fetch('/cards/CC68IoCVpoFlkugB7xt52p8C')
|
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:0x007ff2bda14cf0
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*Statement text",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-03-06T19:23:44.148512Z",
|
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/WD6BKYhbRzlRhfKSE1DcpqS5",
|
25
|
+
"id"=>"WD6BKYhbRzlRhfKSE1DcpqS5",
|
26
26
|
"links"=>
|
27
|
-
{"customer"=>"
|
27
|
+
{"customer"=>"CU64R7DS6DwuXYVg9RTskFK8",
|
28
28
|
"dispute"=>nil,
|
29
29
|
"order"=>nil,
|
30
|
-
"source"=>"
|
30
|
+
"source"=>"CC68IoCVpoFlkugB7xt52p8C"},
|
31
31
|
"meta"=>{},
|
32
32
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
33
|
+
"transaction_number"=>"W274-713-3734",
|
34
|
+
"updated_at"=>"2014-03-06T19:23:45.554127Z"},
|
35
35
|
@hyperlinks=
|
36
36
|
{"customer"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007ff2bda1e958/lib/balanced/resources/resource.rb:60 (lambda)>,
|
38
38
|
"dispute"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007ff2bda1de68/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"events"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007ff2bc14b660/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"order"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007ff2bc1495e0/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"refunds"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007ff2bc1528e8/lib/balanced/utils.rb:6 (lambda)>,
|
46
46
|
"source"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007ff2bc150b38/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
48
48
|
|
49
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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC5Buki6e4Kg4bDVZ3OSfQ8O')
|
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-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL5wAfv8JaMsEn9idXrLZZZT')
|
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:0x007ff2bdaa68f8
|
16
16
|
@attributes=
|
17
17
|
{"amount"=>5000,
|
18
18
|
"appears_on_statement_as"=>"BAL*ShowsUpOnStmt",
|
19
|
-
"created_at"=>"2014-
|
19
|
+
"created_at"=>"2014-03-06T19:22:49.584629Z",
|
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/WD5Co9XwRZJg1QtvC5QeekhX",
|
25
|
+
"id"=>"WD5Co9XwRZJg1QtvC5QeekhX",
|
26
26
|
"links"=>
|
27
|
-
{"customer"=>"
|
27
|
+
{"customer"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
|
28
28
|
"dispute"=>nil,
|
29
29
|
"order"=>nil,
|
30
|
-
"source"=>"
|
30
|
+
"source"=>"CC5nCSU0yFp3qxR4p6UZST7y"},
|
31
31
|
"meta"=>{"holding.for"=>"user1", "meaningful.key"=>"some.value"},
|
32
32
|
"status"=>"succeeded",
|
33
|
-
"transaction_number"=>"
|
34
|
-
"updated_at"=>"2014-
|
33
|
+
"transaction_number"=>"W493-697-4873",
|
34
|
+
"updated_at"=>"2014-03-06T19:22:50.608819Z"},
|
35
35
|
@hyperlinks=
|
36
36
|
{"customer"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007ff2bdaa40d0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
38
38
|
"dispute"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007ff2bdaaf5c0/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"events"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007ff2bdaad400/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"order"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007ff2bdaac730/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"refunds"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007ff2bdab4f98/lib/balanced/utils.rb:6 (lambda)>,
|
46
46
|
"source"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007ff2bdabd9e0/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
48
48
|
|
49
49
|
% endif
|