balanced 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +4 -0
- data/lib/balanced/error.rb +4 -2
- data/lib/balanced/resources/resource.rb +5 -0
- data/lib/balanced/version.rb +1 -1
- data/scenarios/api_key_create/ruby.mako +1 -1
- data/scenarios/api_key_list/ruby.mako +2 -2
- data/scenarios/api_key_show/ruby.mako +1 -1
- data/scenarios/bank_account_associate_to_customer/ruby.mako +6 -6
- data/scenarios/bank_account_create/ruby.mako +6 -6
- data/scenarios/bank_account_credit/ruby.mako +6 -6
- data/scenarios/bank_account_debit/ruby.mako +7 -7
- data/scenarios/bank_account_list/ruby.mako +12 -12
- data/scenarios/bank_account_show/ruby.mako +6 -6
- data/scenarios/bank_account_update/ruby.mako +6 -6
- data/scenarios/bank_account_verification_create/ruby.mako +2 -2
- data/scenarios/bank_account_verification_show/ruby.mako +2 -2
- data/scenarios/bank_account_verification_update/ruby.mako +2 -2
- data/scenarios/callback_create/ruby.mako +1 -1
- data/scenarios/callback_list/ruby.mako +1 -1
- data/scenarios/callback_show/ruby.mako +1 -1
- data/scenarios/card_associate_to_customer/definition.rb +1 -1
- data/scenarios/card_associate_to_customer/ruby.mako +5 -5
- data/scenarios/card_create/ruby.mako +4 -4
- data/scenarios/card_debit/ruby.mako +7 -7
- data/scenarios/card_hold_capture/ruby.mako +7 -7
- data/scenarios/card_hold_create/ruby.mako +5 -5
- data/scenarios/card_hold_list/ruby.mako +10 -10
- data/scenarios/card_hold_show/ruby.mako +5 -5
- data/scenarios/card_hold_update/ruby.mako +5 -5
- data/scenarios/card_hold_void/ruby.mako +5 -5
- data/scenarios/card_list/ruby.mako +8 -8
- data/scenarios/card_show/ruby.mako +4 -4
- data/scenarios/card_update/ruby.mako +4 -4
- data/scenarios/credit_list/ruby.mako +6 -6
- data/scenarios/credit_show/ruby.mako +6 -6
- data/scenarios/credit_update/ruby.mako +6 -6
- data/scenarios/customer_create/ruby.mako +13 -13
- data/scenarios/customer_list/ruby.mako +26 -26
- data/scenarios/customer_show/ruby.mako +13 -13
- data/scenarios/customer_update/ruby.mako +13 -13
- data/scenarios/debit_list/ruby.mako +14 -14
- data/scenarios/debit_show/ruby.mako +7 -7
- data/scenarios/debit_update/ruby.mako +7 -7
- data/scenarios/event_list/ruby.mako +4 -4
- data/scenarios/event_show/ruby.mako +2 -2
- data/scenarios/order_create/ruby.mako +7 -7
- data/scenarios/order_list/ruby.mako +7 -7
- data/scenarios/order_show/ruby.mako +7 -7
- data/scenarios/order_update/ruby.mako +7 -7
- data/scenarios/refund_create/ruby.mako +5 -5
- data/scenarios/refund_list/ruby.mako +5 -5
- data/scenarios/refund_show/ruby.mako +5 -5
- data/scenarios/refund_update/ruby.mako +5 -5
- data/scenarios/reversal_create/ruby.mako +4 -4
- data/scenarios/reversal_list/ruby.mako +4 -4
- data/scenarios/reversal_show/ruby.mako +4 -4
- data/scenarios/reversal_update/ruby.mako +4 -4
- data/spec/balanced/error_spec.rb +18 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62543312811ec0d4471ffdad6f315b97a852980b
|
4
|
+
data.tar.gz: 94233502466ef24cccf974febc6ee8f759b175b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0d73d1f77586f2793121c0d7b696dce73aef2ca6b798b8c069d07cfa2c2bbc971d7543a751c404adea8754f4ea376e6232648cd727dd5eefe4c6b29d809f67
|
7
|
+
data.tar.gz: b3665359953b20bd00a3041251e491f80e8d5ad391e24ae942c2cd23a84afaff8ed688f731f438e400162ea263b392c45ce9f9cd7c5e23e5f28a1cd44d463c88
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
## 1.0.1
|
2
|
+
|
3
|
+
* Fix for nil or empty string resource fetch
|
4
|
+
|
5
|
+
|
6
|
+
## 1.0
|
7
|
+
|
8
|
+
* Requires Balanced API 1.1
|
9
|
+
* Hypermedia API support
|
10
|
+
* Debits and credits are now performed directly on funding instruments and not via Customer
|
11
|
+
* Support for new Order resource
|
data/README.md
CHANGED
@@ -5,6 +5,10 @@ Online Marketplace Payments
|
|
5
5
|
[![Build Status](https://secure.travis-ci.org/balanced/balanced-ruby.png)](http://travis-ci.org/balanced/balanced-ruby)
|
6
6
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/balanced/balanced-ruby)
|
7
7
|
|
8
|
+
**v1.x requires Balanced API 1.1. Use [v0.x](https://github.com/balanced/balanced-ruby/tree/rev0) for Balanced API 1.0.**
|
9
|
+
|
10
|
+
|
11
|
+
|
8
12
|
## Installation
|
9
13
|
|
10
14
|
Add this line to your application's Gemfile:
|
data/lib/balanced/error.rb
CHANGED
@@ -5,9 +5,11 @@ module Balanced
|
|
5
5
|
attr_reader :response
|
6
6
|
|
7
7
|
# @param [Hash] response the decoded json response body
|
8
|
-
def initialize(response)
|
8
|
+
def initialize(response=nil)
|
9
9
|
@response = response
|
10
|
-
|
10
|
+
unless response.nil?
|
11
|
+
super error_message
|
12
|
+
end
|
11
13
|
end
|
12
14
|
|
13
15
|
# @return [Hash]
|
@@ -257,6 +257,11 @@ module Balanced
|
|
257
257
|
end
|
258
258
|
|
259
259
|
def fetch(*arguments)
|
260
|
+
if arguments.nil? ||
|
261
|
+
arguments.empty? ||
|
262
|
+
arguments[0].empty?
|
263
|
+
raise Balanced::NotFound
|
264
|
+
end
|
260
265
|
scope = arguments.slice!(0)
|
261
266
|
options = arguments.slice!(0) || {}
|
262
267
|
case scope
|
data/lib/balanced/version.rb
CHANGED
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
8
8
|
key = Balanced::ApiKey.new.save
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::ApiKey:
|
11
|
+
#<Balanced::ApiKey:0x007fa4e49e9748
|
12
12
|
@attributes=
|
13
13
|
{"created_at"=>"2014-03-06T19:22:18.256643Z",
|
14
14
|
"href"=>"/api_keys/AK4Vt1mJyCtjdSiGgqAebarR",
|
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
7
7
|
card = Balanced::ApiKey.all
|
8
8
|
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::ApiKey:
|
10
|
+
[#<Balanced::ApiKey:0x007fa4e49d8858
|
11
11
|
@attributes=
|
12
12
|
{"created_at"=>"2014-03-06T19:22:18.256643Z",
|
13
13
|
"href"=>"/api_keys/AK4Vt1mJyCtjdSiGgqAebarR",
|
@@ -15,7 +15,7 @@ card = Balanced::ApiKey.all
|
|
15
15
|
"links"=>{},
|
16
16
|
"meta"=>{}},
|
17
17
|
@hyperlinks={}>,
|
18
|
-
#<Balanced::ApiKey:
|
18
|
+
#<Balanced::ApiKey:0x007fa4e49d85b0
|
19
19
|
@attributes=
|
20
20
|
{"created_at"=>"2014-03-06T19:22:11.872886Z",
|
21
21
|
"href"=>"/api_keys/AK4OhVZUPzjD3YSCWBjU1dHO",
|
@@ -6,7 +6,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
6
6
|
|
7
7
|
card = Balanced::ApiKey.fetch('/api_keys/AK4Vt1mJyCtjdSiGgqAebarR')
|
8
8
|
% elif mode == 'response':
|
9
|
-
#<Balanced::ApiKey:
|
9
|
+
#<Balanced::ApiKey:0x007fa4e49c1d88
|
10
10
|
@attributes=
|
11
11
|
{"created_at"=>"2014-03-06T19:22:18.256643Z",
|
12
12
|
"href"=>"/api_keys/AK4Vt1mJyCtjdSiGgqAebarR",
|
@@ -9,7 +9,7 @@ customer = Balanced::Customer.fetch('/customers/CU64R7DS6DwuXYVg9RTskFK8')
|
|
9
9
|
customer.add_bank_account("")
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
12
|
-
#<Balanced::BankAccount:
|
12
|
+
#<Balanced::BankAccount:0x007fa4e49b1fc8
|
13
13
|
@attributes=
|
14
14
|
{"account_number"=>"xxxxxx0001",
|
15
15
|
"account_type"=>"checking",
|
@@ -36,14 +36,14 @@ customer.add_bank_account("")
|
|
36
36
|
"updated_at"=>"2014-03-06T19:23:28.930538Z"},
|
37
37
|
@hyperlinks=
|
38
38
|
{"bank_account_verification"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa4e49b09e8/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"bank_account_verifications"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa4e49a9f30/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"credits"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa4e49a3ec8/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"customer"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa4e49a12b8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
46
46
|
"debits"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fa4e499a558/lib/balanced/utils.rb:6 (lambda)>}>
|
48
48
|
|
49
49
|
% endif
|
@@ -13,7 +13,7 @@ bank_account = Balanced::BankAccount.new(
|
|
13
13
|
).save
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::BankAccount:
|
16
|
+
#<Balanced::BankAccount:0x007fa4e49749c0
|
17
17
|
@attributes=
|
18
18
|
{"account_number"=>"xxxxxx0001",
|
19
19
|
"account_type"=>"checking",
|
@@ -39,14 +39,14 @@ bank_account = Balanced::BankAccount.new(
|
|
39
39
|
"updated_at"=>"2014-03-06T19:23:27.876150Z"},
|
40
40
|
@hyperlinks=
|
41
41
|
{"bank_account_verification"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa4e496f858/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"bank_account_verifications"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fa4e496d508/lib/balanced/utils.rb:6 (lambda)>,
|
45
45
|
"credits"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fa4e4966b40/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"customer"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fa4e4965f60/lib/balanced/utils.rb:6 (lambda)>,
|
49
49
|
"debits"=>
|
50
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fa4e495fcc8/lib/balanced/utils.rb:6 (lambda)>}>
|
51
51
|
|
52
52
|
% endif
|
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
8
8
|
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA6bLGpQZPOiTNRxF24rMd9m')
|
9
9
|
bank_account.credit(:amount => 5000)
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::Credit:
|
11
|
+
#<Balanced::Credit:0x007fa4e412db40
|
12
12
|
@attributes=
|
13
13
|
{"amount"=>5000,
|
14
14
|
"appears_on_statement_as"=>"example.com",
|
@@ -29,14 +29,14 @@ bank_account.credit(:amount => 5000)
|
|
29
29
|
"updated_at"=>"2014-03-06T19:23:55.019500Z"},
|
30
30
|
@hyperlinks=
|
31
31
|
{"customer"=>
|
32
|
-
#<Proc:
|
32
|
+
#<Proc:0x007fa4e411fe50/lib/balanced/resources/resource.rb:60 (lambda)>,
|
33
33
|
"destination"=>
|
34
|
-
#<Proc:
|
34
|
+
#<Proc:0x007fa4e411e230/lib/balanced/resources/resource.rb:60 (lambda)>,
|
35
35
|
"events"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa4e4117980/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"order"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa4e4116dc8/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"reversals"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa4e4114b90/lib/balanced/utils.rb:6 (lambda)>}>
|
41
41
|
|
42
42
|
% endif
|
@@ -13,7 +13,7 @@ bank_account.debit(
|
|
13
13
|
)
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::Debit:
|
16
|
+
#<Balanced::Debit:0x007fa4e40e2a78
|
17
17
|
@attributes=
|
18
18
|
{"amount"=>5000,
|
19
19
|
"appears_on_statement_as"=>"BAL*Statement text",
|
@@ -35,16 +35,16 @@ bank_account.debit(
|
|
35
35
|
"updated_at"=>"2014-03-06T19:22:36.418154Z"},
|
36
36
|
@hyperlinks=
|
37
37
|
{"customer"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa4e40e1290/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"dispute"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa4e40dffa8/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"events"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa4e40dd870/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"order"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fa4e40dc718/lib/balanced/utils.rb:6 (lambda)>,
|
45
45
|
"refunds"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fa4e40d62a0/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"source"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fa4e40d44f0/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
49
49
|
|
50
50
|
% endif
|
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
8
8
|
Balanced::BankAccount.all
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
[#<Balanced::BankAccount:
|
11
|
+
[#<Balanced::BankAccount:0x007fa4e48ecca0
|
12
12
|
@attributes=
|
13
13
|
{"account_number"=>"xxxxxx0001",
|
14
14
|
"account_type"=>"checking",
|
@@ -34,16 +34,16 @@ Balanced::BankAccount.all
|
|
34
34
|
"updated_at"=>"2014-03-06T19:22:30.247410Z"},
|
35
35
|
@hyperlinks=
|
36
36
|
{"bank_account_verification"=>
|
37
|
-
#<Proc:
|
37
|
+
#<Proc:0x007fa4e48d78f0/lib/balanced/utils.rb:6 (lambda)>,
|
38
38
|
"bank_account_verifications"=>
|
39
|
-
#<Proc:
|
39
|
+
#<Proc:0x007fa4e48e7bb0/lib/balanced/utils.rb:6 (lambda)>,
|
40
40
|
"credits"=>
|
41
|
-
#<Proc:
|
41
|
+
#<Proc:0x007fa4e48e5540/lib/balanced/utils.rb:6 (lambda)>,
|
42
42
|
"customer"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa4e48e4988/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"debits"=>
|
45
|
-
#<Proc:
|
46
|
-
#<Balanced::BankAccount:
|
45
|
+
#<Proc:0x007fa4e48d2148/lib/balanced/utils.rb:6 (lambda)>}>,
|
46
|
+
#<Balanced::BankAccount:0x007fa4e48d20f8
|
47
47
|
@attributes=
|
48
48
|
{"account_number"=>"xxxxxx0001",
|
49
49
|
"account_type"=>"checking",
|
@@ -71,14 +71,14 @@ Balanced::BankAccount.all
|
|
71
71
|
"updated_at"=>"2014-03-06T19:22:27.888575Z"},
|
72
72
|
@hyperlinks=
|
73
73
|
{"bank_account_verification"=>
|
74
|
-
#<Proc:
|
74
|
+
#<Proc:0x007fa4e48df988/lib/balanced/resources/resource.rb:60 (lambda)>,
|
75
75
|
"bank_account_verifications"=>
|
76
|
-
#<Proc:
|
76
|
+
#<Proc:0x007fa4e48dd430/lib/balanced/utils.rb:6 (lambda)>,
|
77
77
|
"credits"=>
|
78
|
-
#<Proc:
|
78
|
+
#<Proc:0x007fa4e48ced68/lib/balanced/utils.rb:6 (lambda)>,
|
79
79
|
"customer"=>
|
80
|
-
#<Proc:
|
80
|
+
#<Proc:0x007fa4e48ce0e8/lib/balanced/utils.rb:6 (lambda)>,
|
81
81
|
"debits"=>
|
82
|
-
#<Proc:
|
82
|
+
#<Proc:0x007fa4e48cb780/lib/balanced/utils.rb:6 (lambda)>}>]
|
83
83
|
|
84
84
|
% endif
|
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
7
7
|
bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA58WYAEUMrEtAkW5KAvWo5V')
|
8
8
|
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::BankAccount:
|
10
|
+
#<Balanced::BankAccount:0x007fa4e315c040
|
11
11
|
@attributes=
|
12
12
|
{"account_number"=>"xxxxxx0001",
|
13
13
|
"account_type"=>"checking",
|
@@ -33,14 +33,14 @@ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA58WYAEUMrEtAkW5KAvW
|
|
33
33
|
"updated_at"=>"2014-03-06T19:22:30.247410Z"},
|
34
34
|
@hyperlinks=
|
35
35
|
{"bank_account_verification"=>
|
36
|
-
#<Proc:
|
36
|
+
#<Proc:0x007fa4e314bf60/lib/balanced/utils.rb:6 (lambda)>,
|
37
37
|
"bank_account_verifications"=>
|
38
|
-
#<Proc:
|
38
|
+
#<Proc:0x007fa4e3130968/lib/balanced/utils.rb:6 (lambda)>,
|
39
39
|
"credits"=>
|
40
|
-
#<Proc:
|
40
|
+
#<Proc:0x007fa4e31218a0/lib/balanced/utils.rb:6 (lambda)>,
|
41
41
|
"customer"=>
|
42
|
-
#<Proc:
|
42
|
+
#<Proc:0x007fa4e31198f8/lib/balanced/utils.rb:6 (lambda)>,
|
43
43
|
"debits"=>
|
44
|
-
#<Proc:
|
44
|
+
#<Proc:0x007fa4e3102ce8/lib/balanced/utils.rb:6 (lambda)>}>
|
45
45
|
|
46
46
|
% endif
|
@@ -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:0x007fa4e303f310
|
18
18
|
@attributes=
|
19
19
|
{"account_number"=>"xxxxxx0001",
|
20
20
|
"account_type"=>"checking",
|
@@ -43,14 +43,14 @@ bank_account.save
|
|
43
43
|
"updated_at"=>"2014-03-06T19:22:33.744499Z"},
|
44
44
|
@hyperlinks=
|
45
45
|
{"bank_account_verification"=>
|
46
|
-
#<Proc:
|
46
|
+
#<Proc:0x007fa4e304b778/lib/balanced/utils.rb:6 (lambda)>,
|
47
47
|
"bank_account_verifications"=>
|
48
|
-
#<Proc:
|
48
|
+
#<Proc:0x007fa4e30399d8/lib/balanced/utils.rb:6 (lambda)>,
|
49
49
|
"credits"=>
|
50
|
-
#<Proc:
|
50
|
+
#<Proc:0x007fa4e40a7248/lib/balanced/utils.rb:6 (lambda)>,
|
51
51
|
"customer"=>
|
52
|
-
#<Proc:
|
52
|
+
#<Proc:0x007fa4e2871570/lib/balanced/utils.rb:6 (lambda)>,
|
53
53
|
"debits"=>
|
54
|
-
#<Proc:
|
54
|
+
#<Proc:0x007fa4e4a78e70/lib/balanced/utils.rb:6 (lambda)>}>
|
55
55
|
|
56
56
|
% endif
|
@@ -9,7 +9,7 @@ bank_account = Balanced::BankAccount.fetch('/bank_accounts/BA50LpPrCTB63Ecm0wEgd
|
|
9
9
|
verification = bank_account.verify
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
12
|
-
#<Balanced::BankAccountVerification:
|
12
|
+
#<Balanced::BankAccountVerification:0x007fa4e4a48518
|
13
13
|
@attributes=
|
14
14
|
{"attempts"=>0,
|
15
15
|
"attempts_remaining"=>3,
|
@@ -23,6 +23,6 @@ verification = bank_account.verify
|
|
23
23
|
"verification_status"=>"pending"},
|
24
24
|
@hyperlinks=
|
25
25
|
{"bank_account"=>
|
26
|
-
#<Proc:
|
26
|
+
#<Proc:0x007fa4e4a41f60/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
27
27
|
|
28
28
|
% endif
|
@@ -8,7 +8,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
8
8
|
verification = Balanced::Verification.fetch('/verifications/BZ5alC0fajkuBOvOU7lVT7QJ')
|
9
9
|
|
10
10
|
% elif mode == 'response':
|
11
|
-
#<Balanced::BankAccountVerification:
|
11
|
+
#<Balanced::BankAccountVerification:0x007fa4e41c2358
|
12
12
|
@attributes=
|
13
13
|
{"attempts"=>0,
|
14
14
|
"attempts_remaining"=>3,
|
@@ -22,6 +22,6 @@ verification = Balanced::Verification.fetch('/verifications/BZ5alC0fajkuBOvOU7lV
|
|
22
22
|
"verification_status"=>"pending"},
|
23
23
|
@hyperlinks=
|
24
24
|
{"bank_account"=>
|
25
|
-
#<Proc:
|
25
|
+
#<Proc:0x007fa4e41c0300/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
26
26
|
|
27
27
|
% endif
|
@@ -13,7 +13,7 @@ verification.confirm(
|
|
13
13
|
|
14
14
|
|
15
15
|
% elif mode == 'response':
|
16
|
-
#<Balanced::BankAccountVerification:
|
16
|
+
#<Balanced::BankAccountVerification:0x007fa4e4a1ae60
|
17
17
|
@attributes=
|
18
18
|
{"attempts"=>1,
|
19
19
|
"attempts_remaining"=>2,
|
@@ -27,6 +27,6 @@ verification.confirm(
|
|
27
27
|
"verification_status"=>"succeeded"},
|
28
28
|
@hyperlinks=
|
29
29
|
{"bank_account"=>
|
30
|
-
#<Proc:
|
30
|
+
#<Proc:0x007fa4e4a18070/lib/balanced/resources/resource.rb:60 (lambda)>}>
|
31
31
|
|
32
32
|
% endif
|
@@ -10,7 +10,7 @@ callback = Balanced::Callback.new(
|
|
10
10
|
).save
|
11
11
|
|
12
12
|
% elif mode == 'response':
|
13
|
-
#<Balanced::Callback:
|
13
|
+
#<Balanced::Callback:0x007fa4e327e810
|
14
14
|
@attributes=
|
15
15
|
{"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
|
16
16
|
"id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
|
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
7
7
|
|
8
8
|
callbacks = Balanced::Callback.all
|
9
9
|
% elif mode == 'response':
|
10
|
-
[#<Balanced::Callback:
|
10
|
+
[#<Balanced::Callback:0x007fa4e3266738
|
11
11
|
@attributes=
|
12
12
|
{"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
|
13
13
|
"id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
|
@@ -7,7 +7,7 @@ Balanced.configure('ak-test-2ADpvITfpgBn8uBzEGsQ2bIgWaftUWiul')
|
|
7
7
|
|
8
8
|
callback = Balanced::Callback.fetch('/callbacks/CB5pnz4XnaDpRFGlNMb6u50R')
|
9
9
|
% elif mode == 'response':
|
10
|
-
#<Balanced::Callback:
|
10
|
+
#<Balanced::Callback:0x007fa4e3255f78
|
11
11
|
@attributes=
|
12
12
|
{"href"=>"/callbacks/CB5pnz4XnaDpRFGlNMb6u50R",
|
13
13
|
"id"=>"CB5pnz4XnaDpRFGlNMb6u50R",
|
@@ -1 +1 @@
|
|
1
|
-
Balanced::Customer.
|
1
|
+
Balanced::Customer.associate_to_customer
|
@@ -1,5 +1,5 @@
|
|
1
1
|
% if mode == 'definition':
|
2
|
-
Balanced::Customer.
|
2
|
+
Balanced::Customer.associate_to_customer
|
3
3
|
|
4
4
|
% elif mode == 'request':
|
5
5
|
require 'balanced'
|
@@ -9,7 +9,7 @@ card = Balanced::Card.fetch('/cards/CC68IoCVpoFlkugB7xt52p8C')
|
|
9
9
|
card.associate_to_customer('/customers/CU64R7DS6DwuXYVg9RTskFK8')
|
10
10
|
|
11
11
|
% elif mode == 'response':
|
12
|
-
#<Balanced::Card:
|
12
|
+
#<Balanced::Card:0x007fa4e49f12e0
|
13
13
|
@attributes=
|
14
14
|
{"address"=>
|
15
15
|
{"city"=>nil,
|
@@ -40,10 +40,10 @@ card.associate_to_customer('/customers/CU64R7DS6DwuXYVg9RTskFK8')
|
|
40
40
|
"updated_at"=>"2014-03-06T19:23:25.633918Z"},
|
41
41
|
@hyperlinks=
|
42
42
|
{"card_holds"=>
|
43
|
-
#<Proc:
|
43
|
+
#<Proc:0x007fa4e49e9810/lib/balanced/utils.rb:6 (lambda)>,
|
44
44
|
"customer"=>
|
45
|
-
#<Proc:
|
45
|
+
#<Proc:0x007fa4e49e39d8/lib/balanced/resources/resource.rb:60 (lambda)>,
|
46
46
|
"debits"=>
|
47
|
-
#<Proc:
|
47
|
+
#<Proc:0x007fa4e49e1ac0/lib/balanced/utils.rb:6 (lambda)>}>
|
48
48
|
|
49
49
|
% endif
|