dwolla-ruby 2.6.1 → 2.6.2
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 +13 -5
- data/.gitignore +8 -8
- data/.travis.yml +6 -6
- data/Gemfile +1 -1
- data/README.md +171 -168
- data/Rakefile +8 -8
- data/dwolla-ruby.gemspec +27 -27
- data/examples/balance.rb +15 -15
- data/examples/contacts.rb +32 -32
- data/examples/fundingSources.rb +39 -39
- data/examples/oauth.rb +50 -50
- data/examples/offsiteGateway.rb +31 -31
- data/examples/transactions.rb +38 -38
- data/examples/users.rb +30 -30
- data/gemfiles/json.gemfile +2 -2
- data/lib/dwolla.rb +326 -326
- data/lib/dwolla/accounts.rb +27 -27
- data/lib/dwolla/balance.rb +15 -15
- data/lib/dwolla/contacts.rb +30 -30
- data/lib/dwolla/errors/api_connection_error.rb +3 -3
- data/lib/dwolla/errors/api_error.rb +3 -3
- data/lib/dwolla/errors/authentication_error.rb +3 -3
- data/lib/dwolla/errors/dwolla_error.rb +19 -19
- data/lib/dwolla/errors/invalid_request_error.rb +10 -10
- data/lib/dwolla/errors/missing_parameter_error.rb +3 -3
- data/lib/dwolla/exceptions.rb +4 -4
- data/lib/dwolla/funding_sources.rb +65 -65
- data/lib/dwolla/json.rb +20 -20
- data/lib/dwolla/masspay.rb +52 -52
- data/lib/dwolla/oauth.rb +75 -75
- data/lib/dwolla/offsite_gateway.rb +154 -154
- data/lib/dwolla/requests.rb +56 -56
- data/lib/dwolla/transactions.rb +56 -56
- data/lib/dwolla/users.rb +39 -39
- data/lib/dwolla/version.rb +3 -3
- data/test/test_accounts.rb +18 -18
- data/test/test_balance.rb +9 -9
- data/test/test_contacts.rb +19 -19
- data/test/test_funding_sources.rb +64 -64
- data/test/test_masspay.rb +47 -47
- data/test/test_oauth.rb +30 -30
- data/test/test_offsite_gateway.rb +57 -57
- data/test/test_requests.rb +29 -29
- data/test/test_transactions.rb +51 -51
- data/test/test_users.rb +33 -33
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YzJhM2M5ZDI1ZmIxODI2YTkwMDdiYmQ5NWIyNzgxYzFhNGU1ZjhhNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzhjNDNhNmY3ZGY2ZGU2ZTA5ZTYxYWQ5NTU4MDI1OTM5YmM4YTVhOA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjIwYzFjMmE2NWQ3NzExYTliMDA1YzBjOWRkNmRlY2M3MGJmZjg0NzI2YzQ0
|
10
|
+
ZWRlZjk3ZjEzNzczZjZmYTRmNmE0NWQ4NWY4MTAwNmQ3MmE4MDZjODE2ZmEy
|
11
|
+
ZGVmNDNiYTM1ODdmYjA2YWYzM2EyODQ4N2Q2ZGMzNWM3ZTI4MDI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzYwNTNiZTFiNzFkZDI0OTZjZmJjYjlkYzBmZjc4MzZiYmM5MTBkY2JiMDZk
|
14
|
+
N2E5MDdkYmY1NTJmZGJmYWQxZjZkYmJkYzlhZmI4YTBmY2QyZTYxOThjMzZi
|
15
|
+
MTYyNjQxOGZhMWJkZTE0NGQzZDA5MzJkZDg2N2QwZDZmNTgxN2M=
|
data/.gitignore
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
*.swp
|
2
|
-
*.gem
|
3
|
-
.bundle
|
4
|
-
.rvmrc
|
5
|
-
Gemfile.lock
|
6
|
-
pkg/*
|
7
|
-
coverage/
|
8
|
-
examples/_keys.rb
|
1
|
+
*.swp
|
2
|
+
*.gem
|
3
|
+
.bundle
|
4
|
+
.rvmrc
|
5
|
+
Gemfile.lock
|
6
|
+
pkg/*
|
7
|
+
coverage/
|
8
|
+
examples/_keys.rb
|
data/.travis.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 1.9.3
|
4
|
-
- 2.0.0
|
5
|
-
gemfile:
|
6
|
-
- gemfiles/json.gemfile
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.9.3
|
4
|
+
- 2.0.0
|
5
|
+
gemfile:
|
6
|
+
- gemfiles/json.gemfile
|
data/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
source "https://rubygems.org"
|
1
|
+
source "https://rubygems.org"
|
2
2
|
gemspec
|
data/README.md
CHANGED
@@ -1,168 +1,171 @@
|
|
1
|
-
# dwolla-ruby
|
2
|
-
Official Ruby wrapper for Dwolla's API
|
3
|
-
|
4
|
-
## Version
|
5
|
-
2.6.
|
6
|
-
|
7
|
-
[](https://travis-ci.org/Dwolla/dwolla-ruby)
|
8
|
-
|
9
|
-
## Requirements
|
10
|
-
- [Ruby](http://www.ruby-lang.org/)
|
11
|
-
|
12
|
-
## Installation
|
13
|
-
The easiest way to install the dwolla-ruby gem for now is to use bundler and add the following line to your Gemfile:
|
14
|
-
|
15
|
-
`gem 'dwolla-ruby'`
|
16
|
-
|
17
|
-
The recommended way to install dwolla-ruby is through RubyGems:
|
18
|
-
|
19
|
-
`gem install dwolla-ruby`
|
20
|
-
|
21
|
-
## Examples / Quickstart
|
22
|
-
|
23
|
-
To use the examples in the /examples folder, first edit the _keys.rb file and add your Dwolla API application's key, and secret, along with your account's [OAuth token](https://developers.dwolla.com/dev/token), and PIN.
|
24
|
-
|
25
|
-
This repo includes various usage examples, including:
|
26
|
-
|
27
|
-
* Authenticating with OAuth [oauth.rb]
|
28
|
-
* Fetching user information [users.rb]
|
29
|
-
* Grabbing a user's contacts [contacts.rb]
|
30
|
-
* Listing a user's funding sources [fundingSources.rb]
|
31
|
-
* Transacting money (includes sending) [transactions.rb]
|
32
|
-
* Getting a user's balance [balance.rb]
|
33
|
-
|
34
|
-
## Changelog
|
35
|
-
|
36
|
-
2.6.
|
37
|
-
*
|
38
|
-
|
39
|
-
2.6.
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
*
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
the
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
1
|
+
# dwolla-ruby
|
2
|
+
Official Ruby wrapper for Dwolla's API
|
3
|
+
|
4
|
+
## Version
|
5
|
+
2.6.2
|
6
|
+
|
7
|
+
[](https://travis-ci.org/Dwolla/dwolla-ruby)
|
8
|
+
|
9
|
+
## Requirements
|
10
|
+
- [Ruby](http://www.ruby-lang.org/)
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
The easiest way to install the dwolla-ruby gem for now is to use bundler and add the following line to your Gemfile:
|
14
|
+
|
15
|
+
`gem 'dwolla-ruby'`
|
16
|
+
|
17
|
+
The recommended way to install dwolla-ruby is through RubyGems:
|
18
|
+
|
19
|
+
`gem install dwolla-ruby`
|
20
|
+
|
21
|
+
## Examples / Quickstart
|
22
|
+
|
23
|
+
To use the examples in the /examples folder, first edit the _keys.rb file and add your Dwolla API application's key, and secret, along with your account's [OAuth token](https://developers.dwolla.com/dev/token), and PIN.
|
24
|
+
|
25
|
+
This repo includes various usage examples, including:
|
26
|
+
|
27
|
+
* Authenticating with OAuth [oauth.rb]
|
28
|
+
* Fetching user information [users.rb]
|
29
|
+
* Grabbing a user's contacts [contacts.rb]
|
30
|
+
* Listing a user's funding sources [fundingSources.rb]
|
31
|
+
* Transacting money (includes sending) [transactions.rb]
|
32
|
+
* Getting a user's balance [balance.rb]
|
33
|
+
|
34
|
+
## Changelog
|
35
|
+
|
36
|
+
2.6.2
|
37
|
+
* Fixed bug with generation of Off-Site Gateway checkout URLs
|
38
|
+
|
39
|
+
2.6.1
|
40
|
+
* Minor refactoring, fixed bug that would cause crashes in certain Ruby version with checking if keys exist in hashes.
|
41
|
+
|
42
|
+
2.6.0
|
43
|
+
|
44
|
+
* **BREAKING CHANGE**: OAuth access tokens now expire. Instead of a string, `Dwolla::OAuth::get_token` now returns a hash with an `access_token`, `refresh_token`, and expiration times in seconds for both. In order to refresh authorization, use `Dwolla::OAuth.refresh_auth`
|
45
|
+
* **BREAKING CHANGE**: Guest send has been officially deprecated and removed from this gem.
|
46
|
+
* All MassPay endpoints have been included in this release for batch payment support.
|
47
|
+
* Proper unit tests implemented for all endpoints.
|
48
|
+
|
49
|
+
2.5.5
|
50
|
+
|
51
|
+
* Pulled in a merge request for syntax error (thanks, @mstahl)
|
52
|
+
|
53
|
+
2.5.4
|
54
|
+
|
55
|
+
* Fixed offsite gateway URL (www.uat.dwolla.com is invalid whereas uat.dwolla.com is not).
|
56
|
+
|
57
|
+
2.5.3
|
58
|
+
|
59
|
+
* Updated offsite gateway to support UAT URL return when sandbox flag is toggled.
|
60
|
+
|
61
|
+
2.5.2
|
62
|
+
|
63
|
+
* Sandbox base URL is now HTTPS
|
64
|
+
|
65
|
+
2.5.1
|
66
|
+
|
67
|
+
* Add the 'additionalFundingSources' param to the offsite gateway
|
68
|
+
|
69
|
+
2.5.0
|
70
|
+
|
71
|
+
* Add refund API endpoint
|
72
|
+
|
73
|
+
2.4.7 [merge pull request by [dustMason0](https://github.com/dustMason)]
|
74
|
+
|
75
|
+
* Remove debugging reference to 'pp' (thanks, dustMason)
|
76
|
+
|
77
|
+
2.4.6
|
78
|
+
|
79
|
+
* Fix method double naming in the OffsiteGateway class
|
80
|
+
|
81
|
+
2.4.5 [merge pull request by [dustMason0](https://github.com/dustMason)]
|
82
|
+
|
83
|
+
* Fix floating point calculation errors
|
84
|
+
* Refactor the offsite gateway class
|
85
|
+
|
86
|
+
2.4.4
|
87
|
+
|
88
|
+
* Globalize the OAuth scope variable
|
89
|
+
|
90
|
+
2.4.3
|
91
|
+
|
92
|
+
* Add missing files [accounts.rb]
|
93
|
+
|
94
|
+
2.4.2
|
95
|
+
|
96
|
+
* Fix OAuth token override
|
97
|
+
|
98
|
+
2.4.1
|
99
|
+
|
100
|
+
* Show raw response on debug mode
|
101
|
+
* Add support for 'Accounts' API
|
102
|
+
* Raise APIError when OAuth's get_token fails
|
103
|
+
|
104
|
+
2.4.0
|
105
|
+
|
106
|
+
* Added support for inline passage of OAuth tokens
|
107
|
+
|
108
|
+
2.3.0
|
109
|
+
|
110
|
+
* Add support for "sandbox" / UAT mode
|
111
|
+
|
112
|
+
2.1.1
|
113
|
+
|
114
|
+
* Oops. POST request wasn't actually sending any params.
|
115
|
+
|
116
|
+
2.1.0
|
117
|
+
|
118
|
+
* Add tests! (OMG WOOT JK </LOL>)
|
119
|
+
|
120
|
+
2.0.0
|
121
|
+
|
122
|
+
* Reworked Gem.
|
123
|
+
|
124
|
+
## Testing
|
125
|
+
|
126
|
+
To run the gem's tests:
|
127
|
+
|
128
|
+
bundle exec rake test
|
129
|
+
|
130
|
+
## Credits
|
131
|
+
|
132
|
+
This wrapper is heavily based off Stripe's Ruby Gem
|
133
|
+
|
134
|
+
- Michael Schonfeld <michael@dwolla.com>
|
135
|
+
|
136
|
+
## Support
|
137
|
+
|
138
|
+
We highly recommend seeking support on our forums, [located here!](https://discuss.dwolla.com/category/api-support)
|
139
|
+
|
140
|
+
- Dwolla API <api@dwolla.com>
|
141
|
+
- David Stancu <david@dwolla.com>
|
142
|
+
- Gordon Zheng <gordon@dwolla.com>
|
143
|
+
|
144
|
+
## References / Documentation
|
145
|
+
|
146
|
+
http://developers.dwolla.com/dev
|
147
|
+
|
148
|
+
## License
|
149
|
+
|
150
|
+
(The MIT License)
|
151
|
+
|
152
|
+
Copyright (c) 2013 Dwolla <michael@dwolla.com>
|
153
|
+
|
154
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
155
|
+
a copy of this software and associated documentation files (the
|
156
|
+
'Software'), to deal in the Software without restriction, including
|
157
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
158
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
159
|
+
permit persons to whom the Software is furnished to do so, subject to
|
160
|
+
the following conditions:
|
161
|
+
|
162
|
+
The above copyright notice and this permission notice shall be
|
163
|
+
included in all copies or substantial portions of the Software.
|
164
|
+
|
165
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
166
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
167
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
168
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
169
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
170
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
171
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
task :default => [:test]
|
2
|
-
|
3
|
-
task :test do
|
4
|
-
ret = true
|
5
|
-
Dir["test/**/*.rb"].each do |f|
|
6
|
-
ret = ret && ruby(f, '')
|
7
|
-
end
|
8
|
-
exit(ret)
|
1
|
+
task :default => [:test]
|
2
|
+
|
3
|
+
task :test do
|
4
|
+
ret = true
|
5
|
+
Dir["test/**/*.rb"].each do |f|
|
6
|
+
ret = ret && ruby(f, '')
|
7
|
+
end
|
8
|
+
exit(ret)
|
9
9
|
end
|
data/dwolla-ruby.gemspec
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
2
|
-
require "dwolla/version"
|
3
|
-
|
4
|
-
Gem::Specification.new do |s|
|
5
|
-
s.name = "dwolla-ruby"
|
6
|
-
s.version = Dwolla::VERSION
|
7
|
-
s.authors = ["Michael Schonfeld"]
|
8
|
-
s.email = ["michael@dwolla.com"]
|
9
|
-
s.homepage = "https://github.com/dwolla/dwolla-ruby"
|
10
|
-
s.summary = %q{Official Ruby Wrapper for Dwolla's API}
|
11
|
-
s.description = %q{Official Ruby Wrapper for Dwolla's API. Completely re-written based on Stripe's Ruby Bindings.}
|
12
|
-
s.license = 'MIT'
|
13
|
-
|
14
|
-
s.rubyforge_project = "dwolla-ruby"
|
15
|
-
|
16
|
-
s.files = `git ls-files`.split("\n")
|
17
|
-
s.test_files = `git ls-files -- test/*`.split("\n")
|
18
|
-
s.require_paths = %w{lib}
|
19
|
-
|
20
|
-
s.add_dependency('rest-client', '~> 1.4')
|
21
|
-
s.add_dependency('multi_json', '>= 1.0.4', '< 2')
|
22
|
-
s.add_dependency('addressable', '>= 2')
|
23
|
-
|
24
|
-
s.add_development_dependency('mocha')
|
25
|
-
s.add_development_dependency('test-unit')
|
26
|
-
s.add_development_dependency('rake')
|
27
|
-
end
|
1
|
+
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
2
|
+
require "dwolla/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "dwolla-ruby"
|
6
|
+
s.version = Dwolla::VERSION
|
7
|
+
s.authors = ["Michael Schonfeld"]
|
8
|
+
s.email = ["michael@dwolla.com"]
|
9
|
+
s.homepage = "https://github.com/dwolla/dwolla-ruby"
|
10
|
+
s.summary = %q{Official Ruby Wrapper for Dwolla's API}
|
11
|
+
s.description = %q{Official Ruby Wrapper for Dwolla's API. Completely re-written based on Stripe's Ruby Bindings.}
|
12
|
+
s.license = 'MIT'
|
13
|
+
|
14
|
+
s.rubyforge_project = "dwolla-ruby"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- test/*`.split("\n")
|
18
|
+
s.require_paths = %w{lib}
|
19
|
+
|
20
|
+
s.add_dependency('rest-client', '~> 1.4')
|
21
|
+
s.add_dependency('multi_json', '>= 1.0.4', '< 2')
|
22
|
+
s.add_dependency('addressable', '>= 2')
|
23
|
+
|
24
|
+
s.add_development_dependency('mocha')
|
25
|
+
s.add_development_dependency('test-unit')
|
26
|
+
s.add_development_dependency('rake')
|
27
|
+
end
|