dwolla-ruby 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +7 -1
- data/lib/dwolla.rb +13 -0
- data/lib/dwolla/oauth.rb +9 -1
- data/lib/dwolla/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2NiYzA1ZmVmMzllNmZkMzIwOGZiM2ZlM2ZhODUxZWE4YjEzY2ZkZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjhjMWY4ZGRkMmQxNmQ0NDFkOTY5M2NmODIyZGNmZWNiMzY2OTk4ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2E0ZjFlZTc2NTczNWJmNTBmMDZiMDcwMTgwMmZlZDY3YzlkMzI2YjNkYWJi
|
10
|
+
YjI0ZDU4MDVmYmZmZTdhZDc4NGIxMTc2ZWM4YWZkMWQxODY4YTdhM2NhMjIw
|
11
|
+
MzZmNGNlZDM3YmFhOTgxNjc5NGY0ZmVkZjZmNmJlMTZlNjhlZTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWVjNWMxMTQxMTRiNGIyNjQ5MGQ3NDliYmE4OWM0YjA2OTZlMjc5YjY3ZDgw
|
14
|
+
MjZkZTAyYjNmMTFmOTZiMTYwYThiYTMyYTBiYzczZTJkMTVkYTc3OGRmZjUy
|
15
|
+
NzE4NTkyYTgwNjI4ZGFkYWNmNTlmN2EyN2UwOTNjMWJkMzY1MDc=
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[](https://travis-ci.org/Dwolla/dwolla-ruby)
|
5
5
|
|
6
6
|
## Version
|
7
|
-
2.4.
|
7
|
+
2.4.1
|
8
8
|
|
9
9
|
## Requirements
|
10
10
|
- [Ruby](http://www.ruby-lang.org/)
|
@@ -32,6 +32,12 @@ This repo includes various usage examples, including:
|
|
32
32
|
|
33
33
|
## Changelog
|
34
34
|
|
35
|
+
2.4.1
|
36
|
+
|
37
|
+
* Show raw response on debug mode
|
38
|
+
* Add support for 'Accounts' API
|
39
|
+
* Raise APIError when OAuth's get_token fails
|
40
|
+
|
35
41
|
2.4.0
|
36
42
|
|
37
43
|
* Added support for inline passage of OAuth tokens
|
data/lib/dwolla.rb
CHANGED
@@ -19,6 +19,8 @@ require 'dwolla/balance'
|
|
19
19
|
require 'dwolla/funding_sources'
|
20
20
|
require 'dwolla/oauth'
|
21
21
|
require 'dwolla/offsite_gateway'
|
22
|
+
require 'dwolla/accounts'
|
23
|
+
# require 'dwolla/register' // Under Construction
|
22
24
|
|
23
25
|
# Errors
|
24
26
|
require 'dwolla/errors/dwolla_error'
|
@@ -192,6 +194,10 @@ module Dwolla
|
|
192
194
|
}.merge(ssl_opts)
|
193
195
|
|
194
196
|
if self.debug
|
197
|
+
if self.sandbox
|
198
|
+
puts "[DWOLLA SANDBOX MODE OPERATION]"
|
199
|
+
end
|
200
|
+
|
195
201
|
puts "Firing request with options and headers:"
|
196
202
|
puts opts
|
197
203
|
puts headers
|
@@ -222,6 +228,13 @@ module Dwolla
|
|
222
228
|
rbody = response.body
|
223
229
|
rcode = response.code
|
224
230
|
|
231
|
+
if self.debug
|
232
|
+
puts "Raw response headers received:"
|
233
|
+
puts headers
|
234
|
+
puts "Raw response body received:"
|
235
|
+
puts rbody
|
236
|
+
end
|
237
|
+
|
225
238
|
resp = self.extract_json(rbody, rcode)
|
226
239
|
|
227
240
|
if parse_response
|
data/lib/dwolla/oauth.rb
CHANGED
@@ -14,6 +14,10 @@ module Dwolla
|
|
14
14
|
uri = Addressable::URI.new
|
15
15
|
uri.query_values = params
|
16
16
|
|
17
|
+
if Dwolla::debug and Dwolla::sandbox
|
18
|
+
puts "[DWOLLA SANDBOX MODE OPERATION]"
|
19
|
+
end
|
20
|
+
|
17
21
|
return auth_url + '?' + uri.query
|
18
22
|
end
|
19
23
|
|
@@ -27,7 +31,11 @@ module Dwolla
|
|
27
31
|
|
28
32
|
params['redirect_uri'] = redirect_uri unless redirect_uri.nil?
|
29
33
|
|
30
|
-
Dwolla.request(:get, token_url, params, {}, false, false, true)
|
34
|
+
resp = Dwolla.request(:get, token_url, params, {}, false, false, true)
|
35
|
+
|
36
|
+
raise APIError.new(resp['error_description']) unless resp['access_token']
|
37
|
+
|
38
|
+
return resp['access_token']
|
31
39
|
end
|
32
40
|
|
33
41
|
private
|
data/lib/dwolla/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dwolla-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Schonfeld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|