balanced 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +10 -6
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/balanced/resources.rb +2 -0
- data/lib/balanced/resources/account.rb +33 -0
- data/lib/balanced/resources/card.rb +1 -1
- data/lib/balanced/resources/customer.rb +8 -0
- data/lib/balanced/resources/resource.rb +4 -6
- data/lib/balanced/resources/settlement.rb +12 -0
- data/lib/balanced/response/balanced_exception_middleware.rb +1 -1
- data/lib/balanced/utils.rb +1 -1
- data/lib/balanced/version.rb +1 -1
- data/scenarios/account_credit/definition.rb +1 -0
- data/scenarios/account_credit/request.rb +5 -0
- data/scenarios/account_credit/ruby.mako +49 -0
- data/scenarios/account_list/definition.rb +1 -0
- data/scenarios/account_list/request.rb +2 -0
- data/scenarios/account_list/ruby.mako +64 -0
- data/scenarios/account_list_customer/definition.rb +1 -0
- data/scenarios/account_list_customer/request.rb +3 -0
- data/scenarios/account_list_customer/ruby.mako +38 -0
- data/scenarios/account_show/definition.rb +1 -0
- data/scenarios/account_show/request.rb +2 -0
- data/scenarios/account_show/ruby.mako +37 -0
- 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 +16 -14
- data/scenarios/bank_account_create/ruby.mako +13 -11
- data/scenarios/bank_account_credit/ruby.mako +16 -16
- data/scenarios/bank_account_debit/ruby.mako +21 -18
- data/scenarios/bank_account_debit_order/definition.rb +1 -0
- data/scenarios/bank_account_debit_order/request.rb +7 -0
- data/scenarios/bank_account_debit_order/ruby.mako +52 -0
- data/scenarios/bank_account_delete/ruby.mako +2 -2
- data/scenarios/bank_account_list/ruby.mako +26 -22
- data/scenarios/bank_account_show/ruby.mako +14 -12
- data/scenarios/bank_account_update/ruby.mako +14 -12
- data/scenarios/bank_account_verification_create/ruby.mako +10 -10
- data/scenarios/bank_account_verification_show/ruby.mako +10 -10
- 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/ruby.mako +26 -26
- data/scenarios/card_create/ruby.mako +13 -15
- data/scenarios/card_create_creditable/ruby.mako +11 -11
- data/scenarios/card_create_dispute/ruby.mako +13 -13
- data/scenarios/card_credit/ruby.mako +16 -14
- data/scenarios/card_credit_order/definition.rb +1 -0
- data/scenarios/card_credit_order/request.rb +7 -0
- data/scenarios/card_credit_order/ruby.mako +45 -0
- data/scenarios/card_debit/ruby.mako +20 -17
- data/scenarios/card_debit_dispute/ruby.mako +20 -17
- data/scenarios/card_delete/ruby.mako +2 -2
- data/scenarios/card_hold_capture/ruby.mako +20 -17
- data/scenarios/card_hold_create/ruby.mako +16 -14
- data/scenarios/card_hold_list/ruby.mako +33 -27
- data/scenarios/card_hold_order/definition.rb +1 -0
- data/scenarios/card_hold_order/request.rb +6 -0
- data/scenarios/card_hold_order/ruby.mako +45 -0
- 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 +17 -15
- data/scenarios/card_list/ruby.mako +25 -29
- data/scenarios/card_show/ruby.mako +14 -16
- data/scenarios/card_update/ruby.mako +14 -16
- data/scenarios/credit_list/ruby.mako +44 -14
- data/scenarios/credit_list_bank_account/ruby.mako +3 -3
- data/scenarios/credit_order/request.rb +2 -2
- data/scenarios/credit_order/ruby.mako +35 -14
- data/scenarios/credit_show/ruby.mako +16 -16
- data/scenarios/credit_update/ruby.mako +16 -16
- data/scenarios/customer_create/ruby.mako +22 -20
- data/scenarios/customer_delete/ruby.mako +1 -1
- data/scenarios/customer_list/ruby.mako +43 -39
- data/scenarios/customer_show/ruby.mako +23 -21
- data/scenarios/customer_update/ruby.mako +23 -21
- data/scenarios/debit_dispute_show/ruby.mako +12 -12
- data/scenarios/debit_list/ruby.mako +43 -37
- data/scenarios/debit_order/ruby.mako +22 -19
- data/scenarios/debit_show/ruby.mako +20 -17
- data/scenarios/debit_update/ruby.mako +20 -17
- data/scenarios/dispute_list/ruby.mako +11 -11
- data/scenarios/dispute_show/ruby.mako +12 -12
- data/scenarios/event_list/ruby.mako +55 -81
- data/scenarios/event_show/ruby.mako +35 -45
- data/scenarios/order_create/ruby.mako +16 -14
- data/scenarios/order_list/ruby.mako +33 -29
- data/scenarios/order_show/ruby.mako +16 -14
- data/scenarios/order_update/ruby.mako +16 -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/reversal_create/ruby.mako +13 -13
- data/scenarios/reversal_list/ruby.mako +12 -12
- data/scenarios/reversal_show/ruby.mako +13 -13
- data/scenarios/reversal_update/ruby.mako +13 -13
- data/scenarios/settlement_create/definition.rb +1 -0
- data/scenarios/settlement_create/request.rb +5 -0
- data/scenarios/settlement_create/ruby.mako +48 -0
- data/scenarios/settlement_list/definition.rb +1 -0
- data/scenarios/settlement_list/request.rb +2 -0
- data/scenarios/settlement_list/ruby.mako +40 -0
- data/scenarios/settlement_list_account/definition.rb +1 -0
- data/scenarios/settlement_list_account/request.rb +3 -0
- data/scenarios/settlement_list_account/ruby.mako +41 -0
- data/scenarios/settlement_show/definition.rb +1 -0
- data/scenarios/settlement_show/request.rb +2 -0
- data/scenarios/settlement_show/ruby.mako +40 -0
- data/snippets/account-balance.rb +1 -0
- data/snippets/bank-account-create.rb +6 -0
- data/snippets/bank-account-debit.rb +9 -0
- data/snippets/bank-account-verification-confirm.rb +5 -0
- data/snippets/bank-account-verification-create.rb +1 -0
- data/snippets/callback-create.rb +4 -0
- data/snippets/card-associate-to-customer.rb +2 -0
- data/snippets/card-create-dispute.rb +6 -0
- data/snippets/card-create.rb +7 -0
- data/snippets/card-credit.rb +9 -0
- data/snippets/card-debit.rb +9 -0
- data/snippets/card-hold-capture.rb +6 -0
- data/snippets/card-hold-create.rb +6 -0
- data/snippets/card-hold-void.rb +3 -0
- data/snippets/create-buyer-and-card.rb +13 -0
- data/snippets/credit-create.rb +8 -0
- data/snippets/credit-fetch.rb +1 -0
- data/snippets/credit-marketplace-escrow.rb +4 -0
- data/snippets/credit-reverse.rb +1 -0
- data/snippets/credit-soft-descriptor.rb +9 -0
- data/snippets/credit-split.rb +13 -0
- data/snippets/customer-create.rb +8 -0
- data/snippets/debit-dispute-show.rb +3 -0
- data/snippets/debit-fetch.rb +1 -0
- data/snippets/debit-marketplace-escrow.rb +4 -0
- data/snippets/debit-refund.rb +1 -0
- data/snippets/dispute-list.rb +1 -0
- data/snippets/dispute-show.rb +2 -0
- data/snippets/examine-order-after-refund.rb +3 -0
- data/snippets/examine-order-after-reversal.rb +3 -0
- data/snippets/example.rb +1 -0
- data/snippets/marketplace-in-escrow.rb +1 -0
- data/snippets/merchant-payable-account-fetch.rb +2 -0
- data/snippets/order-amount-escrowed.rb +3 -0
- data/snippets/order-bank-account-create.rb +8 -0
- data/snippets/order-create.rb +1 -0
- data/snippets/order-credit-marketplace.rb +5 -0
- data/snippets/order-credit-merchant-payable-account.rb +4 -0
- data/snippets/order-credit.rb +4 -0
- data/snippets/order-credits-fetch.rb +1 -0
- data/snippets/order-debit.rb +4 -0
- data/snippets/order-debits-fetch.rb +1 -0
- data/snippets/order-fetch.rb +1 -0
- data/snippets/order-update.rb +5 -0
- data/snippets/refund-create.rb +13 -0
- data/snippets/reversal-create.rb +13 -0
- data/snippets/settlement-create.rb +5 -0
- data/spec/balanced/resources/account_spec.rb +265 -0
- data/spec/balanced/resources/card_spec.rb +6 -6
- metadata +86 -2
@@ -3,11 +3,11 @@ Balanced::Customer.all
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
8
|
customers = Balanced::Customer.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Customer:
|
10
|
+
[#<Balanced::Customer:0x007fcde09f0528
|
11
11
|
@attributes=
|
12
12
|
{"address"=>
|
13
13
|
{"city"=>nil,
|
@@ -17,48 +17,50 @@ customers = Balanced::Customer.all
|
|
17
17
|
"postal_code"=>"48120",
|
18
18
|
"state"=>nil},
|
19
19
|
"business_name"=>nil,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-12-17T21:25:16.650481Z",
|
21
21
|
"dob_month"=>7,
|
22
22
|
"dob_year"=>1963,
|
23
23
|
"ein"=>nil,
|
24
24
|
"email"=>nil,
|
25
|
-
"href"=>"/customers/
|
26
|
-
"id"=>"
|
25
|
+
"href"=>"/customers/CU7s0pNLu0DEtFKtoljSeCAB",
|
26
|
+
"id"=>"CU7s0pNLu0DEtFKtoljSeCAB",
|
27
27
|
"links"=>{"destination"=>nil, "source"=>nil},
|
28
28
|
"merchant_status"=>"underwritten",
|
29
29
|
"meta"=>{},
|
30
30
|
"name"=>"Henry Ford",
|
31
31
|
"phone"=>nil,
|
32
32
|
"ssn_last4"=>nil,
|
33
|
-
"updated_at"=>"2014-
|
33
|
+
"updated_at"=>"2014-12-17T21:25:16.874084Z"},
|
34
34
|
@hyperlinks=
|
35
|
-
{"
|
36
|
-
#<Proc:
|
35
|
+
{"accounts"=>
|
36
|
+
#<Proc:0x007fcde09ea420/lib/balanced/utils.rb:6 (lambda)>,
|
37
|
+
"bank_accounts"=>
|
38
|
+
#<Proc:0x007fcde09e83f0/lib/balanced/utils.rb:6 (lambda)>,
|
37
39
|
"card_holds"=>
|
38
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fcde09c2538/lib/balanced/utils.rb:6 (lambda)>,
|
39
41
|
"cards"=>
|
40
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde09c0580/lib/balanced/utils.rb:6 (lambda)>,
|
41
43
|
"credits"=>
|
42
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fcde09a20d0/lib/balanced/utils.rb:6 (lambda)>,
|
43
45
|
"debits"=>
|
44
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde09a0258/lib/balanced/utils.rb:6 (lambda)>,
|
45
47
|
"destination"=>
|
46
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde099b848/lib/balanced/utils.rb:6 (lambda)>,
|
47
49
|
"disputes"=>
|
48
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde09999f8/lib/balanced/utils.rb:6 (lambda)>,
|
49
51
|
"external_accounts"=>
|
50
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fcde0993850/lib/balanced/utils.rb:6 (lambda)>,
|
51
53
|
"orders"=>
|
52
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde09919d8/lib/balanced/utils.rb:6 (lambda)>,
|
53
55
|
"refunds"=>
|
54
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fcde098bb28/lib/balanced/utils.rb:6 (lambda)>,
|
55
57
|
"reversals"=>
|
56
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fcde0989cb0/lib/balanced/utils.rb:6 (lambda)>,
|
57
59
|
"source"=>
|
58
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fcde0989058/lib/balanced/utils.rb:6 (lambda)>,
|
59
61
|
"transactions"=>
|
60
|
-
#<Proc:
|
61
|
-
#<Balanced::Customer:
|
62
|
+
#<Proc:0x007fcde0982820/lib/balanced/utils.rb:6 (lambda)>}>,
|
63
|
+
#<Balanced::Customer:0x007fcde09827d0
|
62
64
|
@attributes=
|
63
65
|
{"address"=>
|
64
66
|
{"city"=>nil,
|
@@ -68,46 +70,48 @@ customers = Balanced::Customer.all
|
|
68
70
|
"postal_code"=>"48120",
|
69
71
|
"state"=>nil},
|
70
72
|
"business_name"=>nil,
|
71
|
-
"created_at"=>"2014-
|
73
|
+
"created_at"=>"2014-12-17T21:24:04.003984Z",
|
72
74
|
"dob_month"=>7,
|
73
75
|
"dob_year"=>1963,
|
74
76
|
"ein"=>nil,
|
75
77
|
"email"=>nil,
|
76
|
-
"href"=>"/customers/
|
77
|
-
"id"=>"
|
78
|
+
"href"=>"/customers/CU68iUpvvUwpRpuuBL3u9Slq",
|
79
|
+
"id"=>"CU68iUpvvUwpRpuuBL3u9Slq",
|
78
80
|
"links"=>{"destination"=>nil, "source"=>nil},
|
79
81
|
"merchant_status"=>"underwritten",
|
80
82
|
"meta"=>{},
|
81
83
|
"name"=>"Henry Ford",
|
82
84
|
"phone"=>nil,
|
83
85
|
"ssn_last4"=>nil,
|
84
|
-
"updated_at"=>"2014-
|
86
|
+
"updated_at"=>"2014-12-17T21:24:04.245364Z"},
|
85
87
|
@hyperlinks=
|
86
|
-
{"
|
87
|
-
#<Proc:
|
88
|
+
{"accounts"=>
|
89
|
+
#<Proc:0x007fcde09801d8/lib/balanced/utils.rb:6 (lambda)>,
|
90
|
+
"bank_accounts"=>
|
91
|
+
#<Proc:0x007fcde09799a0/lib/balanced/utils.rb:6 (lambda)>,
|
88
92
|
"card_holds"=>
|
89
|
-
#<Proc:
|
93
|
+
#<Proc:0x007fcde0973168/lib/balanced/utils.rb:6 (lambda)>,
|
90
94
|
"cards"=>
|
91
|
-
#<Proc:
|
95
|
+
#<Proc:0x007fcde09708f0/lib/balanced/utils.rb:6 (lambda)>,
|
92
96
|
"credits"=>
|
93
|
-
#<Proc:
|
97
|
+
#<Proc:0x007fcde0969fa0/lib/balanced/utils.rb:6 (lambda)>,
|
94
98
|
"debits"=>
|
95
|
-
#<Proc:
|
99
|
+
#<Proc:0x007fcde0963920/lib/balanced/utils.rb:6 (lambda)>,
|
96
100
|
"destination"=>
|
97
|
-
#<Proc:
|
101
|
+
#<Proc:0x007fcde0962e30/lib/balanced/utils.rb:6 (lambda)>,
|
98
102
|
"disputes"=>
|
99
|
-
#<Proc:
|
103
|
+
#<Proc:0x007fcde0960608/lib/balanced/utils.rb:6 (lambda)>,
|
100
104
|
"external_accounts"=>
|
101
|
-
#<Proc:
|
105
|
+
#<Proc:0x007fcde093e4b8/lib/balanced/utils.rb:6 (lambda)>,
|
102
106
|
"orders"=>
|
103
|
-
#<Proc:
|
107
|
+
#<Proc:0x007fcde093c280/lib/balanced/utils.rb:6 (lambda)>,
|
104
108
|
"refunds"=>
|
105
|
-
#<Proc:
|
109
|
+
#<Proc:0x007fcde0935e80/lib/balanced/utils.rb:6 (lambda)>,
|
106
110
|
"reversals"=>
|
107
|
-
#<Proc:
|
111
|
+
#<Proc:0x007fcde0934030/lib/balanced/utils.rb:6 (lambda)>,
|
108
112
|
"source"=>
|
109
|
-
#<Proc:
|
113
|
+
#<Proc:0x007fcde092f558/lib/balanced/utils.rb:6 (lambda)>,
|
110
114
|
"transactions"=>
|
111
|
-
#<Proc:
|
115
|
+
#<Proc:0x007fcde092d578/lib/balanced/utils.rb:6 (lambda)>}>]
|
112
116
|
|
113
117
|
% endif
|
@@ -3,11 +3,11 @@ Balanced::Customer.fetch
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
|
-
customer = Balanced::Customer.fetch('/customers/
|
8
|
+
customer = Balanced::Customer.fetch('/customers/CU7s0pNLu0DEtFKtoljSeCAB')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Customer:
|
10
|
+
#<Balanced::Customer:0x007fcde3995aa8
|
11
11
|
@attributes=
|
12
12
|
{"address"=>
|
13
13
|
{"city"=>nil,
|
@@ -17,46 +17,48 @@ customer = Balanced::Customer.fetch('/customers/CU4ZKTtaAaR7Rc5M8EP2gLlP')
|
|
17
17
|
"postal_code"=>"48120",
|
18
18
|
"state"=>nil},
|
19
19
|
"business_name"=>nil,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-12-17T21:25:16.650481Z",
|
21
21
|
"dob_month"=>7,
|
22
22
|
"dob_year"=>1963,
|
23
23
|
"ein"=>nil,
|
24
24
|
"email"=>nil,
|
25
|
-
"href"=>"/customers/
|
26
|
-
"id"=>"
|
25
|
+
"href"=>"/customers/CU7s0pNLu0DEtFKtoljSeCAB",
|
26
|
+
"id"=>"CU7s0pNLu0DEtFKtoljSeCAB",
|
27
27
|
"links"=>{"destination"=>nil, "source"=>nil},
|
28
28
|
"merchant_status"=>"underwritten",
|
29
29
|
"meta"=>{},
|
30
30
|
"name"=>"Henry Ford",
|
31
31
|
"phone"=>nil,
|
32
32
|
"ssn_last4"=>nil,
|
33
|
-
"updated_at"=>"2014-
|
33
|
+
"updated_at"=>"2014-12-17T21:25:16.874084Z"},
|
34
34
|
@hyperlinks=
|
35
|
-
{"
|
36
|
-
#<Proc:
|
35
|
+
{"accounts"=>
|
36
|
+
#<Proc:0x007fcde398c688/lib/balanced/utils.rb:6 (lambda)>,
|
37
|
+
"bank_accounts"=>
|
38
|
+
#<Proc:0x007fcde3984b90/lib/balanced/utils.rb:6 (lambda)>,
|
37
39
|
"card_holds"=>
|
38
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fcde3966708/lib/balanced/utils.rb:6 (lambda)>,
|
39
41
|
"cards"=>
|
40
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde395da68/lib/balanced/utils.rb:6 (lambda)>,
|
41
43
|
"credits"=>
|
42
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fcde3955138/lib/balanced/utils.rb:6 (lambda)>,
|
43
45
|
"debits"=>
|
44
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde3947d58/lib/balanced/utils.rb:6 (lambda)>,
|
45
47
|
"destination"=>
|
46
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde39469f8/lib/balanced/utils.rb:6 (lambda)>,
|
47
49
|
"disputes"=>
|
48
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde393ed48/lib/balanced/utils.rb:6 (lambda)>,
|
49
51
|
"external_accounts"=>
|
50
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fcde39377f0/lib/balanced/utils.rb:6 (lambda)>,
|
51
53
|
"orders"=>
|
52
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde392f730/lib/balanced/utils.rb:6 (lambda)>,
|
53
55
|
"refunds"=>
|
54
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fcde392c238/lib/balanced/utils.rb:6 (lambda)>,
|
55
57
|
"reversals"=>
|
56
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fcde3925078/lib/balanced/utils.rb:6 (lambda)>,
|
57
59
|
"source"=>
|
58
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fcde39241c8/lib/balanced/utils.rb:6 (lambda)>,
|
59
61
|
"transactions"=>
|
60
|
-
#<Proc:
|
62
|
+
#<Proc:0x007fcde391d2d8/lib/balanced/utils.rb:6 (lambda)>}>
|
61
63
|
|
62
64
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::Customer.save
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
|
-
customer = Balanced::Customer.fetch('/customers/
|
8
|
+
customer = Balanced::Customer.fetch('/customers/CU7s0pNLu0DEtFKtoljSeCAB')
|
9
9
|
customer.email = 'email@newdomain.com'
|
10
10
|
customer.meta = {
|
11
11
|
'shipping-preference' => 'ground'
|
@@ -13,7 +13,7 @@ customer.meta = {
|
|
13
13
|
customer.save
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::Customer:
|
16
|
+
#<Balanced::Customer:0x007fcde389e550
|
17
17
|
@attributes=
|
18
18
|
{"address"=>
|
19
19
|
{"city"=>nil,
|
@@ -23,46 +23,48 @@ customer.save
|
|
23
23
|
"postal_code"=>"48120",
|
24
24
|
"state"=>nil},
|
25
25
|
"business_name"=>nil,
|
26
|
-
"created_at"=>"2014-
|
26
|
+
"created_at"=>"2014-12-17T21:25:16.650481Z",
|
27
27
|
"dob_month"=>7,
|
28
28
|
"dob_year"=>1963,
|
29
29
|
"ein"=>nil,
|
30
30
|
"email"=>"email@newdomain.com",
|
31
|
-
"href"=>"/customers/
|
32
|
-
"id"=>"
|
31
|
+
"href"=>"/customers/CU7s0pNLu0DEtFKtoljSeCAB",
|
32
|
+
"id"=>"CU7s0pNLu0DEtFKtoljSeCAB",
|
33
33
|
"links"=>{"destination"=>nil, "source"=>nil},
|
34
34
|
"merchant_status"=>"underwritten",
|
35
35
|
"meta"=>{"shipping-preference"=>"ground"},
|
36
36
|
"name"=>"Henry Ford",
|
37
37
|
"phone"=>nil,
|
38
38
|
"ssn_last4"=>nil,
|
39
|
-
"updated_at"=>"2014-
|
39
|
+
"updated_at"=>"2014-12-17T21:25:20.761467Z"},
|
40
40
|
@hyperlinks=
|
41
|
-
{"
|
42
|
-
#<Proc:
|
41
|
+
{"accounts"=>
|
42
|
+
#<Proc:0x007fcde116beb0/lib/balanced/utils.rb:6 (lambda)>,
|
43
|
+
"bank_accounts"=>
|
44
|
+
#<Proc:0x007fcde1160498/lib/balanced/utils.rb:6 (lambda)>,
|
43
45
|
"card_holds"=>
|
44
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde1150548/lib/balanced/utils.rb:6 (lambda)>,
|
45
47
|
"cards"=>
|
46
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde1141548/lib/balanced/utils.rb:6 (lambda)>,
|
47
49
|
"credits"=>
|
48
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde112e6f0/lib/balanced/utils.rb:6 (lambda)>,
|
49
51
|
"debits"=>
|
50
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fcde1117f68/lib/balanced/utils.rb:6 (lambda)>,
|
51
53
|
"destination"=>
|
52
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde1116000/lib/balanced/utils.rb:6 (lambda)>,
|
53
55
|
"disputes"=>
|
54
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fcde110f598/lib/balanced/utils.rb:6 (lambda)>,
|
55
57
|
"external_accounts"=>
|
56
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fcde1107078/lib/balanced/utils.rb:6 (lambda)>,
|
57
59
|
"orders"=>
|
58
|
-
#<Proc:
|
60
|
+
#<Proc:0x007fcde10e6418/lib/balanced/utils.rb:6 (lambda)>,
|
59
61
|
"refunds"=>
|
60
|
-
#<Proc:
|
62
|
+
#<Proc:0x007fcde10cc6d0/lib/balanced/utils.rb:6 (lambda)>,
|
61
63
|
"reversals"=>
|
62
|
-
#<Proc:
|
64
|
+
#<Proc:0x007fcde10b6420/lib/balanced/utils.rb:6 (lambda)>,
|
63
65
|
"source"=>
|
64
|
-
#<Proc:
|
66
|
+
#<Proc:0x007fcde10b5048/lib/balanced/utils.rb:6 (lambda)>,
|
65
67
|
"transactions"=>
|
66
|
-
#<Proc:
|
68
|
+
#<Proc:0x007fcde10aece8/lib/balanced/utils.rb:6 (lambda)>}>
|
67
69
|
|
68
70
|
% endif
|
@@ -2,30 +2,30 @@
|
|
2
2
|
Balanced::Debit.dispute
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
|
-
debit = Balanced::Debit.fetch('/debits/
|
7
|
+
debit = Balanced::Debit.fetch('/debits/WD7M75BRYlRsQTImIHFf8O9W')
|
8
8
|
dispute = debit.dispute
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Dispute:
|
11
|
+
#<Balanced::Dispute:0x007fcde08a0718
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
|
-
"created_at"=>"2014-
|
14
|
+
"created_at"=>"2014-12-17T21:25:45.321785Z",
|
15
15
|
"currency"=>"USD",
|
16
|
-
"href"=>"/disputes/
|
17
|
-
"id"=>"
|
18
|
-
"initiated_at"=>"2014-
|
19
|
-
"links"=>{"transaction"=>"
|
16
|
+
"href"=>"/disputes/DTbbQLxrNf790FmaKsgqRPa",
|
17
|
+
"id"=>"DTbbQLxrNf790FmaKsgqRPa",
|
18
|
+
"initiated_at"=>"2014-12-17T21:23:52.616968Z",
|
19
|
+
"links"=>{"transaction"=>"WD7M75BRYlRsQTImIHFf8O9W"},
|
20
20
|
"meta"=>{},
|
21
21
|
"reason"=>"fraud",
|
22
|
-
"respond_by"=>"
|
22
|
+
"respond_by"=>"2015-01-16T21:23:52.616970Z",
|
23
23
|
"status"=>"pending",
|
24
|
-
"updated_at"=>"2014-
|
24
|
+
"updated_at"=>"2014-12-17T21:25:45.321787Z"},
|
25
25
|
@hyperlinks=
|
26
26
|
{"events"=>
|
27
|
-
#<Proc:
|
27
|
+
#<Proc:0x007fcde088ab70/lib/balanced/utils.rb:6 (lambda)>,
|
28
28
|
"transaction"=>
|
29
|
-
#<Proc:
|
29
|
+
#<Proc:0x007fcde0851690/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
30
30
|
|
31
31
|
% endif
|
@@ -3,75 +3,81 @@ Balanced::Debit.all
|
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
6
|
-
Balanced.configure('ak-test-
|
6
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
7
7
|
|
8
8
|
debits = Balanced::Debit.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Debit:
|
10
|
+
[#<Balanced::Debit:0x007fcde197e940
|
11
11
|
@attributes=
|
12
12
|
{"amount"=>5000,
|
13
|
-
"appears_on_statement_as"=>"BAL*
|
14
|
-
"created_at"=>"2014-
|
13
|
+
"appears_on_statement_as"=>"BAL*Statement text",
|
14
|
+
"created_at"=>"2014-12-17T21:25:24.286272Z",
|
15
15
|
"currency"=>"USD",
|
16
|
-
"description"=>"
|
16
|
+
"description"=>"Some descriptive text for the debit in the dashboard",
|
17
17
|
"failure_reason"=>nil,
|
18
18
|
"failure_reason_code"=>nil,
|
19
|
-
"href"=>"/debits/
|
20
|
-
"id"=>"
|
19
|
+
"href"=>"/debits/WD7AAkAyeN6YTeHJTn1ThPYA",
|
20
|
+
"id"=>"WD7AAkAyeN6YTeHJTn1ThPYA",
|
21
21
|
"links"=>
|
22
|
-
{"
|
22
|
+
{"card_hold"=>"HL7Az4UI0XU8rHAqmNY0Snp6",
|
23
|
+
"customer"=>nil,
|
23
24
|
"dispute"=>nil,
|
24
|
-
"order"=>
|
25
|
-
"source"=>"
|
25
|
+
"order"=>nil,
|
26
|
+
"source"=>"CC73IyzxPUu2z89NH8GrJhLn"},
|
26
27
|
"meta"=>{},
|
27
28
|
"status"=>"succeeded",
|
28
|
-
"transaction_number"=>"
|
29
|
-
"updated_at"=>"2014-
|
29
|
+
"transaction_number"=>"WDQN-HJW-1YIP",
|
30
|
+
"updated_at"=>"2014-12-17T21:25:25.027834Z"},
|
30
31
|
@hyperlinks=
|
31
|
-
{"
|
32
|
-
#<Proc:
|
32
|
+
{"card_hold"=>
|
33
|
+
#<Proc:0x007fcde197ce10/lib/balanced/resources/resource.rb:56 (lambda)>,
|
34
|
+
"customer"=>
|
35
|
+
#<Proc:0x007fcde197c488/lib/balanced/utils.rb:6 (lambda)>,
|
33
36
|
"dispute"=>
|
34
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fcde09abb08/lib/balanced/utils.rb:6 (lambda)>,
|
35
38
|
"events"=>
|
36
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fcde09a9c40/lib/balanced/utils.rb:6 (lambda)>,
|
37
40
|
"order"=>
|
38
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fcde09a91f0/lib/balanced/utils.rb:6 (lambda)>,
|
39
42
|
"refunds"=>
|
40
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fcde09bb3a0/lib/balanced/utils.rb:6 (lambda)>,
|
41
44
|
"source"=>
|
42
|
-
#<Proc:
|
43
|
-
#<Balanced::Debit:
|
45
|
+
#<Proc:0x007fcde09b9a28/lib/balanced/resources/resource.rb:56 (lambda)>}>,
|
46
|
+
#<Balanced::Debit:0x007fcde09b99d8
|
44
47
|
@attributes=
|
45
48
|
{"amount"=>5000,
|
46
|
-
"appears_on_statement_as"=>"BAL*
|
47
|
-
"created_at"=>"2014-
|
49
|
+
"appears_on_statement_as"=>"BAL*example.com",
|
50
|
+
"created_at"=>"2014-12-17T21:25:04.086780Z",
|
48
51
|
"currency"=>"USD",
|
49
|
-
"description"=>"
|
52
|
+
"description"=>"Order #12341234",
|
50
53
|
"failure_reason"=>nil,
|
51
54
|
"failure_reason_code"=>nil,
|
52
|
-
"href"=>"/debits/
|
53
|
-
"id"=>"
|
55
|
+
"href"=>"/debits/WD7dRwgfkmvirShpxn7JA8JL",
|
56
|
+
"id"=>"WD7dRwgfkmvirShpxn7JA8JL",
|
54
57
|
"links"=>
|
55
|
-
{"
|
58
|
+
{"card_hold"=>"HL7dQKkSsFJpaZppKe2pB4TX",
|
59
|
+
"customer"=>nil,
|
56
60
|
"dispute"=>nil,
|
57
|
-
"order"=>
|
58
|
-
"source"=>"
|
61
|
+
"order"=>"OR6c6n11zKSFfjE6kGNKtsE8",
|
62
|
+
"source"=>"CC73IyzxPUu2z89NH8GrJhLn"},
|
59
63
|
"meta"=>{},
|
60
64
|
"status"=>"succeeded",
|
61
|
-
"transaction_number"=>"
|
62
|
-
"updated_at"=>"2014-
|
65
|
+
"transaction_number"=>"WG9L-4UP-ZQQN",
|
66
|
+
"updated_at"=>"2014-12-17T21:25:04.922248Z"},
|
63
67
|
@hyperlinks=
|
64
|
-
{"
|
65
|
-
#<Proc:
|
68
|
+
{"card_hold"=>
|
69
|
+
#<Proc:0x007fcde09cbe58/lib/balanced/resources/resource.rb:56 (lambda)>,
|
70
|
+
"customer"=>
|
71
|
+
#<Proc:0x007fcde09cb4d0/lib/balanced/utils.rb:6 (lambda)>,
|
66
72
|
"dispute"=>
|
67
|
-
#<Proc:
|
73
|
+
#<Proc:0x007fcde09cab48/lib/balanced/utils.rb:6 (lambda)>,
|
68
74
|
"events"=>
|
69
|
-
#<Proc:
|
75
|
+
#<Proc:0x007fcde09c8d20/lib/balanced/utils.rb:6 (lambda)>,
|
70
76
|
"order"=>
|
71
|
-
#<Proc:
|
77
|
+
#<Proc:0x007fcde09d3310/lib/balanced/resources/resource.rb:56 (lambda)>,
|
72
78
|
"refunds"=>
|
73
|
-
#<Proc:
|
79
|
+
#<Proc:0x007fcde09d14e8/lib/balanced/utils.rb:6 (lambda)>,
|
74
80
|
"source"=>
|
75
|
-
#<Proc:
|
81
|
+
#<Proc:0x007fcde09dbb28/lib/balanced/resources/resource.rb:56 (lambda)>}>]
|
76
82
|
|
77
83
|
% endif
|