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
@@ -2,12 +2,12 @@
|
|
2
2
|
Balanced::BankAccount.fetch
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
|
-
bank_account = Balanced::BankAccount.fetch('/bank_accounts/
|
7
|
+
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA6z9hDVGj7utvQSiIhHuuhf')
|
8
8
|
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::BankAccount:
|
10
|
+
#<Balanced::BankAccount:0x007fcde12a11e0
|
11
11
|
@attributes=
|
12
12
|
{"account_number"=>"xxxxxx0001",
|
13
13
|
"account_type"=>"checking",
|
@@ -21,26 +21,28 @@ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA2EmblHC08bmwiwwNrbI
|
|
21
21
|
"bank_name"=>"BANK OF AMERICA, N.A.",
|
22
22
|
"can_credit"=>true,
|
23
23
|
"can_debit"=>false,
|
24
|
-
"created_at"=>"2014-
|
24
|
+
"created_at"=>"2014-12-17T21:24:27.877249Z",
|
25
25
|
"fingerprint"=>
|
26
26
|
"5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14",
|
27
|
-
"href"=>"/bank_accounts/
|
28
|
-
"id"=>"
|
27
|
+
"href"=>"/bank_accounts/BA6z9hDVGj7utvQSiIhHuuhf",
|
28
|
+
"id"=>"BA6z9hDVGj7utvQSiIhHuuhf",
|
29
29
|
"links"=>{"bank_account_verification"=>nil, "customer"=>nil},
|
30
30
|
"meta"=>{},
|
31
31
|
"name"=>"Johann Bernoulli",
|
32
32
|
"routing_number"=>"121000358",
|
33
|
-
"updated_at"=>"2014-
|
33
|
+
"updated_at"=>"2014-12-17T21:24:27.877250Z"},
|
34
34
|
@hyperlinks=
|
35
35
|
{"bank_account_verification"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fcde12a0678/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"bank_account_verifications"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fcde1298e50/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"credits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fcde1288ca8/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"customer"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fcde1282e70/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"debits"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fcde12796e0/lib/balanced/utils.rb:6 (lambda)>,
|
45
|
+
"settlements"=>
|
46
|
+
#<Proc:0x007fcde122c200/lib/balanced/utils.rb:6 (lambda)>}>
|
45
47
|
|
46
48
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::BankAccount.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
|
-
bank_account = Balanced::BankAccount.fetch('/bank_accounts/
|
8
|
+
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA6z9hDVGj7utvQSiIhHuuhf')
|
9
9
|
bank_account.meta = {
|
10
10
|
'facebook.user_id' => '0192837465',
|
11
11
|
'my-own-customer-id' => '12345',
|
@@ -14,7 +14,7 @@ bank_account.meta = {
|
|
14
14
|
bank_account.save
|
15
15
|
|
16
16
|
% elif mode == 'response':
|
17
|
-
#<Balanced::BankAccount:
|
17
|
+
#<Balanced::BankAccount:0x007fcde1219290
|
18
18
|
@attributes=
|
19
19
|
{"account_number"=>"xxxxxx0001",
|
20
20
|
"account_type"=>"checking",
|
@@ -28,11 +28,11 @@ bank_account.save
|
|
28
28
|
"bank_name"=>"BANK OF AMERICA, N.A.",
|
29
29
|
"can_credit"=>true,
|
30
30
|
"can_debit"=>false,
|
31
|
-
"created_at"=>"2014-
|
31
|
+
"created_at"=>"2014-12-17T21:24:27.877249Z",
|
32
32
|
"fingerprint"=>
|
33
33
|
"5f0ba9fa3f1122ef13b944a40abfe44e7eba9e16934e64200913cb4c402ace14",
|
34
|
-
"href"=>"/bank_accounts/
|
35
|
-
"id"=>"
|
34
|
+
"href"=>"/bank_accounts/BA6z9hDVGj7utvQSiIhHuuhf",
|
35
|
+
"id"=>"BA6z9hDVGj7utvQSiIhHuuhf",
|
36
36
|
"links"=>{"bank_account_verification"=>nil, "customer"=>nil},
|
37
37
|
"meta"=>
|
38
38
|
{"facebook.user_id"=>"0192837465",
|
@@ -40,17 +40,19 @@ bank_account.save
|
|
40
40
|
"twitter.id"=>"1234987650"},
|
41
41
|
"name"=>"Johann Bernoulli",
|
42
42
|
"routing_number"=>"121000358",
|
43
|
-
"updated_at"=>"2014-
|
43
|
+
"updated_at"=>"2014-12-17T21:24:31.668447Z"},
|
44
44
|
@hyperlinks=
|
45
45
|
{"bank_account_verification"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fcde1218520/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"bank_account_verifications"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fcde1212698/lib/balanced/utils.rb:6 (lambda)>,
|
49
49
|
"credits"=>
|
50
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fcde12105c8/lib/balanced/utils.rb:6 (lambda)>,
|
51
51
|
"customer"=>
|
52
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fcde120bcf8/lib/balanced/utils.rb:6 (lambda)>,
|
53
53
|
"debits"=>
|
54
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde1209c00/lib/balanced/utils.rb:6 (lambda)>,
|
55
|
+
"settlements"=>
|
56
|
+
#<Proc:0x007fcde1203df0/lib/balanced/utils.rb:6 (lambda)>}>
|
55
57
|
|
56
58
|
% endif
|
@@ -3,26 +3,26 @@ Balanced::BankAccount.verify
|
|
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
|
-
bank_account = Balanced::BankAccount.fetch('/bank_accounts/
|
8
|
+
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA6m4zboF7ocvKbkhjszP5NS')
|
9
9
|
verification = bank_account.verify
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
12
|
-
#<Balanced::BankAccountVerification:
|
12
|
+
#<Balanced::BankAccountVerification:0x007fcde11e3bb8
|
13
13
|
@attributes=
|
14
14
|
{"attempts"=>0,
|
15
15
|
"attempts_remaining"=>3,
|
16
|
-
"created_at"=>"2014-
|
17
|
-
"deposit_status"=>"
|
18
|
-
"href"=>"/verifications/
|
19
|
-
"id"=>"
|
20
|
-
"links"=>{"bank_account"=>"
|
16
|
+
"created_at"=>"2014-12-17T21:24:23.094396Z",
|
17
|
+
"deposit_status"=>"pending",
|
18
|
+
"href"=>"/verifications/BZ6tLSIRoUIhzntA96EfMaQl",
|
19
|
+
"id"=>"BZ6tLSIRoUIhzntA96EfMaQl",
|
20
|
+
"links"=>{"bank_account"=>"BA6m4zboF7ocvKbkhjszP5NS"},
|
21
21
|
"meta"=>{},
|
22
|
-
"updated_at"=>"2014-
|
22
|
+
"updated_at"=>"2014-12-17T21:24:23.094398Z",
|
23
23
|
"verification_status"=>"pending"},
|
24
24
|
@hyperlinks=
|
25
25
|
{"bank_account"=>
|
26
|
-
#<Proc:
|
26
|
+
#<Proc:0x007fcde11e2010/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
27
27
|
|
28
28
|
% endif
|
@@ -3,25 +3,25 @@ Balanced::BankAccountVerification.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
|
-
verification = Balanced::BankAccountVerification.fetch('/verifications/
|
8
|
+
verification = Balanced::BankAccountVerification.fetch('/verifications/BZ6tLSIRoUIhzntA96EfMaQl')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::BankAccountVerification:
|
11
|
+
#<Balanced::BankAccountVerification:0x007fcde18e4fe8
|
12
12
|
@attributes=
|
13
13
|
{"attempts"=>0,
|
14
14
|
"attempts_remaining"=>3,
|
15
|
-
"created_at"=>"2014-
|
16
|
-
"deposit_status"=>"
|
17
|
-
"href"=>"/verifications/
|
18
|
-
"id"=>"
|
19
|
-
"links"=>{"bank_account"=>"
|
15
|
+
"created_at"=>"2014-12-17T21:24:23.094396Z",
|
16
|
+
"deposit_status"=>"pending",
|
17
|
+
"href"=>"/verifications/BZ6tLSIRoUIhzntA96EfMaQl",
|
18
|
+
"id"=>"BZ6tLSIRoUIhzntA96EfMaQl",
|
19
|
+
"links"=>{"bank_account"=>"BA6m4zboF7ocvKbkhjszP5NS"},
|
20
20
|
"meta"=>{},
|
21
|
-
"updated_at"=>"2014-
|
21
|
+
"updated_at"=>"2014-12-17T21:24:23.094398Z",
|
22
22
|
"verification_status"=>"pending"},
|
23
23
|
@hyperlinks=
|
24
24
|
{"bank_account"=>
|
25
|
-
#<Proc:
|
25
|
+
#<Proc:0x007fcde18df020/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
26
26
|
|
27
27
|
% endif
|
@@ -3,9 +3,9 @@ Balanced::BankAccountVerification.confirm
|
|
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
|
-
verification = Balanced::BankAccountVerification.fetch('/verifications/
|
8
|
+
verification = Balanced::BankAccountVerification.fetch('/verifications/BZ6tLSIRoUIhzntA96EfMaQl')
|
9
9
|
verification.confirm(
|
10
10
|
amount_1 = 1,
|
11
11
|
amount_2 = 1
|
@@ -13,20 +13,20 @@ verification.confirm(
|
|
13
13
|
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::BankAccountVerification:
|
16
|
+
#<Balanced::BankAccountVerification:0x007fcde18cc858
|
17
17
|
@attributes=
|
18
18
|
{"attempts"=>1,
|
19
19
|
"attempts_remaining"=>2,
|
20
|
-
"created_at"=>"2014-
|
20
|
+
"created_at"=>"2014-12-17T21:24:23.094396Z",
|
21
21
|
"deposit_status"=>"succeeded",
|
22
|
-
"href"=>"/verifications/
|
23
|
-
"id"=>"
|
24
|
-
"links"=>{"bank_account"=>"
|
22
|
+
"href"=>"/verifications/BZ6tLSIRoUIhzntA96EfMaQl",
|
23
|
+
"id"=>"BZ6tLSIRoUIhzntA96EfMaQl",
|
24
|
+
"links"=>{"bank_account"=>"BA6m4zboF7ocvKbkhjszP5NS"},
|
25
25
|
"meta"=>{},
|
26
|
-
"updated_at"=>"2014-
|
26
|
+
"updated_at"=>"2014-12-17T21:24:26.171422Z",
|
27
27
|
"verification_status"=>"succeeded"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"bank_account"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fcde18bee10/lib/balanced/resources/resource.rb:56 (lambda)>}>
|
31
31
|
|
32
32
|
% endif
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Balanced::Callback.new
|
3
3
|
% elif mode == 'request':
|
4
4
|
require 'balanced'
|
5
|
-
Balanced.configure('ak-test-
|
5
|
+
Balanced.configure('ak-test-YoVGJWMjOpkCPo6dWMfuiYbBYIB8q2JX')
|
6
6
|
|
7
7
|
callback = Balanced::Callback.new(
|
8
8
|
:method => 'post',
|
@@ -10,10 +10,10 @@ callback = Balanced::Callback.new(
|
|
10
10
|
).save
|
11
11
|
|
12
12
|
% elif mode == 'response':
|
13
|
-
#<Balanced::Callback:
|
13
|
+
#<Balanced::Callback:0x007fcde18adb10
|
14
14
|
@attributes=
|
15
|
-
{"href"=>"/callbacks/
|
16
|
-
"id"=>"
|
15
|
+
{"href"=>"/callbacks/CB6Kwv0b8cXnsPSn3pR88xYk",
|
16
|
+
"id"=>"CB6Kwv0b8cXnsPSn3pR88xYk",
|
17
17
|
"links"=>{},
|
18
18
|
"method"=>"post",
|
19
19
|
"revision"=>"1.1",
|
@@ -3,9 +3,9 @@ Balanced::Callback.unstore
|
|
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
|
-
callback = Balanced::Callback.fetch('/callbacks/
|
8
|
+
callback = Balanced::Callback.fetch('/callbacks/CB6Kwv0b8cXnsPSn3pR88xYk')
|
9
9
|
callback.unstore
|
10
10
|
% elif mode == 'response':
|
11
11
|
|
@@ -3,14 +3,14 @@ Balanced::Callback.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
|
callbacks = Balanced::Callback.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Callback:
|
10
|
+
[#<Balanced::Callback:0x007fcde189c860
|
11
11
|
@attributes=
|
12
|
-
{"href"=>"/callbacks/
|
13
|
-
"id"=>"
|
12
|
+
{"href"=>"/callbacks/CB6Kwv0b8cXnsPSn3pR88xYk",
|
13
|
+
"id"=>"CB6Kwv0b8cXnsPSn3pR88xYk",
|
14
14
|
"links"=>{},
|
15
15
|
"method"=>"post",
|
16
16
|
"revision"=>"1.1",
|
@@ -3,14 +3,14 @@ Balanced::Callback.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
|
-
callback = Balanced::Callback.fetch('/callbacks/
|
8
|
+
callback = Balanced::Callback.fetch('/callbacks/CB6Kwv0b8cXnsPSn3pR88xYk')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Callback:
|
10
|
+
#<Balanced::Callback:0x007fcde188db30
|
11
11
|
@attributes=
|
12
|
-
{"href"=>"/callbacks/
|
13
|
-
"id"=>"
|
12
|
+
{"href"=>"/callbacks/CB6Kwv0b8cXnsPSn3pR88xYk",
|
13
|
+
"id"=>"CB6Kwv0b8cXnsPSn3pR88xYk",
|
14
14
|
"links"=>{},
|
15
15
|
"method"=>"post",
|
16
16
|
"revision"=>"1.1",
|
@@ -3,12 +3,12 @@ Balanced::Card.associate_to_customer
|
|
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
|
-
card = Balanced::Card.fetch('/cards/
|
9
|
-
card.associate_to_customer('/customers/
|
8
|
+
card = Balanced::Card.fetch('/cards/CC7bBGoeKPe5DBKWgduZd5Cl')
|
9
|
+
card.associate_to_customer('/customers/CU68iUpvvUwpRpuuBL3u9Slq')
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Card:
|
11
|
+
#<Balanced::Card:0x007fcde3ac9ed8
|
12
12
|
@attributes=
|
13
13
|
{"address"=>
|
14
14
|
{"city"=>nil,
|
@@ -20,38 +20,38 @@ card.associate_to_customer('/customers/CU2L981m9AtPY8pjpGpjnjnf')
|
|
20
20
|
"avs_postal_match"=>nil,
|
21
21
|
"avs_result"=>nil,
|
22
22
|
"avs_street_match"=>nil,
|
23
|
-
"
|
24
|
-
"brand"=>"
|
25
|
-
"can_credit"=>
|
23
|
+
"bank_name"=>"WELLS FARGO BANK, N.A.",
|
24
|
+
"brand"=>"Visa",
|
25
|
+
"can_credit"=>true,
|
26
26
|
"can_debit"=>true,
|
27
|
-
"category"=>
|
28
|
-
"created_at"=>"2014-
|
29
|
-
"cvv"=>
|
30
|
-
"cvv_match"=>
|
31
|
-
"cvv_result"=>
|
32
|
-
"expiration_month"=>
|
27
|
+
"category"=>"other",
|
28
|
+
"created_at"=>"2014-12-17T21:25:02.071736Z",
|
29
|
+
"cvv"=>nil,
|
30
|
+
"cvv_match"=>nil,
|
31
|
+
"cvv_result"=>nil,
|
32
|
+
"expiration_month"=>5,
|
33
33
|
"expiration_year"=>2020,
|
34
34
|
"fingerprint"=>
|
35
|
-
"
|
36
|
-
"href"=>"/cards/
|
37
|
-
"id"=>"
|
35
|
+
"7dc93d35b59078a1da8e0ebd2cbec65a6ca205760a1be1b90a143d7f2b00e355",
|
36
|
+
"href"=>"/cards/CC7bBGoeKPe5DBKWgduZd5Cl",
|
37
|
+
"id"=>"CC7bBGoeKPe5DBKWgduZd5Cl",
|
38
38
|
"is_verified"=>true,
|
39
|
-
"links"=>{"customer"=>"
|
39
|
+
"links"=>{"customer"=>"CU68iUpvvUwpRpuuBL3u9Slq"},
|
40
40
|
"meta"=>{},
|
41
|
-
"name"=>
|
42
|
-
"number"=>"
|
43
|
-
"type"=>"",
|
44
|
-
"updated_at"=>"2014-
|
41
|
+
"name"=>"Johannes Bach",
|
42
|
+
"number"=>"xxxxxxxxxxxx1118",
|
43
|
+
"type"=>"debit",
|
44
|
+
"updated_at"=>"2014-12-17T21:25:02.633343Z"},
|
45
45
|
@hyperlinks=
|
46
46
|
{"card_holds"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fcde3ac3bf0/lib/balanced/utils.rb:6 (lambda)>,
|
48
48
|
"credits"=>
|
49
|
-
#<Proc:
|
49
|
+
#<Proc:0x007fcde3ac1a30/lib/balanced/utils.rb:6 (lambda)>,
|
50
50
|
"customer"=>
|
51
|
-
#<Proc:
|
51
|
+
#<Proc:0x007fcde3abbd38/lib/balanced/resources/resource.rb:56 (lambda)>,
|
52
52
|
"debits"=>
|
53
|
-
#<Proc:
|
53
|
+
#<Proc:0x007fcde3ab9a60/lib/balanced/utils.rb:6 (lambda)>,
|
54
54
|
"disputes"=>
|
55
|
-
#<Proc:
|
55
|
+
#<Proc:0x007fcde3ab3818/lib/balanced/utils.rb:6 (lambda)>}>
|
56
56
|
|
57
57
|
% endif
|
@@ -3,7 +3,7 @@ Balanced::Card.new
|
|
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
|
card = Balanced::Card.new(
|
9
9
|
:cvv => '123',
|
@@ -13,7 +13,7 @@ card = Balanced::Card.new(
|
|
13
13
|
).save
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::Card:
|
16
|
+
#<Balanced::Card:0x007fcde09a1928
|
17
17
|
@attributes=
|
18
18
|
{"address"=>
|
19
19
|
{"city"=>nil,
|
@@ -25,12 +25,12 @@ card = Balanced::Card.new(
|
|
25
25
|
"avs_postal_match"=>nil,
|
26
26
|
"avs_result"=>nil,
|
27
27
|
"avs_street_match"=>nil,
|
28
|
-
"
|
28
|
+
"bank_name"=>"BANK OF HAWAII",
|
29
29
|
"brand"=>"MasterCard",
|
30
30
|
"can_credit"=>false,
|
31
31
|
"can_debit"=>true,
|
32
|
-
"category"=>
|
33
|
-
"created_at"=>"2014-
|
32
|
+
"category"=>"other",
|
33
|
+
"created_at"=>"2014-12-17T21:24:55.056930Z",
|
34
34
|
"cvv"=>"xxx",
|
35
35
|
"cvv_match"=>"yes",
|
36
36
|
"cvv_result"=>"Match",
|
@@ -38,25 +38,23 @@ card = Balanced::Card.new(
|
|
38
38
|
"expiration_year"=>2020,
|
39
39
|
"fingerprint"=>
|
40
40
|
"fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
|
41
|
-
"href"=>"/cards/
|
42
|
-
"id"=>"
|
41
|
+
"href"=>"/cards/CC73IyzxPUu2z89NH8GrJhLn",
|
42
|
+
"id"=>"CC73IyzxPUu2z89NH8GrJhLn",
|
43
43
|
"is_verified"=>true,
|
44
44
|
"links"=>{"customer"=>nil},
|
45
45
|
"meta"=>{},
|
46
46
|
"name"=>nil,
|
47
47
|
"number"=>"xxxxxxxxxxxx5100",
|
48
|
-
"type"=>"",
|
49
|
-
"updated_at"=>"2014-
|
48
|
+
"type"=>"credit",
|
49
|
+
"updated_at"=>"2014-12-17T21:24:55.056933Z"},
|
50
50
|
@hyperlinks=
|
51
51
|
{"card_holds"=>
|
52
|
-
#<Proc:
|
53
|
-
"credits"=>
|
54
|
-
#<Proc:0x007fa7d419d8f8/lib/balanced/utils.rb:6 (lambda)>,
|
52
|
+
#<Proc:0x007fcde099b848/lib/balanced/utils.rb:6 (lambda)>,
|
55
53
|
"customer"=>
|
56
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fcde099ae98/lib/balanced/utils.rb:6 (lambda)>,
|
57
55
|
"debits"=>
|
58
|
-
#<Proc:
|
56
|
+
#<Proc:0x007fcde0999048/lib/balanced/utils.rb:6 (lambda)>,
|
59
57
|
"disputes"=>
|
60
|
-
#<Proc:
|
58
|
+
#<Proc:0x007fcde0992e78/lib/balanced/utils.rb:6 (lambda)>}>
|
61
59
|
|
62
60
|
% endif
|