balanced 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +5 -0
- data/lib/balanced/resources/credit.rb +2 -7
- data/lib/balanced/resources/debit.rb +2 -7
- data/lib/balanced/resources/order.rb +10 -9
- data/lib/balanced/version.rb +1 -1
- data/scenarios/api_key_create/ruby.mako +6 -6
- data/scenarios/api_key_delete/ruby.mako +2 -2
- data/scenarios/api_key_list/ruby.mako +10 -10
- data/scenarios/api_key_show/ruby.mako +6 -6
- data/scenarios/bank_account_associate_to_customer/definition.rb +1 -1
- data/scenarios/bank_account_associate_to_customer/request.rb +2 -2
- data/scenarios/bank_account_associate_to_customer/ruby.mako +15 -15
- data/scenarios/bank_account_create/ruby.mako +11 -11
- data/scenarios/bank_account_credit/ruby.mako +15 -15
- data/scenarios/bank_account_debit/ruby.mako +15 -15
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +22 -22
- data/scenarios/bank_account_show/ruby.mako +12 -12
- data/scenarios/bank_account_update/ruby.mako +12 -12
- data/scenarios/bank_account_verification_create/ruby.mako +9 -9
- data/scenarios/bank_account_verification_show/ruby.mako +9 -9
- data/scenarios/bank_account_verification_update/ruby.mako +9 -9
- data/scenarios/callback_create/ruby.mako +4 -4
- data/scenarios/callback_delete/ruby.mako +2 -2
- data/scenarios/callback_list/ruby.mako +4 -4
- data/scenarios/callback_show/ruby.mako +5 -5
- data/scenarios/card_associate_to_customer/definition.rb +1 -1
- data/scenarios/card_associate_to_customer/request.rb +1 -1
- data/scenarios/card_associate_to_customer/ruby.mako +13 -14
- data/scenarios/card_create/ruby.mako +9 -9
- data/scenarios/card_create_dispute/definition.rb +1 -0
- data/scenarios/card_create_dispute/request.rb +4 -0
- data/scenarios/card_create_dispute/ruby.mako +53 -0
- data/scenarios/card_debit/ruby.mako +16 -16
- data/scenarios/card_debit_dispute/definition.rb +1 -0
- data/scenarios/card_debit_dispute/request.rb +5 -0
- data/scenarios/card_debit_dispute/ruby.mako +49 -0
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +16 -16
- data/scenarios/card_hold_create/ruby.mako +14 -14
- data/scenarios/card_hold_list/ruby.mako +25 -25
- data/scenarios/card_hold_show/ruby.mako +14 -14
- data/scenarios/card_hold_update/ruby.mako +14 -14
- data/scenarios/card_hold_void/definition.rb +1 -1
- data/scenarios/card_hold_void/request.rb +1 -1
- data/scenarios/card_hold_void/ruby.mako +17 -17
- data/scenarios/card_list/ruby.mako +18 -18
- data/scenarios/card_show/ruby.mako +10 -10
- data/scenarios/card_update/ruby.mako +10 -10
- data/scenarios/credit_list/ruby.mako +14 -14
- data/scenarios/credit_list_bank_account/ruby.mako +2 -2
- data/scenarios/credit_show/ruby.mako +15 -15
- data/scenarios/credit_update/ruby.mako +15 -15
- data/scenarios/customer_create/ruby.mako +18 -18
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +35 -35
- data/scenarios/customer_show/ruby.mako +19 -19
- data/scenarios/customer_update/ruby.mako +19 -19
- data/scenarios/debit_dispute_show/definition.rb +1 -0
- data/scenarios/debit_dispute_show/request.rb +3 -0
- data/scenarios/debit_dispute_show/ruby.mako +31 -0
- data/scenarios/debit_list/ruby.mako +29 -29
- data/scenarios/debit_show/ruby.mako +16 -16
- data/scenarios/debit_update/ruby.mako +16 -16
- data/scenarios/dispute_list/definition.rb +1 -0
- data/scenarios/dispute_list/request.rb +2 -0
- data/scenarios/dispute_list/ruby.mako +29 -0
- data/scenarios/dispute_show/definition.rb +1 -0
- data/scenarios/dispute_show/request.rb +2 -0
- data/scenarios/dispute_show/ruby.mako +31 -0
- data/scenarios/event_list/ruby.mako +55 -55
- data/scenarios/event_show/ruby.mako +35 -40
- data/scenarios/order_create/ruby.mako +14 -14
- data/scenarios/order_list/ruby.mako +13 -13
- data/scenarios/order_show/ruby.mako +14 -14
- data/scenarios/order_update/ruby.mako +14 -14
- data/scenarios/refund_create/ruby.mako +13 -13
- data/scenarios/refund_list/ruby.mako +12 -12
- data/scenarios/refund_show/ruby.mako +13 -13
- data/scenarios/refund_update/ruby.mako +13 -13
- data/scenarios/render_mako.rb +15 -3
- data/scenarios/reversal_create/ruby.mako +12 -12
- data/scenarios/reversal_list/ruby.mako +11 -11
- data/scenarios/reversal_show/ruby.mako +12 -12
- data/scenarios/reversal_update/ruby.mako +12 -12
- data/spec/balanced/resources/credit_spec.rb +26 -5
- data/spec/balanced/resources/debit_spec.rb +7 -2
- data/spec/balanced/resources/order_spec.rb +25 -3
- metadata +17 -3
- data/scenario.cache +0 -619
@@ -3,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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::CardHold:
|
11
|
+
#<Balanced::CardHold:0x007fa93b774958
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-04-25T20:09:41.712497Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
|
-
"expires_at"=>"2014-
|
17
|
+
"expires_at"=>"2014-05-02T20:09:41.878825Z",
|
18
18
|
"failure_reason"=>nil,
|
19
19
|
"failure_reason_code"=>nil,
|
20
|
-
"href"=>"/card_holds/
|
21
|
-
"id"=>"
|
22
|
-
"links"=>{"card"=>"
|
20
|
+
"href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
|
21
|
+
"id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
|
22
|
+
"links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
|
23
23
|
"meta"=>{},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
25
|
+
"transaction_number"=>"HL244-046-8353",
|
26
|
+
"updated_at"=>"2014-04-25T20:09:42.023214Z",
|
27
27
|
"voided_at"=>nil},
|
28
28
|
@hyperlinks=
|
29
29
|
{"card"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa93b76ecd8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
31
31
|
"debit"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93b76e300/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93b76c2f8/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93b766268/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl')
|
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:0x007fa93b74c868
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>5000,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-04-25T20:09:41.712497Z",
|
21
21
|
"currency"=>"USD",
|
22
22
|
"description"=>"update this description",
|
23
|
-
"expires_at"=>"2014-
|
23
|
+
"expires_at"=>"2014-05-02T20:09:41.878825Z",
|
24
24
|
"failure_reason"=>nil,
|
25
25
|
"failure_reason_code"=>nil,
|
26
|
-
"href"=>"/card_holds/
|
27
|
-
"id"=>"
|
28
|
-
"links"=>{"card"=>"
|
26
|
+
"href"=>"/card_holds/HL4bdnO7ELS2JfyJ2T8elYOl",
|
27
|
+
"id"=>"HL4bdnO7ELS2JfyJ2T8elYOl",
|
28
|
+
"links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "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"=>"HL244-046-8353",
|
32
|
+
"updated_at"=>"2014-04-25T20:09:45.729280Z",
|
33
33
|
"voided_at"=>nil},
|
34
34
|
@hyperlinks=
|
35
35
|
{"card"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93b746c10/lib/balanced/resources/resource.rb:60 (lambda)>,
|
37
37
|
"debit"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93b745f90/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"debits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93b746788/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"events"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa93b73dcf0/lib/balanced/utils.rb:6 (lambda)>}>
|
43
43
|
|
44
44
|
% endif
|
@@ -1 +1 @@
|
|
1
|
-
Balanced::CardHold.
|
1
|
+
Balanced::CardHold.unstore
|
@@ -1,38 +1,38 @@
|
|
1
1
|
% if mode == 'definition':
|
2
|
-
Balanced::CardHold.
|
2
|
+
Balanced::CardHold.unstore
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
card_hold = Balanced::CardHold.fetch('/card_holds/
|
9
|
-
card_hold.
|
8
|
+
card_hold = Balanced::CardHold.fetch('/card_holds/HL4joUazeM3BJE6emmv2Q8EF')
|
9
|
+
card_hold.unstore
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::CardHold:
|
11
|
+
#<Balanced::CardHold:0x007fa93b71db58
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-04-25T20:09:48.990540Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
|
-
"expires_at"=>"2014-
|
17
|
+
"expires_at"=>"2014-05-02T20:09:49.096484Z",
|
18
18
|
"failure_reason"=>nil,
|
19
19
|
"failure_reason_code"=>nil,
|
20
|
-
"href"=>"/card_holds/
|
21
|
-
"id"=>"
|
22
|
-
"links"=>{"card"=>"
|
20
|
+
"href"=>"/card_holds/HL4joUazeM3BJE6emmv2Q8EF",
|
21
|
+
"id"=>"HL4joUazeM3BJE6emmv2Q8EF",
|
22
|
+
"links"=>{"card"=>"CC4auQXiAWMBxJcEUIMYeZFj", "debit"=>nil},
|
23
23
|
"meta"=>{},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
27
|
-
"voided_at"=>"2014-
|
25
|
+
"transaction_number"=>"HL161-849-8610",
|
26
|
+
"updated_at"=>"2014-04-25T20:09:49.731653Z",
|
27
|
+
"voided_at"=>"2014-04-25T20:09:49.731656Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"card"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa93b71f9d0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
31
31
|
"debit"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93b717618/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93b715520/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93b70f698/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
6
|
|
7
7
|
cards = Balanced::Card.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Card:
|
9
|
+
[#<Balanced::Card:0x007fa93b6f4618
|
10
10
|
@attributes=
|
11
11
|
{"address"=>
|
12
12
|
{"city"=>nil,
|
@@ -19,7 +19,7 @@ cards = Balanced::Card.all
|
|
19
19
|
"avs_result"=>nil,
|
20
20
|
"avs_street_match"=>nil,
|
21
21
|
"brand"=>"MasterCard",
|
22
|
-
"created_at"=>"2014-
|
22
|
+
"created_at"=>"2014-04-25T20:09:52.175221Z",
|
23
23
|
"cvv"=>"xxx",
|
24
24
|
"cvv_match"=>"yes",
|
25
25
|
"cvv_result"=>"Match",
|
@@ -27,22 +27,22 @@ cards = Balanced::Card.all
|
|
27
27
|
"expiration_year"=>2020,
|
28
28
|
"fingerprint"=>
|
29
29
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
30
|
-
"href"=>"/cards/
|
31
|
-
"id"=>"
|
30
|
+
"href"=>"/cards/CC4mYF7dj7X6OA2K5F0Qyb4N",
|
31
|
+
"id"=>"CC4mYF7dj7X6OA2K5F0Qyb4N",
|
32
32
|
"is_verified"=>true,
|
33
33
|
"links"=>{"customer"=>nil},
|
34
34
|
"meta"=>{},
|
35
35
|
"name"=>nil,
|
36
36
|
"number"=>"xxxxxxxxxxxx5100",
|
37
|
-
"updated_at"=>"2014-
|
37
|
+
"updated_at"=>"2014-04-25T20:09:52.175224Z"},
|
38
38
|
@hyperlinks=
|
39
39
|
{"card_holds"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93b6ee128/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"customer"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa93b6ed638/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"debits"=>
|
44
|
-
#<Proc:
|
45
|
-
#<Balanced::Card:
|
44
|
+
#<Proc:0x007fa93b6e77b0/lib/balanced/utils.rb:6 (lambda)>}>,
|
45
|
+
#<Balanced::Card:0x007fa93b6e7760
|
46
46
|
@attributes=
|
47
47
|
{"address"=>
|
48
48
|
{"city"=>nil,
|
@@ -55,7 +55,7 @@ cards = Balanced::Card.all
|
|
55
55
|
"avs_result"=>nil,
|
56
56
|
"avs_street_match"=>nil,
|
57
57
|
"brand"=>"MasterCard",
|
58
|
-
"created_at"=>"2014-
|
58
|
+
"created_at"=>"2014-04-25T20:09:41.078409Z",
|
59
59
|
"cvv"=>"xxx",
|
60
60
|
"cvv_match"=>"yes",
|
61
61
|
"cvv_result"=>"Match",
|
@@ -63,20 +63,20 @@ cards = Balanced::Card.all
|
|
63
63
|
"expiration_year"=>2020,
|
64
64
|
"fingerprint"=>
|
65
65
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
66
|
-
"href"=>"/cards/
|
67
|
-
"id"=>"
|
66
|
+
"href"=>"/cards/CC4auQXiAWMBxJcEUIMYeZFj",
|
67
|
+
"id"=>"CC4auQXiAWMBxJcEUIMYeZFj",
|
68
68
|
"is_verified"=>true,
|
69
|
-
"links"=>{"customer"=>"
|
69
|
+
"links"=>{"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
|
70
70
|
"meta"=>{},
|
71
71
|
"name"=>nil,
|
72
72
|
"number"=>"xxxxxxxxxxxx5100",
|
73
|
-
"updated_at"=>"2014-
|
73
|
+
"updated_at"=>"2014-04-25T20:09:41.708881Z"},
|
74
74
|
@hyperlinks=
|
75
75
|
{"card_holds"=>
|
76
|
-
#<Proc:
|
76
|
+
#<Proc:0x007fa93b6e5618/lib/balanced/utils.rb:6 (lambda)>,
|
77
77
|
"customer"=>
|
78
|
-
#<Proc:
|
78
|
+
#<Proc:0x007fa93b6df628/lib/balanced/resources/resource.rb:60 (lambda)>,
|
79
79
|
"debits"=>
|
80
|
-
#<Proc:
|
80
|
+
#<Proc:0x007fa93b6dd760/lib/balanced/utils.rb:6 (lambda)>}>]
|
81
81
|
|
82
82
|
% 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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Card:
|
10
|
+
#<Balanced::Card:0x007fa93b667998
|
11
11
|
@attributes=
|
12
12
|
{"address"=>
|
13
13
|
{"city"=>nil,
|
@@ -20,7 +20,7 @@ card = Balanced::Card.fetch('/cards/CC5Buki6e4Kg4bDVZ3OSfQ8O')
|
|
20
20
|
"avs_result"=>nil,
|
21
21
|
"avs_street_match"=>nil,
|
22
22
|
"brand"=>"MasterCard",
|
23
|
-
"created_at"=>"2014-
|
23
|
+
"created_at"=>"2014-04-25T20:09:52.175221Z",
|
24
24
|
"cvv"=>"xxx",
|
25
25
|
"cvv_match"=>"yes",
|
26
26
|
"cvv_result"=>"Match",
|
@@ -28,20 +28,20 @@ card = Balanced::Card.fetch('/cards/CC5Buki6e4Kg4bDVZ3OSfQ8O')
|
|
28
28
|
"expiration_year"=>2020,
|
29
29
|
"fingerprint"=>
|
30
30
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
31
|
-
"href"=>"/cards/
|
32
|
-
"id"=>"
|
31
|
+
"href"=>"/cards/CC4mYF7dj7X6OA2K5F0Qyb4N",
|
32
|
+
"id"=>"CC4mYF7dj7X6OA2K5F0Qyb4N",
|
33
33
|
"is_verified"=>true,
|
34
34
|
"links"=>{"customer"=>nil},
|
35
35
|
"meta"=>{},
|
36
36
|
"name"=>nil,
|
37
37
|
"number"=>"xxxxxxxxxxxx5100",
|
38
|
-
"updated_at"=>"2014-
|
38
|
+
"updated_at"=>"2014-04-25T20:09:52.175224Z"},
|
39
39
|
@hyperlinks=
|
40
40
|
{"card_holds"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa93b65f1d0/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"customer"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa93b65c610/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"debits"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa93b654140/lib/balanced/utils.rb:6 (lambda)>}>
|
46
46
|
|
47
47
|
% 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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
card = Balanced::Card.fetch('/cards/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC4mYF7dj7X6OA2K5F0Qyb4N')
|
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:0x007fa93b5e48b8
|
18
18
|
@attributes=
|
19
19
|
{"address"=>
|
20
20
|
{"city"=>nil,
|
@@ -27,7 +27,7 @@ card.save
|
|
27
27
|
"avs_result"=>nil,
|
28
28
|
"avs_street_match"=>nil,
|
29
29
|
"brand"=>"MasterCard",
|
30
|
-
"created_at"=>"2014-
|
30
|
+
"created_at"=>"2014-04-25T20:09:52.175221Z",
|
31
31
|
"cvv"=>"xxx",
|
32
32
|
"cvv_match"=>"yes",
|
33
33
|
"cvv_result"=>"Match",
|
@@ -35,8 +35,8 @@ card.save
|
|
35
35
|
"expiration_year"=>2020,
|
36
36
|
"fingerprint"=>
|
37
37
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
38
|
-
"href"=>"/cards/
|
39
|
-
"id"=>"
|
38
|
+
"href"=>"/cards/CC4mYF7dj7X6OA2K5F0Qyb4N",
|
39
|
+
"id"=>"CC4mYF7dj7X6OA2K5F0Qyb4N",
|
40
40
|
"is_verified"=>true,
|
41
41
|
"links"=>{"customer"=>nil},
|
42
42
|
"meta"=>
|
@@ -45,13 +45,13 @@ card.save
|
|
45
45
|
"twitter.id"=>"1234987650"},
|
46
46
|
"name"=>nil,
|
47
47
|
"number"=>"xxxxxxxxxxxx5100",
|
48
|
-
"updated_at"=>"2014-
|
48
|
+
"updated_at"=>"2014-04-25T20:09:55.802789Z"},
|
49
49
|
@hyperlinks=
|
50
50
|
{"card_holds"=>
|
51
|
-
#<Proc:
|
51
|
+
#<Proc:0x007fa93b5cee78/lib/balanced/utils.rb:6 (lambda)>,
|
52
52
|
"customer"=>
|
53
|
-
#<Proc:
|
53
|
+
#<Proc:0x007fa93b5c2ee8/lib/balanced/utils.rb:6 (lambda)>,
|
54
54
|
"debits"=>
|
55
|
-
#<Proc:
|
55
|
+
#<Proc:0x007fa93b5b3d80/lib/balanced/utils.rb:6 (lambda)>}>
|
56
56
|
|
57
57
|
% endif
|
@@ -3,39 +3,39 @@ Balanced::Credit.all
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
8
|
credits = Balanced::Credit.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Credit:
|
10
|
+
[#<Balanced::Credit:0x007fa93b558930
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
13
|
"appears_on_statement_as"=>"example.com",
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-04-25T20:10:02.398021Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>nil,
|
17
17
|
"failure_reason"=>nil,
|
18
18
|
"failure_reason_code"=>nil,
|
19
|
-
"href"=>"/credits/
|
20
|
-
"id"=>"
|
19
|
+
"href"=>"/credits/CR4yt4sdkTWI1t3HVS16mNAV",
|
20
|
+
"id"=>"CR4yt4sdkTWI1t3HVS16mNAV",
|
21
21
|
"links"=>
|
22
|
-
{"customer"=>"
|
23
|
-
"destination"=>"
|
22
|
+
{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
|
23
|
+
"destination"=>"BA3Y63fK5STwlhKNMkE3Utmd",
|
24
24
|
"order"=>nil},
|
25
25
|
"meta"=>{},
|
26
26
|
"status"=>"succeeded",
|
27
|
-
"transaction_number"=>"
|
28
|
-
"updated_at"=>"2014-
|
27
|
+
"transaction_number"=>"CR883-913-0274",
|
28
|
+
"updated_at"=>"2014-04-25T20:10:03.049785Z"},
|
29
29
|
@hyperlinks=
|
30
30
|
{"customer"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007fa93b54b370/lib/balanced/resources/resource.rb:60 (lambda)>,
|
32
32
|
"destination"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fa93b540448/lib/balanced/resources/resource.rb:60 (lambda)>,
|
34
34
|
"events"=>
|
35
|
-
#<Proc:
|
35
|
+
#<Proc:0x007fa93b5287a8/lib/balanced/utils.rb:6 (lambda)>,
|
36
36
|
"order"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fa93b523190/lib/balanced/utils.rb:6 (lambda)>,
|
38
38
|
"reversals"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa93b51b030/lib/balanced/utils.rb:6 (lambda)>}>]
|
40
40
|
|
41
41
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::BankAccount.credits
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
bank_account = Balanced::BankAccount.fetch('/bank_accounts/
|
8
|
+
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA3PDwDCkdeC4OgPtPNwoCWl')
|
9
9
|
credits = bank_account.credits
|
10
10
|
% elif mode == 'response':
|
11
11
|
{}
|
@@ -3,39 +3,39 @@ Balanced::Credit.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
credit = Balanced::Credit.fetch('/credits/
|
8
|
+
credit = Balanced::Credit.fetch('/credits/CR4yt4sdkTWI1t3HVS16mNAV')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Credit:
|
10
|
+
#<Balanced::Credit:0x007fa93b4d03a0
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
13
|
"appears_on_statement_as"=>"example.com",
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-04-25T20:10:02.398021Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>nil,
|
17
17
|
"failure_reason"=>nil,
|
18
18
|
"failure_reason_code"=>nil,
|
19
|
-
"href"=>"/credits/
|
20
|
-
"id"=>"
|
19
|
+
"href"=>"/credits/CR4yt4sdkTWI1t3HVS16mNAV",
|
20
|
+
"id"=>"CR4yt4sdkTWI1t3HVS16mNAV",
|
21
21
|
"links"=>
|
22
|
-
{"customer"=>"
|
23
|
-
"destination"=>"
|
22
|
+
{"customer"=>"CU3VYCUIfwngJsidJWdGw2W5",
|
23
|
+
"destination"=>"BA3Y63fK5STwlhKNMkE3Utmd",
|
24
24
|
"order"=>nil},
|
25
25
|
"meta"=>{},
|
26
26
|
"status"=>"succeeded",
|
27
|
-
"transaction_number"=>"
|
28
|
-
"updated_at"=>"2014-
|
27
|
+
"transaction_number"=>"CR883-913-0274",
|
28
|
+
"updated_at"=>"2014-04-25T20:10:03.049785Z"},
|
29
29
|
@hyperlinks=
|
30
30
|
{"customer"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007fa93b4c8df8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
32
32
|
"destination"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fa93b4c1670/lib/balanced/resources/resource.rb:60 (lambda)>,
|
34
34
|
"events"=>
|
35
|
-
#<Proc:
|
35
|
+
#<Proc:0x007fa93b4b1f90/lib/balanced/utils.rb:6 (lambda)>,
|
36
36
|
"order"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fa93b4ab5c8/lib/balanced/utils.rb:6 (lambda)>,
|
38
38
|
"reversals"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa93b49a778/lib/balanced/utils.rb:6 (lambda)>}>
|
40
40
|
|
41
41
|
% endif
|