dwolla-ruby 2.4.7 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +7 -4
- data/examples/fundingSources.rb +16 -1
- data/lib/dwolla/transactions.rb +11 -0
- data/lib/dwolla/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjMyNTBhNmMyMjQ5ODliZDBkYmUyNGNjOGIxOWUwMDRjNDAyNDQ4NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjdiMjMxZGQ0OWYzMDYxYmU0ODgwNWM2NTM1OGExMjkzZTEwNTBjNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzczMmZiMjFkZjk1NDYyZTdjZjI1Y2MyYjgzZDIyNGE0YzRmMGQ5OTAwMzU0
|
10
|
+
YzhkYzY4ZWQzNmJmZDNjMmJjYmQ4ZDA0NTYxNDMzMTg0NDM4NWIzMmFmM2Zk
|
11
|
+
YTQ3YzIzMGZiNjk1YTlhNzI3ODQxMGVmMWJjY2Y5N2ViZGJhMTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmM4ZTFhODQ5NWRlOTYxYzE4ZDg3NDE3ZTJlOTA5ODU0ZWUwYzcwNjkwMmYz
|
14
|
+
ZDI5ODc5NGExN2EyYjc5ZjU5ZmQwMjBlZjJmYWJmYzM3ZDM3Y2M1MDJmMzRj
|
15
|
+
NzVmMGJiMTk1ZDc0NDZmM2Q0ZjQ2Y2JmODExNGQ0YWRlNmU2NmU=
|
data/README.md
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
# dwolla-ruby: Ruby Wrapper for Dwolla's API
|
2
|
-
=================================================================================
|
3
|
-
|
4
|
-
[![Build Status](https://travis-ci.org/Dwolla/dwolla-ruby.png?branch=master)](https://travis-ci.org/Dwolla/dwolla-ruby)
|
5
2
|
|
6
3
|
## Version
|
7
|
-
2.
|
4
|
+
2.5.0
|
8
5
|
|
9
6
|
## Requirements
|
10
7
|
- [Ruby](http://www.ruby-lang.org/)
|
@@ -20,6 +17,8 @@ The recommended way to install dwolla-ruby is through RubyGems:
|
|
20
17
|
|
21
18
|
## Examples / Quickstart
|
22
19
|
|
20
|
+
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.
|
21
|
+
|
23
22
|
This repo includes various usage examples, including:
|
24
23
|
|
25
24
|
* Authenticating with OAuth [oauth.rb]
|
@@ -32,6 +31,10 @@ This repo includes various usage examples, including:
|
|
32
31
|
|
33
32
|
## Changelog
|
34
33
|
|
34
|
+
2.5.0
|
35
|
+
|
36
|
+
* Add refund API endpoint
|
37
|
+
|
35
38
|
2.4.7 [merge pull request by [dustMason0](https://github.com/dustMason)]
|
36
39
|
|
37
40
|
* Remove debugging reference to 'pp' (thanks, dustMason)
|
data/examples/fundingSources.rb
CHANGED
@@ -21,4 +21,19 @@ pp Dwolla::FundingSources.get
|
|
21
21
|
# EXAMPLE 2:
|
22
22
|
# Fetch detailed information for the
|
23
23
|
# funding source with a specific ID
|
24
|
-
pp Dwolla::FundingSources.get('funding_source_id')
|
24
|
+
pp Dwolla::FundingSources.get('funding_source_id')
|
25
|
+
|
26
|
+
# EXAMPLE 3:
|
27
|
+
# Deposit funds from a funding source (bank account)
|
28
|
+
# into the Dwolla account balance.
|
29
|
+
pp Dwolla::FundingSources.deposit('funding_source_id', {:amount => 12.95, :pin => @pin})
|
30
|
+
|
31
|
+
# EXAMPLE 4:
|
32
|
+
# Withdraw funds from a Dwolla account balance into
|
33
|
+
# a funding source (bank account)
|
34
|
+
pp Dwolla::FundingSources.withdraw('funding_source_id', {:amount => 12.95, :pin => @pin})
|
35
|
+
|
36
|
+
# EXAMPLE 5:
|
37
|
+
# Add a new funding source (bank account).
|
38
|
+
# Possible values for account_type: "Checking" and "Savings"
|
39
|
+
pp Dwolla::FundingSources.add({:routing_number => 99999999, :account_number => 99999999, :account_type => "Checking", :name => "Some Nickname"})
|
data/lib/dwolla/transactions.rb
CHANGED
@@ -31,6 +31,17 @@ module Dwolla
|
|
31
31
|
Dwolla.request(:post, url, params, {}, token)
|
32
32
|
end
|
33
33
|
|
34
|
+
def self.refund(params={}, token=nil)
|
35
|
+
raise MissingParameterError.new('No PIN Provided.') unless params[:pin]
|
36
|
+
raise MissingParameterError.new('No Funding Source Provided.') unless params[:fundsSource]
|
37
|
+
raise MissingParameterError.new('No Transaction ID Provided.') unless params[:transactionId]
|
38
|
+
raise MissingParameterError.new('No Amount Provided.') unless params[:amount]
|
39
|
+
|
40
|
+
url = transactions_url + 'refund'
|
41
|
+
|
42
|
+
Dwolla.request(:post, url, params, {}, token)
|
43
|
+
end
|
44
|
+
|
34
45
|
def self.guest_send(params={})
|
35
46
|
raise MissingParameterError.new('No Destination ID Provided.') unless params[:destinationId]
|
36
47
|
raise MissingParameterError.new('No Amount Provided.') unless params[:amount]
|
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
|
+
version: 2.5.0
|
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-10-
|
11
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -185,3 +185,4 @@ summary: Official Ruby Wrapper for Dwolla's API
|
|
185
185
|
test_files:
|
186
186
|
- test/test_dwolla.rb
|
187
187
|
- test/test_helper.rb
|
188
|
+
has_rdoc:
|