{"id":18383403,"url":"https://github.com/dwolla/dwolla-v2-ruby","last_synced_at":"2025-04-04T22:04:03.019Z","repository":{"id":41247876,"uuid":"49742057","full_name":"Dwolla/dwolla-v2-ruby","owner":"Dwolla","description":"Official Ruby Wrapper for Dwolla's API v2","archived":false,"fork":false,"pushed_at":"2025-02-06T16:43:12.000Z","size":169,"stargazers_count":22,"open_issues_count":6,"forks_count":17,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-03-28T21:03:20.373Z","etag":null,"topics":["dwolla","ruby","ruby-client"],"latest_commit_sha":null,"homepage":"https://developers.dwolla.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dwolla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-15T20:04:19.000Z","updated_at":"2024-11-12T10:44:42.000Z","dependencies_parsed_at":"2024-06-20T21:58:16.077Z","dependency_job_id":"0e662da2-dbab-4f23-b734-5ff63fa06505","html_url":"https://github.com/Dwolla/dwolla-v2-ruby","commit_stats":{"total_commits":108,"total_committers":12,"mean_commits":9.0,"dds":0.2870370370370371,"last_synced_commit":"6a4c22102b5491263c235e0f08abff2068240639"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwolla%2Fdwolla-v2-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dwolla","download_url":"https://codeload.github.com/Dwolla/dwolla-v2-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256107,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dwolla","ruby","ruby-client"],"created_at":"2024-11-06T01:11:16.221Z","updated_at":"2025-04-04T22:04:03.001Z","avatar_url":"https://github.com/Dwolla.png","language":"Ruby","readme":"# Dwolla SDK for Ruby\n\nThis 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.\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Initialization](#initialization)\n- [Making Requests](#making-requests)\n  - [Low-level Requests](#low-level-requests)\n    - [Setting Headers](#setting-headers)\n    - [Responses](#responses)\n      - [Success](#success)\n      - [Error](#error)\n- [Changelog](#changelog)\n- [Community](#community)\n- [Additional Resources](#additional-resources)\n\n\n## Getting Started\n\n### Installation\n\nTo 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.\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'dwolla_v2', '~\u003e 3.1'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install dwolla_v2\n\n### Initialization\n\nBefore 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:\n\n* Production: https://dashboard.dwolla.com/applications\n* Sandbox: https://dashboard-sandbox.dwolla.com/applications\n\nFinally, 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.\n\n```ruby\n# config/initializers/dwolla.rb\n$dwolla = DwollaV2::Client.new(\n  key: ENV[\"DWOLLA_APP_KEY\"],\n  secret: ENV[\"DWOLLA_APP_SECRET\"],\n  environment: :sandbox # defaults to :production\n)\n```\n\n#### Configure Faraday (Optional)\n\nDwolla for Ruby uses [Faraday][faraday] to make HTTP requests. You can configure your own\n[Faraday middleware][faraday-middleware] and adapter when configuring your client. Remember to\nalways include an adapter last, even if you want to use the default adapter.\n\n[faraday]: https://github.com/lostisland/faraday\n[faraday-middleware]: https://github.com/lostisland/faraday_middleware\n\n```ruby\n# config/initializers/dwolla.rb\n$dwolla = DwollaV2::Client.new(\n  key: ENV[\"DWOLLA_APP_KEY\"],\n  secret: ENV[\"DWOLLA_APP_SECRET\"]\n) do |config|\n\n  config.faraday do |faraday|\n    faraday.response :logger\n    faraday.adapter Faraday.default_adapter\n  end\nend\n```\n\n## Making Requests\n\nOnce you've created a `Client`, currently, you can make low-level HTTP requests.\n\n### Low-level Requests\n\nTo make low-level HTTP requests, you can use the [`get()`](#get), [`post()`](#post), and [`delete()`](#delete) methods.\n\n#### `GET`\n```ruby\n# GET api.dwolla.com/resource?foo=bar\n$dwolla.get \"resource\", foo: \"bar\"\n```\n\n#### `POST`\n```ruby\n# POST api.dwolla.com/resource {\"foo\":\"bar\"}\n$dwolla.post \"resource\", foo: \"bar\"\n\n# POST api.dwolla.com/resource multipart/form-data foo=...\n$dwolla.post \"resource\", foo: Faraday::UploadIO.new(\"/path/to/bar.png\", \"image/png\")\n```\n\n#### `DELETE`\n```ruby\n# DELETE api.dwolla.com/resource\n$dwolla.delete \"resource\"\n```\n\n##### Setting Headers\n\nTo set additional headers on a request, you can pass a `Hash` of headers as the 3rd argument.\n\nFor example:\n\n```ruby\n$dwolla.post \"customers\", { firstName: \"John\", lastName: \"Doe\", email: \"jd@doe.com\" },\n                          { 'Idempotency-Key': 'a52fcf63-0730-41c3-96e8-7147b5d1fb01' }\n```\n\n#### Responses\n\nThe following snippets demonstrate successful and errored responses from the Dwolla API.\n\nAn 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.\n\n##### Success\n\nSuccessful requests return a `DwollaV2::Response`.\n\n```ruby\nres = $dwolla.get \"/\"\n# =\u003e #\u003cDwollaV2::Response response_status=200 response_headers={\"server\"=\u003e\"cloudflare-nginx\", \"date\"=\u003e\"Mon, 28 Mar 2016 15:30:23 GMT\", \"content-type\"=\u003e\"application/vnd.dwolla.v1.hal+json; charset=UTF-8\", \"content-length\"=\u003e\"150\", \"connection\"=\u003e\"close\", \"set-cookie\"=\u003e\"__cfduid=d9dcd0f586c166d36cbd45b992bdaa11b1459179023; expires=Tue, 28-Mar-17 15:30:23 GMT; path=/; domain=.dwolla.com; HttpOnly\", \"x-request-id\"=\u003e\"69a4e612-5dae-4c52-a6a0-2f921e34a88a\", \"cf-ray\"=\u003e\"28ac1f81875941e3-MSP\"} {\"_links\"=\u003e{\"events\"=\u003e{\"href\"=\u003e\"https://api-sandbox.dwolla.com/events\"}, \"webhook-subscriptions\"=\u003e{\"href\"=\u003e\"https://api-sandbox.dwolla.com/webhook-subscriptions\"}}}\u003e\n\nres.response_status\n# =\u003e 200\n\nres.response_headers\n# =\u003e {\"server\"=\u003e\"cloudflare-nginx\", \"date\"=\u003e\"Mon, 28 Mar 2016 15:30:23 GMT\", \"content-type\"=\u003e\"application/vnd.dwolla.v1.hal+json; charset=UTF-8\", \"content-length\"=\u003e\"150\", \"connection\"=\u003e\"close\", \"set-cookie\"=\u003e\"__cfduid=d9dcd0f586c166d36cbd45b992bdaa11b1459179023; expires=Tue, 28-Mar-17 15:30:23 GMT; path=/; domain=.dwolla.com; HttpOnly\", \"x-request-id\"=\u003e\"69a4e612-5dae-4c52-a6a0-2f921e34a88a\", \"cf-ray\"=\u003e\"28ac1f81875941e3-MSP\"}\n\nres._links.events.href\n# =\u003e \"https://api-sandbox.dwolla.com/events\"\n```\n\n##### Error\n\nIf the server returns an error, a `DwollaV2::Error` (or one of its subclasses) will be raised.\n`DwollaV2::Error`s are similar to `DwollaV2::Response`s.\n\n```ruby\nbegin\n  $dwolla.get \"/not-found\"\nrescue DwollaV2::NotFoundError =\u003e e\n  e\n  # =\u003e #\u003cDwollaV2::NotFoundError response_status=404 response_headers={\"server\"=\u003e\"cloudflare-nginx\", \"date\"=\u003e\"Mon, 28 Mar 2016 15:35:32 GMT\", \"content-type\"=\u003e\"application/vnd.dwolla.v1.hal+json; profile=\\\"http://nocarrier.co.uk/profiles/vnd.error/\\\"; charset=UTF-8\", \"content-length\"=\u003e\"69\", \"connection\"=\u003e\"close\", \"set-cookie\"=\u003e\"__cfduid=da1478bfdf3e56275cd8a6a741866ccce1459179332; expires=Tue, 28-Mar-17 15:35:32 GMT; path=/; domain=.dwolla.com; HttpOnly\", \"access-control-allow-origin\"=\u003e\"*\", \"x-request-id\"=\u003e\"667fca74-b53d-43db-bddd-50426a011881\", \"cf-ray\"=\u003e\"28ac270abca64207-MSP\"} {\"code\"=\u003e\"NotFound\", \"message\"=\u003e\"The requested resource was not found.\"}\u003e\n\n  e.response_status\n  # =\u003e 404\n\n  e.response_headers\n  # =\u003e {\"server\"=\u003e\"cloudflare-nginx\", \"date\"=\u003e\"Mon, 28 Mar 2016 15:35:32 GMT\", \"content-type\"=\u003e\"application/vnd.dwolla.v1.hal+json; profile=\\\"http://nocarrier.co.uk/profiles/vnd.error/\\\"; charset=UTF-8\", \"content-length\"=\u003e\"69\", \"connection\"=\u003e\"close\", \"set-cookie\"=\u003e\"__cfduid=da1478bfdf3e56275cd8a6a741866ccce1459179332; expires=Tue, 28-Mar-17 15:35:32 GMT; path=/; domain=.dwolla.com; HttpOnly\", \"access-control-allow-origin\"=\u003e\"*\", \"x-request-id\"=\u003e\"667fca74-b53d-43db-bddd-50426a011881\", \"cf-ray\"=\u003e\"28ac270abca64207-MSP\"}\n\n  e.code\n  # =\u003e \"NotFound\"\nrescue DwollaV2::Error =\u003e e\n  # ...\nend\n```\n\n\n###### `DwollaV2::Error` subclasses:\n\n_See https://developers.dwolla.com/api-reference#errors for more info._\n\n- `DwollaV2::AccessDeniedError`\n- `DwollaV2::InvalidCredentialsError`\n- `DwollaV2::NotFoundError`\n- `DwollaV2::BadRequestError`\n- `DwollaV2::InvalidGrantError`\n- `DwollaV2::RequestTimeoutError`\n- `DwollaV2::ExpiredAccessTokenError`\n- `DwollaV2::InvalidRequestError`\n- `DwollaV2::ServerError`\n- `DwollaV2::ForbiddenError`\n- `DwollaV2::InvalidResourceStateError`\n- `DwollaV2::TemporarilyUnavailableError`\n- `DwollaV2::InvalidAccessTokenError`\n- `DwollaV2::InvalidScopeError`\n- `DwollaV2::UnauthorizedClientError`\n- `DwollaV2::InvalidAccountStatusError`\n- `DwollaV2::InvalidScopesError`\n- `DwollaV2::UnsupportedGrantTypeError`\n- `DwollaV2::InvalidApplicationStatusError`\n- `DwollaV2::InvalidVersionError`\n- `DwollaV2::UnsupportedResponseTypeError`\n- `DwollaV2::InvalidClientError`\n- `DwollaV2::MethodNotAllowedError`\n- `DwollaV2::ValidationError`\n- `DwollaV2::TooManyRequestsError`\n- `DwollaV2::ConflictError`\n\n## Changelog\n\n- [**4.0.0**](https://github.com/Dwolla/dwolla-v2-ruby/releases/tag/v4.0.0) - Major version update to include support for Faraday 2.0, discontinue support for Ruby versions prior to v2.6, and adopt faraday-multipart in place of Faraday middleware.\n- [**3.2.0**](https://github.com/Dwolla/dwolla-v2-ruby/releases/tag/3.2.0) - Minor version update to support Ruby 3.2+. The change involves adding '**' to the codebase to make `opts` in `./lib/dwollav2/client.rb` compliant with Ruby 3.2+. (Thanks [@peterb-onramp](https://github.com/peterb-onramp)!). [#68](https://github.com/Dwolla/dwolla-v2-ruby/pull/68)\n- **3.1.1** - Fix deprecation warning on Faraday::Connection#authorization (Thanks [@javierjulio](https://github.com/javierjulio)!). [#60](https://github.com/Dwolla/dwolla-v2-ruby/pull/60)\n- **3.1.0** - Added `DwollaV2::MaxNumberOfResourcesError` (Thanks [@paulyeo21](https://github.com/paulyeo21)!). [#54](https://github.com/Dwolla/dwolla-v2-ruby/pull/54)\n- **3.0.1** - Update dependencies (Thanks [@sealabcore](https://github.com/sealabcore)!). [#48](https://github.com/Dwolla/dwolla-v2-ruby/pull/48)\n- **3.0.0** - Add integrations auth functions\n- **3.0.0.beta1** - Add token management functionality to `DwollaV2::Client`\n- **2.2.1** - Update dependencies\n- **2.2.0** - Change token url from `www.dwolla.com/oauth/v2/token` to `accounts.dwolla.com/token`\n- **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)!)\n- **2.0.3** - Add `DuplicateResourceError` [#34](https://github.com/Dwolla/dwolla-v2-ruby/pull/34) (Thanks [@javierjulio](https://github.com/javierjulio)!)\n- **2.0.2** - Fix bug in [#30](https://github.com/Dwolla/dwolla-v2-ruby/pull/30) (Thanks again [@sobrinho](https://github.com/sobrinho)!\n- **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](https://github.com/sobrinho)!)\n- **2.0.0**\n- Rename `DwollaV2::Response` `#status` =\u003e `#response_status`, `#headers` =\u003e `#response_headers` to prevent\n  [conflicts with response body properties](https://discuss.dwolla.com/t/document-change-or-more-clarifiation/3964).\n- Remove support for Ruby versions \u003c 2 ([Bump public_suffix dependency version](https://github.com/Dwolla/dwolla-v2-ruby/pull/18#discussion_r108028135)).\n- **1.2.3** - Implement `#empty?` on `DwollaV2::Token` to allow it to be passed to ActiveRecord constructor.\n- **1.2.2** - Strip domain from URLs provided to `token.*` methods.\n- **1.2.1** - Update sandbox URLs from uat =\u003e sandbox.\n- **1.2.0** - Refer to Client :id as :key in docs/public APIs for consistency.\n- **1.1.2** - Add support for `verified_account` and `dwolla_landing` auth flags.\n- **1.1.1** - Add `TooManyRequestsError` and `ConflictError` classes.\n- **1.1.0** - Support setting headers on a per-request basis.\n- **1.0.1** - Set user agent header.\n- **1.0.0** - Refactor `Error` class to be more like response, add ability to access keys using methods.\n- **0.4.0** - Refactor and document how `DwollaV2::Response` works\n- **0.3.1** - better `DwollaV2::Error` error messages\n- **0.3.0** - ISO8601 values in response body are converted to `Time` objects\n- **0.2.0** - Works with `attr_encrypted`\n- **0.1.1** - Handle 500 error with HTML response body when requesting a token\n\n## Community\n* 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).\n* 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!\n  * 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. \n  * 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).\n\n## Docker\n\nIf you prefer to use Docker to run dwolla-v2-python locally, a Dockerfile is included at the root directory.\nFollow these instructions from [Docker's website](https://docs.docker.com/build/hellobuild/) to create a Docker image from the Dockerfile, and run it.\n  \n## Additional Resources\n\nTo 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!\n\n* [Dwolla](https://www.dwolla.com/)\n* [Dwolla Developers](https://developers.dwolla.com/)\n* [SDKs and Tools](https://developers.dwolla.com/sdks-tools)\n  * [Dwolla SDK for C#](https://github.com/Dwolla/dwolla-v2-csharp)\n  * [Dwolla SDK for Kotlin](https://github.com/Dwolla/dwolla-v2-kotlin)\n  * [Dwolla SDK for Node](https://github.com/Dwolla/dwolla-v2-node)\n  * [Dwolla SDK for PHP](https://github.com/Dwolla/dwolla-v2-php)\n  * [Dwolla SDK for Python](https://github.com/Dwolla/dwolla-v2-python)\n* [Developer Support Forum](https://discuss.dwolla.com/)\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolla%2Fdwolla-v2-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolla%2Fdwolla-v2-ruby/lists"}