You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DEV-1012: Update README to conform to new style guide (#64)
* DEV-1012: Update README to conform to new style guide
* Minor edits
* Remove `public-suffix` variable and reference link directly
* Update README.md
* Apply suggestions from code review
Co-authored-by: James Coon <james@jcoon.dev>
This repository contains the source code for Dwolla's Ruby-based SDK, which allows developers to interact with Dwolla's server-side API via a Ruby API, with automatic OAuth token management included. Any action that can be performed via an HTTP request can be made using this SDK when executed within a server-side environment.
6
6
7
-
[API Documentation](https://docsv2.dwolla.com)
7
+
## Table of Contents
8
8
9
-
## Installation
9
+
-[Getting Started](#getting-started)
10
+
-[Installation](#installation)
11
+
-[Initialization](#initialization)
12
+
-[Making Requests](#making-requests)
13
+
-[Low-level Requests](#low-level-requests)
14
+
-[Setting Headers](#setting-headers)
15
+
-[Responses](#responses)
16
+
-[Success](#success)
17
+
-[Error](#error)
18
+
-[Changelog](#changelog)
19
+
-[Community](#community)
20
+
-[Additional Resources](#additional-resources)
21
+
22
+
23
+
## Getting Started
24
+
25
+
### Installation
26
+
27
+
To begin using this SDK, you will first need to download it to your machine. We use [RubyGems](https://rubygems.org/gems/dwolla_v2) to distribute this package.
10
28
11
29
Add this line to your application's Gemfile:
12
30
@@ -22,15 +40,14 @@ Or install it yourself as:
22
40
23
41
$ gem install dwolla_v2
24
42
25
-
##`DwollaV2::Client`
43
+
### Initialization
26
44
27
-
### Basic usage
45
+
Before any API requests can be made, you must first determine which environment you will be using, as well as fetch the application key and secret. To fetch your application key and secret, please visit one of the following links:
28
46
29
-
Create a client using your application's consumer key and secret found on the applications page
Finally, you can create an instance of `Client` with `key` and `secret` replaced with the application key and secret that you fetched from one of the aforementioned links, respectively.
The following snippets demonstrate successful and errored responses from the Dwolla API.
127
+
128
+
An errored response is returned when Dwolla's servers respond with a status code that is greater than or equal to 400, whereas a successful response is when Dwolla's servers respond with a 200-level status code.
101
129
102
-
Requests return a `DwollaV2::Response`.
130
+
##### Success
131
+
132
+
Successful requests return a `DwollaV2::Response`.
103
133
104
134
```ruby
105
135
res =$dwolla.get "/"
@@ -115,7 +145,7 @@ res._links.events.href
115
145
# => "https://api-sandbox.dwolla.com/events"
116
146
```
117
147
118
-
##Errors
148
+
##### Error
119
149
120
150
If the server returns an error, a `DwollaV2::Error` (or one of its subclasses) will be raised.
121
151
`DwollaV2::Error`s are similar to `DwollaV2::Response`s.
@@ -140,9 +170,10 @@ rescue DwollaV2::Error => e
140
170
end
141
171
```
142
172
143
-
### `DwollaV2::Error` subclasses:
144
173
145
-
_See https://docsv2.dwolla.com/#errors for more info._
174
+
###### `DwollaV2::Error` subclasses:
175
+
176
+
_See https://developers.dwolla.com/api-reference#errors for more info._
146
177
147
178
-`DwollaV2::AccessDeniedError`
148
179
-`DwollaV2::InvalidCredentialsError`
@@ -171,37 +202,23 @@ _See https://docsv2.dwolla.com/#errors for more info._
171
202
-`DwollaV2::TooManyRequestsError`
172
203
-`DwollaV2::ConflictError`
173
204
174
-
## Development
175
-
176
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
177
-
178
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
179
-
180
-
## Contributing
181
-
182
-
Bug reports and pull requests are welcome on GitHub at https://github.com/Dwolla/dwolla-v2-ruby.
183
-
184
-
## License
185
-
186
-
The gem is available as open source under the terms of the [MIT License](https://github.com/Dwolla/dwolla-v2-ruby).
187
-
188
205
## Changelog
189
206
190
-
-**3.1.1** - Fix deprecation warning on Faraday::Connection#authorization (Thanks @javierjulio!). [#60](https://github.com/Dwolla/dwolla-v2-ruby/pull/60)
-**3.0.0.beta1** - Add token management functionality to `DwollaV2::Client`
195
212
-**2.2.1** - Update dependencies
196
213
-**2.2.0** - Change token url from `www.dwolla.com/oauth/v2/token` to `accounts.dwolla.com/token`
197
-
-**2.1.0** - Ensure `Time.iso8601` is defined so timestamps get parsed. [#38](https://github.com/Dwolla/dwolla-v2-ruby/pull/38) (Thanks @javierjulio!)
-**2.0.2** - Fix bug in [#30](https://github.com/Dwolla/dwolla-v2-ruby/pull/30) (Thanks again @sobrinho!)
200
-
-**2.0.1** - Fix bugs in [#27](https://github.com/Dwolla/dwolla-v2-ruby/pull/27) + [#28](https://github.com/Dwolla/dwolla-v2-ruby/pull/28) (Thanks @sobrinho!)
214
+
-**2.1.0** - Ensure `Time.iso8601` is defined so timestamps get parsed. [#38](https://github.com/Dwolla/dwolla-v2-ruby/pull/38) (Thanks [@javierjulio](https://github.com/javierjulio)!)
* If you have any feedback, please reach out to us on [our forums](https://discuss.dwolla.com/) or by [creating a GitHub issue](https://github.com/Dwolla/dwolla-v2-ruby/issues/new).
239
+
* If you would like to contribute to this library, [bug reports](https://github.com/Dwolla/dwolla-v2-ruby/issues) and [pull requests](https://github.com/Dwolla/dwolla-v2-ruby/pulls) are always appreciated!
240
+
* After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
241
+
* To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
242
+
243
+
## Additional Resources
244
+
245
+
To learn more about Dwolla and how to integrate our product with your application, please consider visiting the following resources and becoming a member of our community!
0 commit comments