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,60 +3,55 @@ Balanced::Event.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
|
-
event = Balanced::Event.fetch('/events/
|
8
|
+
event = Balanced::Event.fetch('/events/EV754ca810ccb511e3b6ef061e5f402045')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Event:
|
11
|
+
#<Balanced::Event:0x007fa93e99cfc0
|
12
12
|
@attributes=
|
13
13
|
{"callback_statuses"=>
|
14
14
|
{"failed"=>0, "pending"=>0, "retrying"=>0, "succeeded"=>0},
|
15
15
|
"entity"=>
|
16
|
-
{"
|
17
|
-
[{"
|
18
|
-
|
19
|
-
|
16
|
+
{"bank_accounts"=>
|
17
|
+
[{"account_number"=>"xxxxxxxxxxx5555",
|
18
|
+
"account_type"=>"CHECKING",
|
19
|
+
"address"=>
|
20
|
+
{"city"=>nil,
|
21
|
+
"country_code"=>nil,
|
20
22
|
"line1"=>nil,
|
21
23
|
"line2"=>nil,
|
22
|
-
"postal_code"=>
|
24
|
+
"postal_code"=>nil,
|
23
25
|
"state"=>nil},
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
|
33
|
-
|
26
|
+
"bank_name"=>"WELLS FARGO BANK NA",
|
27
|
+
"can_credit"=>true,
|
28
|
+
"can_debit"=>true,
|
29
|
+
"created_at"=>"2014-04-25T20:09:08.031387Z",
|
30
|
+
"fingerprint"=>"6ybvaLUrJy07phK2EQ7pVk",
|
31
|
+
"href"=>"/bank_accounts/BA3z8ko53HDEFwxjmNlc998p",
|
32
|
+
"id"=>"BA3z8ko53HDEFwxjmNlc998p",
|
33
|
+
"links"=>
|
34
|
+
{"bank_account_verification"=>nil,
|
35
|
+
"customer"=>"CU3z3rwGWGazDwwyLy0rNqfj"},
|
34
36
|
"meta"=>{},
|
35
|
-
"name"=>"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"updated_at"=>"2014-03-06T19:22:12.718847Z"}],
|
37
|
+
"name"=>"TEST-MERCHANT-BANK-ACCOUNT",
|
38
|
+
"routing_number"=>"121042882",
|
39
|
+
"updated_at"=>"2014-04-25T20:09:08.031391Z"}],
|
39
40
|
"links"=>
|
40
|
-
{"
|
41
|
-
|
42
|
-
"
|
43
|
-
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
"customers.refunds"=>"/customers/{customers.id}/refunds",
|
50
|
-
"customers.reversals"=>"/customers/{customers.id}/reversals",
|
51
|
-
"customers.source"=>"/resources/{customers.source}",
|
52
|
-
"customers.transactions"=>"/customers/{customers.id}/transactions"}},
|
53
|
-
"href"=>"/events/EVa26caeeea56411e3838802219cc35fd9",
|
54
|
-
"id"=>"EVa26caeeea56411e3838802219cc35fd9",
|
41
|
+
{"bank_accounts.bank_account_verification"=>
|
42
|
+
"/verifications/{bank_accounts.bank_account_verification}",
|
43
|
+
"bank_accounts.bank_account_verifications"=>
|
44
|
+
"/bank_accounts/{bank_accounts.id}/verifications",
|
45
|
+
"bank_accounts.credits"=>"/bank_accounts/{bank_accounts.id}/credits",
|
46
|
+
"bank_accounts.customer"=>"/customers/{bank_accounts.customer}",
|
47
|
+
"bank_accounts.debits"=>"/bank_accounts/{bank_accounts.id}/debits"}},
|
48
|
+
"href"=>"/events/EV754ca810ccb511e3b6ef061e5f402045",
|
49
|
+
"id"=>"EV754ca810ccb511e3b6ef061e5f402045",
|
55
50
|
"links"=>{},
|
56
|
-
"occurred_at"=>"2014-
|
57
|
-
"type"=>"
|
51
|
+
"occurred_at"=>"2014-04-25T20:09:08.031000Z",
|
52
|
+
"type"=>"bank_account.created"},
|
58
53
|
@hyperlinks=
|
59
54
|
{"callbacks"=>
|
60
|
-
#<Proc:
|
55
|
+
#<Proc:0x007fa93e997c50/lib/balanced/utils.rb:6 (lambda)>}>
|
61
56
|
|
62
57
|
% 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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
merchant_customer = Balanced::Customer.fetch('/customers/
|
8
|
+
merchant_customer = Balanced::Customer.fetch('/customers/CU4MnFEab304anOtUtEu5hkN')
|
9
9
|
merchant_customer.create_order(
|
10
10
|
:description => 'Order #12341234'
|
11
11
|
)
|
12
12
|
% elif mode == 'response':
|
13
|
-
#<Balanced::Order:
|
13
|
+
#<Balanced::Order:0x007fa93e965318
|
14
14
|
@attributes=
|
15
15
|
{"amount"=>0,
|
16
16
|
"amount_escrowed"=>0,
|
17
|
-
"created_at"=>"2014-
|
17
|
+
"created_at"=>"2014-04-25T20:18:43.120760Z",
|
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/OR6d55qbtKx5aWSURkQeodRr",
|
28
|
+
"id"=>"OR6d55qbtKx5aWSURkQeodRr",
|
29
|
+
"links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
|
30
30
|
"meta"=>{},
|
31
|
-
"updated_at"=>"2014-
|
31
|
+
"updated_at"=>"2014-04-25T20:18:43.120762Z"},
|
32
32
|
@hyperlinks=
|
33
33
|
{"buyers"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93e95f008/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"credits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93e95cba0/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"debits"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93e956b10/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"merchant"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93e955008/lib/balanced/resources/resource.rb:60 (lambda)>,
|
41
41
|
"refunds"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa93e94f018/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"reversals"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fa93e94d038/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
6
|
|
7
7
|
orders = Balanced::Order.all
|
8
8
|
% elif mode == 'response':
|
9
|
-
[#<Balanced::Order:
|
9
|
+
[#<Balanced::Order:0x007fa93e866c50
|
10
10
|
@attributes=
|
11
11
|
{"amount"=>0,
|
12
12
|
"amount_escrowed"=>0,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-04-25T20:18:43.120760Z",
|
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/OR6d55qbtKx5aWSURkQeodRr",
|
24
|
+
"id"=>"OR6d55qbtKx5aWSURkQeodRr",
|
25
|
+
"links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
|
26
26
|
"meta"=>{},
|
27
|
-
"updated_at"=>"2014-
|
27
|
+
"updated_at"=>"2014-04-25T20:18:43.120762Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"buyers"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa93e864338/lib/balanced/utils.rb:6 (lambda)>,
|
31
31
|
"credits"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93e8563f0/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"debits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93e854500/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"merchant"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93e84ea38/lib/balanced/resources/resource.rb:60 (lambda)>,
|
37
37
|
"refunds"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93e84cbc0/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"reversals"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93e846bd0/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
order = Balanced::Order.fetch('/orders/
|
8
|
+
order = Balanced::Order.fetch('/orders/OR6d55qbtKx5aWSURkQeodRr')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Order:
|
11
|
+
#<Balanced::Order:0x007fa93e82ee68
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>0,
|
14
14
|
"amount_escrowed"=>0,
|
15
|
-
"created_at"=>"2014-
|
15
|
+
"created_at"=>"2014-04-25T20:18:43.120760Z",
|
16
16
|
"currency"=>"USD",
|
17
17
|
"delivery_address"=>
|
18
18
|
{"city"=>nil,
|
@@ -22,23 +22,23 @@ order = Balanced::Order.fetch('/orders/OR6wcEVkOymvs4PairiGEcIx')
|
|
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/OR6d55qbtKx5aWSURkQeodRr",
|
26
|
+
"id"=>"OR6d55qbtKx5aWSURkQeodRr",
|
27
|
+
"links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
|
28
28
|
"meta"=>{},
|
29
|
-
"updated_at"=>"2014-
|
29
|
+
"updated_at"=>"2014-04-25T20:18:43.120762Z"},
|
30
30
|
@hyperlinks=
|
31
31
|
{"buyers"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93e819db0/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"credits"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93e827dc0/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"debits"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93e825750/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"merchant"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93e8139b0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
39
39
|
"refunds"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93e80bd50/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"reversals"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa93e8093e8/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
order = Balanced::Order.fetch('/orders/
|
8
|
+
order = Balanced::Order.fetch('/orders/OR6d55qbtKx5aWSURkQeodRr')
|
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:0x007fa93b7e6058
|
18
18
|
@attributes=
|
19
19
|
{"amount"=>0,
|
20
20
|
"amount_escrowed"=>0,
|
21
|
-
"created_at"=>"2014-
|
21
|
+
"created_at"=>"2014-04-25T20:18:43.120760Z",
|
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/OR6d55qbtKx5aWSURkQeodRr",
|
32
|
+
"id"=>"OR6d55qbtKx5aWSURkQeodRr",
|
33
|
+
"links"=>{"merchant"=>"CU4MnFEab304anOtUtEu5hkN"},
|
34
34
|
"meta"=>{"anykey"=>"valuegoeshere", "product.id"=>"1234567890"},
|
35
|
-
"updated_at"=>"2014-
|
35
|
+
"updated_at"=>"2014-04-25T20:18:46.797463Z"},
|
36
36
|
@hyperlinks=
|
37
37
|
{"buyers"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93b7dfe60/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"credits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93b7ddfe8/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"debits"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa93b7dc148/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"merchant"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fa93b7d66a8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
45
45
|
"refunds"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fa93b7d4830/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"reversals"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fa93b7ce908/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
6
6
|
|
7
|
-
debit = Balanced::Debit.fetch('/debits/
|
7
|
+
debit = Balanced::Debit.fetch('/debits/WD4SOTNKiZbBFrmMk6mfszIl')
|
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:0x007fa93b7ad5f0
|
20
20
|
@attributes=
|
21
21
|
{"amount"=>3000,
|
22
|
-
"created_at"=>"2014-
|
22
|
+
"created_at"=>"2014-04-25T20:10:22.593252Z",
|
23
23
|
"currency"=>"USD",
|
24
24
|
"description"=>"Refund for Order #1111",
|
25
|
-
"href"=>"/refunds/
|
26
|
-
"id"=>"
|
25
|
+
"href"=>"/refunds/RF4VbbS5LdgSxlECITkHg0Zf",
|
26
|
+
"id"=>"RF4VbbS5LdgSxlECITkHg0Zf",
|
27
27
|
"links"=>
|
28
|
-
{"debit"=>"
|
28
|
+
{"debit"=>"WD4SOTNKiZbBFrmMk6mfszIl", "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"=>"RF854-846-2859",
|
35
|
+
"updated_at"=>"2014-04-25T20:10:23.032505Z"},
|
36
36
|
@hyperlinks=
|
37
37
|
{"debit"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa93b7a79c0/lib/balanced/resources/resource.rb:60 (lambda)>,
|
39
39
|
"dispute"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa93b7a6fe8/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"events"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa93b7a5058/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"order"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fa93b7a4680/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
8
|
refunds = Balanced::Refund.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Refund:
|
10
|
+
[#<Balanced::Refund:0x007fa93b7854d8
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>3000,
|
13
|
-
"created_at"=>"2014-
|
13
|
+
"created_at"=>"2014-04-25T20:10:22.593252Z",
|
14
14
|
"currency"=>"USD",
|
15
15
|
"description"=>"Refund for Order #1111",
|
16
|
-
"href"=>"/refunds/
|
17
|
-
"id"=>"
|
16
|
+
"href"=>"/refunds/RF4VbbS5LdgSxlECITkHg0Zf",
|
17
|
+
"id"=>"RF4VbbS5LdgSxlECITkHg0Zf",
|
18
18
|
"links"=>
|
19
|
-
{"debit"=>"
|
19
|
+
{"debit"=>"WD4SOTNKiZbBFrmMk6mfszIl", "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"=>"RF854-846-2859",
|
26
|
+
"updated_at"=>"2014-04-25T20:10:23.032505Z"},
|
27
27
|
@hyperlinks=
|
28
28
|
{"debit"=>
|
29
|
-
#<Proc:
|
29
|
+
#<Proc:0x007fa93b77f718/lib/balanced/resources/resource.rb:60 (lambda)>,
|
30
30
|
"dispute"=>
|
31
|
-
#<Proc:
|
31
|
+
#<Proc:0x007fa93b77ed90/lib/balanced/utils.rb:6 (lambda)>,
|
32
32
|
"events"=>
|
33
|
-
#<Proc:
|
33
|
+
#<Proc:0x007fa93b77ce50/lib/balanced/utils.rb:6 (lambda)>,
|
34
34
|
"order"=>
|
35
|
-
#<Proc:
|
35
|
+
#<Proc:0x007fa93b77c450/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-22IOkhevjZlmRP2do6CZixkkDshTiOjTV')
|
7
7
|
|
8
|
-
refund = Balanced::Refund.fetch('/refunds/
|
8
|
+
refund = Balanced::Refund.fetch('/refunds/RF4VbbS5LdgSxlECITkHg0Zf')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Refund:
|
11
|
+
#<Balanced::Refund:0x007fa93b75f490
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>3000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-04-25T20:10:22.593252Z",
|
15
15
|
"currency"=>"USD",
|
16
16
|
"description"=>"Refund for Order #1111",
|
17
|
-
"href"=>"/refunds/
|
18
|
-
"id"=>"
|
17
|
+
"href"=>"/refunds/RF4VbbS5LdgSxlECITkHg0Zf",
|
18
|
+
"id"=>"RF4VbbS5LdgSxlECITkHg0Zf",
|
19
19
|
"links"=>
|
20
|
-
{"debit"=>"
|
20
|
+
{"debit"=>"WD4SOTNKiZbBFrmMk6mfszIl", "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"=>"RF854-846-2859",
|
27
|
+
"updated_at"=>"2014-04-25T20:10:23.032505Z"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"debit"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa93b75d8e8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
31
31
|
"dispute"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa93b75cf60/lib/balanced/utils.rb:6 (lambda)>,
|
33
33
|
"events"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa93b756fc0/lib/balanced/utils.rb:6 (lambda)>,
|
35
35
|
"order"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa93b7565c0/lib/balanced/utils.rb:6 (lambda)>}>
|
37
37
|
|
38
38
|
% endif
|