balanced 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -0
- data/balanced.gemspec +1 -1
- data/lib/balanced/client.rb +1 -2
- data/lib/balanced/error.rb +3 -3
- data/lib/balanced/resources/card.rb +15 -1
- 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/ruby.mako +14 -14
- 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/definition.rb +1 -1
- data/scenarios/bank_account_verification_create/ruby.mako +10 -10
- data/scenarios/bank_account_verification_show/definition.rb +1 -1
- data/scenarios/bank_account_verification_show/request.rb +1 -1
- data/scenarios/bank_account_verification_show/ruby.mako +10 -10
- data/scenarios/bank_account_verification_update/definition.rb +1 -1
- data/scenarios/bank_account_verification_update/request.rb +1 -1
- data/scenarios/bank_account_verification_update/ruby.mako +10 -10
- 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 +21 -12
- data/scenarios/card_create/ruby.mako +18 -9
- data/scenarios/card_create_creditable/definition.rb +1 -0
- data/scenarios/card_create_creditable/request.rb +4 -0
- data/scenarios/card_create_creditable/ruby.mako +62 -0
- data/scenarios/card_create_dispute/ruby.mako +18 -9
- data/scenarios/card_credit/definition.rb +1 -0
- data/scenarios/card_credit/request.rb +5 -0
- data/scenarios/card_credit/ruby.mako +43 -0
- data/scenarios/card_debit/ruby.mako +16 -16
- data/scenarios/card_debit_dispute/ruby.mako +15 -15
- 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/ruby.mako +15 -15
- data/scenarios/card_list/ruby.mako +36 -18
- data/scenarios/card_show/ruby.mako +19 -10
- data/scenarios/card_update/ruby.mako +19 -10
- data/scenarios/credit_list/ruby.mako +14 -14
- data/scenarios/credit_list_bank_account/ruby.mako +2 -2
- data/scenarios/credit_order/definition.rb +1 -0
- data/scenarios/credit_order/request.rb +7 -0
- data/scenarios/credit_order/ruby.mako +26 -0
- data/scenarios/credit_show/ruby.mako +15 -15
- data/scenarios/credit_update/ruby.mako +15 -15
- data/scenarios/customer_create/ruby.mako +20 -18
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +39 -35
- data/scenarios/customer_show/ruby.mako +21 -19
- data/scenarios/customer_update/ruby.mako +21 -19
- data/scenarios/debit_dispute_show/ruby.mako +12 -12
- data/scenarios/debit_list/ruby.mako +34 -34
- data/scenarios/debit_order/definition.rb +1 -0
- data/scenarios/debit_order/request.rb +7 -0
- data/scenarios/debit_order/ruby.mako +49 -0
- data/scenarios/debit_show/ruby.mako +16 -16
- data/scenarios/debit_update/ruby.mako +16 -16
- data/scenarios/dispute_list/ruby.mako +11 -11
- data/scenarios/dispute_show/ruby.mako +12 -12
- data/scenarios/event_list/ruby.mako +56 -55
- data/scenarios/event_show/ruby.mako +41 -35
- data/scenarios/order_create/ruby.mako +14 -14
- data/scenarios/order_list/ruby.mako +45 -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 +1 -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/card_spec.rb +73 -11
- data/spec/balanced/resources/credit_spec.rb +155 -26
- data/spec/balanced/response/balanced_exception_middleware_spec.rb +1 -2
- data/spec/spec_helper.rb +3 -1
- metadata +22 -4
@@ -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-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
8
|
holds = Balanced::CardHold.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::CardHold:
|
10
|
+
[#<Balanced::CardHold:0x007fa7d314e920
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-05-15T00:39:39.384771Z",
|
14
14
|
"currency"=>"USD",
|
15
15
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
16
|
-
"expires_at"=>"2014-05-
|
16
|
+
"expires_at"=>"2014-05-22T00:39:39.775030Z",
|
17
17
|
"failure_reason"=>nil,
|
18
18
|
"failure_reason_code"=>nil,
|
19
|
-
"href"=>"/card_holds/
|
20
|
-
"id"=>"
|
21
|
-
"links"=>{"card"=>"
|
19
|
+
"href"=>"/card_holds/HL363Kap0nkbuV050V9DHpjf",
|
20
|
+
"id"=>"HL363Kap0nkbuV050V9DHpjf",
|
21
|
+
"links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
|
22
22
|
"meta"=>{},
|
23
23
|
"status"=>"succeeded",
|
24
|
-
"transaction_number"=>"
|
25
|
-
"updated_at"=>"2014-
|
24
|
+
"transaction_number"=>"HL376-078-9747",
|
25
|
+
"updated_at"=>"2014-05-15T00:39:40.103344Z",
|
26
26
|
"voided_at"=>nil},
|
27
27
|
@hyperlinks=
|
28
28
|
{"card"=>
|
29
|
-
#<Proc:
|
29
|
+
#<Proc:0x007fa7d314c9e0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
30
30
|
"debit"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007fa7d314e358/lib/balanced/utils.rb:6 (lambda)>,
|
32
32
|
"debits"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fa7d3149c40/lib/balanced/utils.rb:6 (lambda)>,
|
34
34
|
"events"=>
|
35
|
-
#<Proc:
|
36
|
-
#<Balanced::CardHold:
|
35
|
+
#<Proc:0x007fa7d3147af8/lib/balanced/utils.rb:6 (lambda)>}>,
|
36
|
+
#<Balanced::CardHold:0x007fa7d3147aa8
|
37
37
|
@attributes=
|
38
38
|
{"amount"=>10000000,
|
39
|
-
"created_at"=>"2014-
|
39
|
+
"created_at"=>"2014-05-15T00:38:09.797065Z",
|
40
40
|
"currency"=>"USD",
|
41
41
|
"description"=>nil,
|
42
|
-
"expires_at"=>"2014-05-
|
42
|
+
"expires_at"=>"2014-05-22T00:38:10.721627Z",
|
43
43
|
"failure_reason"=>nil,
|
44
44
|
"failure_reason_code"=>nil,
|
45
|
-
"href"=>"/card_holds/
|
46
|
-
"id"=>"
|
45
|
+
"href"=>"/card_holds/HL1tiQ6q1MB2h7L4RjznIibT",
|
46
|
+
"id"=>"HL1tiQ6q1MB2h7L4RjznIibT",
|
47
47
|
"links"=>
|
48
|
-
{"card"=>"
|
48
|
+
{"card"=>"CC1rSjzxK321d4qkS81yg4zf", "debit"=>"WD1tD4DVB1YM8LnsmmZ5GEHL"},
|
49
49
|
"meta"=>{},
|
50
50
|
"status"=>"succeeded",
|
51
|
-
"transaction_number"=>"
|
52
|
-
"updated_at"=>"2014-
|
51
|
+
"transaction_number"=>"HL330-466-8498",
|
52
|
+
"updated_at"=>"2014-05-15T00:38:16.149117Z",
|
53
53
|
"voided_at"=>nil},
|
54
54
|
@hyperlinks=
|
55
55
|
{"card"=>
|
56
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fa7d3145ac8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
57
57
|
"debit"=>
|
58
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fa7d3147d28/lib/balanced/resources/resource.rb:60 (lambda)>,
|
59
59
|
"debits"=>
|
60
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fa7d3141ba8/lib/balanced/utils.rb:6 (lambda)>,
|
61
61
|
"events"=>
|
62
|
-
#<Proc:
|
62
|
+
#<Proc:0x007fa7d313f9e8/lib/balanced/utils.rb:6 (lambda)>}>]
|
63
63
|
|
64
64
|
% endif
|
@@ -3,36 +3,36 @@ Balanced::CardHold.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL363Kap0nkbuV050V9DHpjf')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::CardHold:
|
11
|
+
#<Balanced::CardHold:0x007fa7d31ec468
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-05-15T00:39:39.384771Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
|
-
"expires_at"=>"2014-05-
|
17
|
+
"expires_at"=>"2014-05-22T00:39:39.775030Z",
|
18
18
|
"failure_reason"=>nil,
|
19
19
|
"failure_reason_code"=>nil,
|
20
|
-
"href"=>"/card_holds/
|
21
|
-
"id"=>"
|
22
|
-
"links"=>{"card"=>"
|
20
|
+
"href"=>"/card_holds/HL363Kap0nkbuV050V9DHpjf",
|
21
|
+
"id"=>"HL363Kap0nkbuV050V9DHpjf",
|
22
|
+
"links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
|
23
23
|
"meta"=>{},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
25
|
+
"transaction_number"=>"HL376-078-9747",
|
26
|
+
"updated_at"=>"2014-05-15T00:39:40.103344Z",
|
27
27
|
"voided_at"=>nil},
|
28
28
|
@hyperlinks=
|
29
29
|
{"card"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa7d33b6460/lib/balanced/resources/resource.rb:60 (lambda)>,
|
31
31
|
"debit"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa7d33b5768/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa7d33b2cc0/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa7d33b08d0/lib/balanced/utils.rb:6 (lambda)>}>
|
37
37
|
|
38
38
|
% 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-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL363Kap0nkbuV050V9DHpjf')
|
9
9
|
card_hold.description = 'update this description'
|
10
10
|
card_hold.meta = {
|
11
11
|
'holding.for' => 'user1',
|
@@ -14,31 +14,31 @@ card_hold.meta = {
|
|
14
14
|
card_hold.save
|
15
15
|
|
16
16
|
% elif mode == 'response':
|
17
|
-
#<Balanced::CardHold:
|
17
|
+
#<Balanced::CardHold:0x007fa7d3391ca0
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>5000,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-05-15T00:39:39.384771Z",
|
21
21
|
"currency"=>"USD",
|
22
22
|
"description"=>"update this description",
|
23
|
-
"expires_at"=>"2014-05-
|
23
|
+
"expires_at"=>"2014-05-22T00:39:39.775030Z",
|
24
24
|
"failure_reason"=>nil,
|
25
25
|
"failure_reason_code"=>nil,
|
26
|
-
"href"=>"/card_holds/
|
27
|
-
"id"=>"
|
28
|
-
"links"=>{"card"=>"
|
26
|
+
"href"=>"/card_holds/HL363Kap0nkbuV050V9DHpjf",
|
27
|
+
"id"=>"HL363Kap0nkbuV050V9DHpjf",
|
28
|
+
"links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>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"=>"HL376-078-9747",
|
32
|
+
"updated_at"=>"2014-05-15T00:39:44.237965Z",
|
33
33
|
"voided_at"=>nil},
|
34
34
|
@hyperlinks=
|
35
35
|
{"card"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa7d338f6a8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
37
37
|
"debit"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa7d338e690/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"debits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa7d338b788/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"events"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa7d3389690/lib/balanced/utils.rb:6 (lambda)>}>
|
43
43
|
|
44
44
|
% endif
|
@@ -3,36 +3,36 @@ Balanced::CardHold.unstore
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL3GI4qAmsr7ZdOzUgVuzmOF')
|
9
9
|
card_hold.unstore
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::CardHold:
|
11
|
+
#<Balanced::CardHold:0x007fa7d3370230
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-05-15T00:40:11.970823Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
|
-
"expires_at"=>"2014-05-
|
17
|
+
"expires_at"=>"2014-05-22T00:40:17.141216Z",
|
18
18
|
"failure_reason"=>nil,
|
19
19
|
"failure_reason_code"=>nil,
|
20
|
-
"href"=>"/card_holds/
|
21
|
-
"id"=>"
|
22
|
-
"links"=>{"card"=>"
|
20
|
+
"href"=>"/card_holds/HL3GI4qAmsr7ZdOzUgVuzmOF",
|
21
|
+
"id"=>"HL3GI4qAmsr7ZdOzUgVuzmOF",
|
22
|
+
"links"=>{"card"=>"CC35aRYQB8XnL0CxtKGFG7d3", "debit"=>nil},
|
23
23
|
"meta"=>{},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
27
|
-
"voided_at"=>"2014-
|
25
|
+
"transaction_number"=>"HL069-470-2887",
|
26
|
+
"updated_at"=>"2014-05-15T00:40:27.177705Z",
|
27
|
+
"voided_at"=>"2014-05-15T00:40:27.177708Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"card"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa7d336a448/lib/balanced/resources/resource.rb:60 (lambda)>,
|
31
31
|
"debit"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa7d3369ac0/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa7d3363a30/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa7d3361a28/lib/balanced/utils.rb:6 (lambda)>}>
|
37
37
|
|
38
38
|
% 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-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
6
6
|
|
7
7
|
cards = Balanced::Card.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Card:
|
9
|
+
[#<Balanced::Card:0x007fa7d3349590
|
10
10
|
@attributes=
|
11
11
|
{"address"=>
|
12
12
|
{"city"=>nil,
|
@@ -18,8 +18,12 @@ cards = Balanced::Card.all
|
|
18
18
|
"avs_postal_match"=>nil,
|
19
19
|
"avs_result"=>nil,
|
20
20
|
"avs_street_match"=>nil,
|
21
|
+
"bank"=>"BANK OF HAWAII",
|
21
22
|
"brand"=>"MasterCard",
|
22
|
-
"
|
23
|
+
"can_credit"=>false,
|
24
|
+
"can_debit"=>true,
|
25
|
+
"category"=>nil,
|
26
|
+
"created_at"=>"2014-05-15T00:40:43.949061Z",
|
23
27
|
"cvv"=>"xxx",
|
24
28
|
"cvv_match"=>"yes",
|
25
29
|
"cvv_result"=>"Match",
|
@@ -27,22 +31,27 @@ cards = Balanced::Card.all
|
|
27
31
|
"expiration_year"=>2020,
|
28
32
|
"fingerprint"=>
|
29
33
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
30
|
-
"href"=>"/cards/
|
31
|
-
"id"=>"
|
34
|
+
"href"=>"/cards/CC4gG6BE70pMOYKPBive9qoF",
|
35
|
+
"id"=>"CC4gG6BE70pMOYKPBive9qoF",
|
32
36
|
"is_verified"=>true,
|
33
37
|
"links"=>{"customer"=>nil},
|
34
38
|
"meta"=>{},
|
35
39
|
"name"=>nil,
|
36
40
|
"number"=>"xxxxxxxxxxxx5100",
|
37
|
-
"
|
41
|
+
"type"=>"",
|
42
|
+
"updated_at"=>"2014-05-15T00:40:43.949064Z"},
|
38
43
|
@hyperlinks=
|
39
44
|
{"card_holds"=>
|
40
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa7d3346bb0/lib/balanced/utils.rb:6 (lambda)>,
|
46
|
+
"credits"=>
|
47
|
+
#<Proc:0x007fa7d3343af0/lib/balanced/utils.rb:6 (lambda)>,
|
41
48
|
"customer"=>
|
42
|
-
#<Proc:
|
49
|
+
#<Proc:0x007fa7d3343140/lib/balanced/utils.rb:6 (lambda)>,
|
43
50
|
"debits"=>
|
44
|
-
#<Proc:
|
45
|
-
|
51
|
+
#<Proc:0x007fa7d3341278/lib/balanced/utils.rb:6 (lambda)>,
|
52
|
+
"disputes"=>
|
53
|
+
#<Proc:0x007fa7d333b0a8/lib/balanced/utils.rb:6 (lambda)>}>,
|
54
|
+
#<Balanced::Card:0x007fa7d333b058
|
46
55
|
@attributes=
|
47
56
|
{"address"=>
|
48
57
|
{"city"=>nil,
|
@@ -54,8 +63,12 @@ cards = Balanced::Card.all
|
|
54
63
|
"avs_postal_match"=>nil,
|
55
64
|
"avs_result"=>nil,
|
56
65
|
"avs_street_match"=>nil,
|
66
|
+
"bank"=>"BANK OF HAWAII",
|
57
67
|
"brand"=>"MasterCard",
|
58
|
-
"
|
68
|
+
"can_credit"=>false,
|
69
|
+
"can_debit"=>true,
|
70
|
+
"category"=>nil,
|
71
|
+
"created_at"=>"2014-05-15T00:39:38.599386Z",
|
59
72
|
"cvv"=>"xxx",
|
60
73
|
"cvv_match"=>"yes",
|
61
74
|
"cvv_result"=>"Match",
|
@@ -63,20 +76,25 @@ cards = Balanced::Card.all
|
|
63
76
|
"expiration_year"=>2020,
|
64
77
|
"fingerprint"=>
|
65
78
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
66
|
-
"href"=>"/cards/
|
67
|
-
"id"=>"
|
79
|
+
"href"=>"/cards/CC35aRYQB8XnL0CxtKGFG7d3",
|
80
|
+
"id"=>"CC35aRYQB8XnL0CxtKGFG7d3",
|
68
81
|
"is_verified"=>true,
|
69
|
-
"links"=>{"customer"=>
|
82
|
+
"links"=>{"customer"=>nil},
|
70
83
|
"meta"=>{},
|
71
84
|
"name"=>nil,
|
72
85
|
"number"=>"xxxxxxxxxxxx5100",
|
73
|
-
"
|
86
|
+
"type"=>"",
|
87
|
+
"updated_at"=>"2014-05-15T00:39:38.599390Z"},
|
74
88
|
@hyperlinks=
|
75
89
|
{"card_holds"=>
|
76
|
-
#<Proc:
|
90
|
+
#<Proc:0x007fa7d3338e98/lib/balanced/utils.rb:6 (lambda)>,
|
91
|
+
"credits"=>
|
92
|
+
#<Proc:0x007fa7d3332f98/lib/balanced/utils.rb:6 (lambda)>,
|
77
93
|
"customer"=>
|
78
|
-
#<Proc:
|
94
|
+
#<Proc:0x007fa7d3332598/lib/balanced/utils.rb:6 (lambda)>,
|
79
95
|
"debits"=>
|
80
|
-
#<Proc:
|
96
|
+
#<Proc:0x007fa7d3330040/lib/balanced/utils.rb:6 (lambda)>,
|
97
|
+
"disputes"=>
|
98
|
+
#<Proc:0x007fa7d3329920/lib/balanced/utils.rb:6 (lambda)>}>]
|
81
99
|
|
82
100
|
% endif
|
@@ -3,11 +3,11 @@ Balanced::Card.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC4gG6BE70pMOYKPBive9qoF')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Card:
|
10
|
+
#<Balanced::Card:0x007fa7d32ed1c8
|
11
11
|
@attributes=
|
12
12
|
{"address"=>
|
13
13
|
{"city"=>nil,
|
@@ -19,8 +19,12 @@ card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
|
|
19
19
|
"avs_postal_match"=>nil,
|
20
20
|
"avs_result"=>nil,
|
21
21
|
"avs_street_match"=>nil,
|
22
|
+
"bank"=>"BANK OF HAWAII",
|
22
23
|
"brand"=>"MasterCard",
|
23
|
-
"
|
24
|
+
"can_credit"=>false,
|
25
|
+
"can_debit"=>true,
|
26
|
+
"category"=>nil,
|
27
|
+
"created_at"=>"2014-05-15T00:40:43.949061Z",
|
24
28
|
"cvv"=>"xxx",
|
25
29
|
"cvv_match"=>"yes",
|
26
30
|
"cvv_result"=>"Match",
|
@@ -28,20 +32,25 @@ card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
|
|
28
32
|
"expiration_year"=>2020,
|
29
33
|
"fingerprint"=>
|
30
34
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
31
|
-
"href"=>"/cards/
|
32
|
-
"id"=>"
|
35
|
+
"href"=>"/cards/CC4gG6BE70pMOYKPBive9qoF",
|
36
|
+
"id"=>"CC4gG6BE70pMOYKPBive9qoF",
|
33
37
|
"is_verified"=>true,
|
34
38
|
"links"=>{"customer"=>nil},
|
35
39
|
"meta"=>{},
|
36
40
|
"name"=>nil,
|
37
41
|
"number"=>"xxxxxxxxxxxx5100",
|
38
|
-
"
|
42
|
+
"type"=>"",
|
43
|
+
"updated_at"=>"2014-05-15T00:40:43.949064Z"},
|
39
44
|
@hyperlinks=
|
40
45
|
{"card_holds"=>
|
41
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fa7d32ea770/lib/balanced/utils.rb:6 (lambda)>,
|
47
|
+
"credits"=>
|
48
|
+
#<Proc:0x007fa7d32e8628/lib/balanced/utils.rb:6 (lambda)>,
|
42
49
|
"customer"=>
|
43
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fa7d32e7bb0/lib/balanced/utils.rb:6 (lambda)>,
|
44
51
|
"debits"=>
|
45
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fa7d32e5c70/lib/balanced/utils.rb:6 (lambda)>,
|
53
|
+
"disputes"=>
|
54
|
+
#<Proc:0x007fa7d32b3478/lib/balanced/utils.rb:6 (lambda)>}>
|
46
55
|
|
47
56
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::Card.save
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC4gG6BE70pMOYKPBive9qoF')
|
9
9
|
card.meta = {
|
10
10
|
'facebook.user_id' => '0192837465',
|
11
11
|
'my-own-customer-id' => '12345',
|
@@ -14,7 +14,7 @@ card.meta = {
|
|
14
14
|
card.save
|
15
15
|
|
16
16
|
% elif mode == 'response':
|
17
|
-
#<Balanced::Card:
|
17
|
+
#<Balanced::Card:0x007fa7d4216410
|
18
18
|
@attributes=
|
19
19
|
{"address"=>
|
20
20
|
{"city"=>nil,
|
@@ -26,8 +26,12 @@ card.save
|
|
26
26
|
"avs_postal_match"=>nil,
|
27
27
|
"avs_result"=>nil,
|
28
28
|
"avs_street_match"=>nil,
|
29
|
+
"bank"=>"BANK OF HAWAII",
|
29
30
|
"brand"=>"MasterCard",
|
30
|
-
"
|
31
|
+
"can_credit"=>false,
|
32
|
+
"can_debit"=>true,
|
33
|
+
"category"=>nil,
|
34
|
+
"created_at"=>"2014-05-15T00:40:43.949061Z",
|
31
35
|
"cvv"=>"xxx",
|
32
36
|
"cvv_match"=>"yes",
|
33
37
|
"cvv_result"=>"Match",
|
@@ -35,8 +39,8 @@ card.save
|
|
35
39
|
"expiration_year"=>2020,
|
36
40
|
"fingerprint"=>
|
37
41
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
38
|
-
"href"=>"/cards/
|
39
|
-
"id"=>"
|
42
|
+
"href"=>"/cards/CC4gG6BE70pMOYKPBive9qoF",
|
43
|
+
"id"=>"CC4gG6BE70pMOYKPBive9qoF",
|
40
44
|
"is_verified"=>true,
|
41
45
|
"links"=>{"customer"=>nil},
|
42
46
|
"meta"=>
|
@@ -45,13 +49,18 @@ card.save
|
|
45
49
|
"twitter.id"=>"1234987650"},
|
46
50
|
"name"=>nil,
|
47
51
|
"number"=>"xxxxxxxxxxxx5100",
|
48
|
-
"
|
52
|
+
"type"=>"",
|
53
|
+
"updated_at"=>"2014-05-15T00:40:47.925893Z"},
|
49
54
|
@hyperlinks=
|
50
55
|
{"card_holds"=>
|
51
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fa7d420ff20/lib/balanced/utils.rb:6 (lambda)>,
|
57
|
+
"credits"=>
|
58
|
+
#<Proc:0x007fa7d420da90/lib/balanced/utils.rb:6 (lambda)>,
|
52
59
|
"customer"=>
|
53
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fa7d420cfa0/lib/balanced/utils.rb:6 (lambda)>,
|
54
61
|
"debits"=>
|
55
|
-
#<Proc:
|
62
|
+
#<Proc:0x007fa7d4205ca0/lib/balanced/utils.rb:6 (lambda)>,
|
63
|
+
"disputes"=>
|
64
|
+
#<Proc:0x007fa7d41ff3f0/lib/balanced/utils.rb:6 (lambda)>}>
|
56
65
|
|
57
66
|
% endif
|