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,39 +3,39 @@ Balanced::Event.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
|
-
event = Balanced::Event.fetch('/events/
|
8
|
+
event = Balanced::Event.fetch('/events/EVa26caeeea56411e3838802219cc35fd9')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Event:
|
11
|
+
#<Balanced::Event:0x007ff2bc0edf10
|
12
12
|
@attributes=
|
13
13
|
{"callback_statuses"=>
|
14
14
|
{"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
|
15
15
|
"entity"=>
|
16
16
|
{"customers"=>
|
17
17
|
[{"address"=>
|
18
|
-
{"city"=>
|
19
|
-
"country_code"=>
|
18
|
+
{"city"=>"Nowhere",
|
19
|
+
"country_code"=>"USA",
|
20
20
|
"line1"=>nil,
|
21
21
|
"line2"=>nil,
|
22
|
-
"postal_code"=>
|
22
|
+
"postal_code"=>"90210",
|
23
23
|
"state"=>nil},
|
24
24
|
"business_name"=>nil,
|
25
|
-
"created_at"=>"2014-
|
26
|
-
"dob_month"=>
|
27
|
-
"dob_year"=>
|
25
|
+
"created_at"=>"2014-03-06T19:22:12.312268Z",
|
26
|
+
"dob_month"=>2,
|
27
|
+
"dob_year"=>1947,
|
28
28
|
"ein"=>nil,
|
29
|
-
"email"=>
|
30
|
-
"href"=>"/customers/
|
31
|
-
"id"=>"
|
29
|
+
"email"=>"whc@example.org",
|
30
|
+
"href"=>"/customers/CU4Wt8xSbREzV2NWtdVAFGeR",
|
31
|
+
"id"=>"CU4Wt8xSbREzV2NWtdVAFGeR",
|
32
32
|
"links"=>{"destination"=>nil, "source"=>nil},
|
33
|
-
"merchant_status"=>"
|
33
|
+
"merchant_status"=>"underwritten",
|
34
34
|
"meta"=>{},
|
35
|
-
"name"=>
|
36
|
-
"phone"=>
|
37
|
-
"ssn_last4"=>
|
38
|
-
"updated_at"=>"2014-
|
35
|
+
"name"=>"William Henry Cavendish III",
|
36
|
+
"phone"=>"+16505551212",
|
37
|
+
"ssn_last4"=>"xxxx",
|
38
|
+
"updated_at"=>"2014-03-06T19:22:12.718847Z"}],
|
39
39
|
"links"=>
|
40
40
|
{"customers.bank_accounts"=>"/customers/{customers.id}/bank_accounts",
|
41
41
|
"customers.card_holds"=>"/customers/{customers.id}/card_holds",
|
@@ -43,18 +43,20 @@ event = Balanced::Event.fetch('/events/EV2abbb98487a611e3a86f026ba7d31e6f')
|
|
43
43
|
"customers.credits"=>"/customers/{customers.id}/credits",
|
44
44
|
"customers.debits"=>"/customers/{customers.id}/debits",
|
45
45
|
"customers.destination"=>"/resources/{customers.destination}",
|
46
|
+
"customers.external_accounts"=>
|
47
|
+
"/customers/{customers.id}/external_accounts",
|
46
48
|
"customers.orders"=>"/customers/{customers.id}/orders",
|
47
49
|
"customers.refunds"=>"/customers/{customers.id}/refunds",
|
48
50
|
"customers.reversals"=>"/customers/{customers.id}/reversals",
|
49
51
|
"customers.source"=>"/resources/{customers.source}",
|
50
52
|
"customers.transactions"=>"/customers/{customers.id}/transactions"}},
|
51
|
-
"href"=>"/events/
|
52
|
-
"id"=>"
|
53
|
+
"href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
|
54
|
+
"id"=>"EVa26caeeea56411e3838802219cc35fd9",
|
53
55
|
"links"=>{},
|
54
|
-
"occurred_at"=>"2014-
|
56
|
+
"occurred_at"=>"2014-03-06T19:22:12.718000Z",
|
55
57
|
"type"=>"account.created"},
|
56
58
|
@hyperlinks=
|
57
59
|
{"callbacks"=>
|
58
|
-
#<Proc:
|
60
|
+
#<Proc:0x007ff2bc869208/lib/balanced/utils.rb:6 (lambda)>}>
|
59
61
|
|
60
62
|
% endif
|
@@ -3,18 +3,18 @@ Balanced::Customer.create_order
|
|
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
|
-
merchant_customer = Balanced::Customer.fetch('/customers/
|
8
|
+
merchant_customer = Balanced::Customer.fetch('/customers/CU64R7DS6DwuXYVg9RTskFK8')
|
9
9
|
merchant_customer.create_order(
|
10
10
|
:description => 'Order #12341234'
|
11
11
|
)
|
12
12
|
% elif mode == 'response':
|
13
|
-
#<Balanced::Order:
|
13
|
+
#<Balanced::Order:0x007ff2bdb5b0a0
|
14
14
|
@attributes=
|
15
15
|
{"amount"=>0,
|
16
16
|
"amount_escrowed"=>0,
|
17
|
-
"created_at"=>"2014-
|
17
|
+
"created_at"=>"2014-03-06T19:23:39.207291Z",
|
18
18
|
"currency"=>"USD",
|
19
19
|
"delivery_address"=>
|
20
20
|
{"city"=>nil,
|
@@ -24,23 +24,23 @@ merchant_customer.create_order(
|
|
24
24
|
"postal_code"=>nil,
|
25
25
|
"state"=>nil},
|
26
26
|
"description"=>"Order #12341234",
|
27
|
-
"href"=>"/orders/
|
28
|
-
"id"=>"
|
29
|
-
"links"=>{"merchant"=>"
|
27
|
+
"href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
|
28
|
+
"id"=>"OR6wcEVkOymvs4PairiGEcIx",
|
29
|
+
"links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
|
30
30
|
"meta"=>{},
|
31
|
-
"updated_at"=>"2014-
|
31
|
+
"updated_at"=>"2014-03-06T19:23:39.207294Z"},
|
32
32
|
@hyperlinks=
|
33
33
|
{"buyers"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007ff2bdb58558/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"credits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007ff2bdb529a0/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"debits"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bdb50498/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"merchant"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bdb4aed0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
41
41
|
"refunds"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007ff2bdb48a90/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"reversals"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007ff2bdb42410/lib/balanced/utils.rb:6 (lambda)>}>
|
45
45
|
|
46
46
|
% endif
|
@@ -2,15 +2,15 @@
|
|
2
2
|
Balanced::Order.all
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
6
6
|
|
7
7
|
orders = Balanced::Order.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Order:
|
9
|
+
[#<Balanced::Order:0x007ff2bdaf12e0
|
10
10
|
@attributes=
|
11
11
|
{"amount"=>0,
|
12
12
|
"amount_escrowed"=>0,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-03-06T19:23:39.207291Z",
|
14
14
|
"currency"=>"USD",
|
15
15
|
"delivery_address"=>
|
16
16
|
{"city"=>nil,
|
@@ -20,23 +20,23 @@ orders = Balanced::Order.all
|
|
20
20
|
"postal_code"=>nil,
|
21
21
|
"state"=>nil},
|
22
22
|
"description"=>"Order #12341234",
|
23
|
-
"href"=>"/orders/
|
24
|
-
"id"=>"
|
25
|
-
"links"=>{"merchant"=>"
|
23
|
+
"href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
|
24
|
+
"id"=>"OR6wcEVkOymvs4PairiGEcIx",
|
25
|
+
"links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
|
26
26
|
"meta"=>{},
|
27
|
-
"updated_at"=>"2014-
|
27
|
+
"updated_at"=>"2014-03-06T19:23:39.207294Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"buyers"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007ff2bdafafe8/lib/balanced/utils.rb:6 (lambda)>,
|
31
31
|
"credits"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007ff2bc93fda8/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007ff2bc933288/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"merchant"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007ff2bc9317d0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
37
37
|
"refunds"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bc92b6f0/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"reversals"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bc9284a0/lib/balanced/utils.rb:6 (lambda)>}>]
|
41
41
|
|
42
42
|
% endif
|
@@ -3,16 +3,16 @@ Balanced::Order.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
|
-
order = Balanced::Order.fetch('/orders/
|
8
|
+
order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Order:
|
11
|
+
#<Balanced::Order:0x007ff2bc1a1998
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>0,
|
14
14
|
"amount_escrowed"=>0,
|
15
|
-
"created_at"=>"2014-
|
15
|
+
"created_at"=>"2014-03-06T19:23:39.207291Z",
|
16
16
|
"currency"=>"USD",
|
17
17
|
"delivery_address"=>
|
18
18
|
{"city"=>nil,
|
@@ -22,23 +22,23 @@ order = Balanced::Order.fetch('/orders/OR3FOihZa7lMHdAP5p8BJZVY')
|
|
22
22
|
"postal_code"=>nil,
|
23
23
|
"state"=>nil},
|
24
24
|
"description"=>"Order #12341234",
|
25
|
-
"href"=>"/orders/
|
26
|
-
"id"=>"
|
27
|
-
"links"=>{"merchant"=>"
|
25
|
+
"href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
|
26
|
+
"id"=>"OR6wcEVkOymvs4PairiGEcIx",
|
27
|
+
"links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
|
28
28
|
"meta"=>{},
|
29
|
-
"updated_at"=>"2014-
|
29
|
+
"updated_at"=>"2014-03-06T19:23:39.207294Z"},
|
30
30
|
@hyperlinks=
|
31
31
|
{"buyers"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007ff2bc19b098/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"credits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007ff2bdae7f10/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"debits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007ff2bdae5850/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"merchant"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bdadfbf8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
39
39
|
"refunds"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bdad5090/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"reversals"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007ff2bdad4050/lib/balanced/utils.rb:6 (lambda)>}>
|
43
43
|
|
44
44
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::Order.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
|
-
order = Balanced::Order.fetch('/orders/
|
8
|
+
order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
|
9
9
|
order.description = 'New description for order'
|
10
10
|
order.meta = {
|
11
11
|
'anykey' => 'valuegoeshere',
|
@@ -14,11 +14,11 @@ order.meta = {
|
|
14
14
|
order.save
|
15
15
|
|
16
16
|
% elif mode == 'response':
|
17
|
-
#<Balanced::Order:
|
17
|
+
#<Balanced::Order:0x007ff2bdaa41c0
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>0,
|
20
20
|
"amount_escrowed"=>0,
|
21
|
-
"created_at"=>"2014-
|
21
|
+
"created_at"=>"2014-03-06T19:23:39.207291Z",
|
22
22
|
"currency"=>"USD",
|
23
23
|
"delivery_address"=>
|
24
24
|
{"city"=>nil,
|
@@ -28,23 +28,23 @@ order.save
|
|
28
28
|
"postal_code"=>nil,
|
29
29
|
"state"=>nil},
|
30
30
|
"description"=>"New description for order",
|
31
|
-
"href"=>"/orders/
|
32
|
-
"id"=>"
|
33
|
-
"links"=>{"merchant"=>"
|
31
|
+
"href"=>"/orders/OR6wcEVkOymvs4PairiGEcIx",
|
32
|
+
"id"=>"OR6wcEVkOymvs4PairiGEcIx",
|
33
|
+
"links"=>{"merchant"=>"CU64R7DS6DwuXYVg9RTskFK8"},
|
34
34
|
"meta"=>{"anykey"=>"valuegoeshere", "product.id"=>"1234567890"},
|
35
|
-
"updated_at"=>"2014-
|
35
|
+
"updated_at"=>"2014-03-06T19:23:42.673919Z"},
|
36
36
|
@hyperlinks=
|
37
37
|
{"buyers"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bda9df28/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"credits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bda942e8/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"debits"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007ff2bc8cd050/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"merchant"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007ff2bc8c77b8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
45
45
|
"refunds"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007ff2bc8c4810/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"reversals"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007ff2bc8be6e0/lib/balanced/utils.rb:6 (lambda)>}>
|
49
49
|
|
50
50
|
% endif
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Balanced::Debit.refund
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
6
6
|
|
7
|
-
debit = Balanced::Debit.fetch('/debits/
|
7
|
+
debit = Balanced::Debit.fetch('/debits/WD6BKYhbRzlRhfKSE1DcpqS5')
|
8
8
|
debit.refund(
|
9
9
|
:amount => 3000,
|
10
10
|
:description => 'Refund for Order #1111',
|
@@ -16,31 +16,31 @@ debit.refund(
|
|
16
16
|
)
|
17
17
|
|
18
18
|
% elif mode == 'response':
|
19
|
-
#<Balanced::Refund:
|
19
|
+
#<Balanced::Refund:0x007ff2bda0ead0
|
20
20
|
@attributes=
|
21
21
|
{"amount"=>3000,
|
22
|
-
"created_at"=>"2014-
|
22
|
+
"created_at"=>"2014-03-06T19:23:46.176138Z",
|
23
23
|
"currency"=>"USD",
|
24
24
|
"description"=>"Refund for Order #1111",
|
25
|
-
"href"=>"/refunds/
|
26
|
-
"id"=>"
|
25
|
+
"href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
|
26
|
+
"id"=>"RF6HsnqferSuES9VZEWrthG2",
|
27
27
|
"links"=>
|
28
|
-
{"debit"=>"
|
28
|
+
{"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
|
29
29
|
"meta"=>
|
30
30
|
{"fulfillment.item.condition"=>"OK",
|
31
31
|
"merchant.feedback"=>"positive",
|
32
32
|
"user.refund_reason"=>"not happy with product"},
|
33
33
|
"status"=>"succeeded",
|
34
|
-
"transaction_number"=>"
|
35
|
-
"updated_at"=>"2014-
|
34
|
+
"transaction_number"=>"RF348-549-7723",
|
35
|
+
"updated_at"=>"2014-03-06T19:23:48.234584Z"},
|
36
36
|
@hyperlinks=
|
37
37
|
{"debit"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007ff2bda0c7d0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
39
39
|
"dispute"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007ff2bda05688/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"events"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007ff2bda057f0/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"order"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007ff2bda04a08/lib/balanced/utils.rb:6 (lambda)>}>
|
45
45
|
|
46
46
|
% endif
|
@@ -3,35 +3,35 @@ Balanced::Refund.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
|
refunds = Balanced::Refund.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Refund:
|
10
|
+
[#<Balanced::Refund:0x007ff2bd9dcb48
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>3000,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-03-06T19:23:46.176138Z",
|
14
14
|
"currency"=>"USD",
|
15
15
|
"description"=>"Refund for Order #1111",
|
16
|
-
"href"=>"/refunds/
|
17
|
-
"id"=>"
|
16
|
+
"href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
|
17
|
+
"id"=>"RF6HsnqferSuES9VZEWrthG2",
|
18
18
|
"links"=>
|
19
|
-
{"debit"=>"
|
19
|
+
{"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
|
20
20
|
"meta"=>
|
21
21
|
{"fulfillment.item.condition"=>"OK",
|
22
22
|
"merchant.feedback"=>"positive",
|
23
23
|
"user.refund_reason"=>"not happy with product"},
|
24
24
|
"status"=>"succeeded",
|
25
|
-
"transaction_number"=>"
|
26
|
-
"updated_at"=>"2014-
|
25
|
+
"transaction_number"=>"RF348-549-7723",
|
26
|
+
"updated_at"=>"2014-03-06T19:23:48.234584Z"},
|
27
27
|
@hyperlinks=
|
28
28
|
{"debit"=>
|
29
|
-
#<Proc:
|
29
|
+
#<Proc:0x007ff2bd9d68d8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
30
30
|
"dispute"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007ff2bd9d5ac8/lib/balanced/utils.rb:6 (lambda)>,
|
32
32
|
"events"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007ff2bd9cfa38/lib/balanced/utils.rb:6 (lambda)>,
|
34
34
|
"order"=>
|
35
|
-
#<Proc:
|
35
|
+
#<Proc:0x007ff2bd9ceb88/lib/balanced/utils.rb:6 (lambda)>}>]
|
36
36
|
|
37
37
|
% endif
|
@@ -3,36 +3,36 @@ Balanced::Refund.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
|
-
refund = Balanced::Refund.fetch('/refunds/
|
8
|
+
refund = Balanced::Refund.fetch('/refunds/RF6HsnqferSuES9VZEWrthG2')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Refund:
|
11
|
+
#<Balanced::Refund:0x007ff2bc1125e0
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>3000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-03-06T19:23:46.176138Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Refund for Order #1111",
|
17
|
-
"href"=>"/refunds/
|
18
|
-
"id"=>"
|
17
|
+
"href"=>"/refunds/RF6HsnqferSuES9VZEWrthG2",
|
18
|
+
"id"=>"RF6HsnqferSuES9VZEWrthG2",
|
19
19
|
"links"=>
|
20
|
-
{"debit"=>"
|
20
|
+
{"debit"=>"WD6BKYhbRzlRhfKSE1DcpqS5", "dispute"=>nil, "order"=>nil},
|
21
21
|
"meta"=>
|
22
22
|
{"fulfillment.item.condition"=>"OK",
|
23
23
|
"merchant.feedback"=>"positive",
|
24
24
|
"user.refund_reason"=>"not happy with product"},
|
25
25
|
"status"=>"succeeded",
|
26
|
-
"transaction_number"=>"
|
27
|
-
"updated_at"=>"2014-
|
26
|
+
"transaction_number"=>"RF348-549-7723",
|
27
|
+
"updated_at"=>"2014-03-06T19:23:48.234584Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"debit"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007ff2bd9b5f48/lib/balanced/resources/resource.rb:60 (lambda)>,
|
31
31
|
"dispute"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007ff2bd9b6970/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"events"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007ff2bd9afb98/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"order"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007ff2bd9aed38/lib/balanced/utils.rb:6 (lambda)>}>
|
37
37
|
|
38
38
|
% endif
|