dwolla_v2 3.0.0.beta1 → 3.1.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 +5 -5
- data/.github/workflows/ruby.yml +35 -0
- data/README.md +9 -1
- data/dwolla_v2.gemspec +3 -3
- data/lib/dwolla_v2/client.rb +17 -2
- data/lib/dwolla_v2/errors/max_number_of_resources_error.rb +4 -0
- data/lib/dwolla_v2/token.rb +1 -1
- data/lib/dwolla_v2/version.rb +1 -1
- data/lib/dwolla_v2.rb +1 -0
- metadata +13 -13
- data/.travis.yml +0 -30
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: 4be9f7bea7e810a03f2ab1696a4f58fab0a6a98ea1d58175a439821dda1f22fc
         | 
| 4 | 
            +
              data.tar.gz: 4298b78df775708117f2b2da8c34324fd473541b6c373fad528bdc056fd00bfd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: db8f28c736e95cca9712bd393576e1e407f311fc77ce6a368f819980238276a8d48e0563c84665d3cbba112af10c048d81dd1114d5305dcc4737c4a90fb8e41d
         | 
| 7 | 
            +
              data.tar.gz: 6f4b3852412029a7c9eeb2de586aea3f88d5102b53eac27d624f01f2789553797bb5abb06b22a32593297c5a2e7213ca3b67bd95c8d808fe8fd5b790f61b1c01
         | 
| @@ -0,0 +1,35 @@ | |
| 1 | 
            +
            # This workflow uses actions that are not certified by GitHub.
         | 
| 2 | 
            +
            # They are provided by a third-party and are governed by
         | 
| 3 | 
            +
            # separate terms of service, privacy policy, and support
         | 
| 4 | 
            +
            # documentation.
         | 
| 5 | 
            +
            # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
         | 
| 6 | 
            +
            # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            name: Ruby
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            on:
         | 
| 11 | 
            +
              push:
         | 
| 12 | 
            +
                branches: [main]
         | 
| 13 | 
            +
              pull_request:
         | 
| 14 | 
            +
                branches: [main]
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            jobs:
         | 
| 17 | 
            +
              test:
         | 
| 18 | 
            +
                strategy:
         | 
| 19 | 
            +
                  matrix:
         | 
| 20 | 
            +
                    os: ["ubuntu-latest"]
         | 
| 21 | 
            +
                    ruby: ["2.4", "2.5", "2.6", "2.7"]
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                runs-on: ${{ matrix.os }}
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                steps:
         | 
| 26 | 
            +
                  - uses: actions/checkout@v2
         | 
| 27 | 
            +
                  - name: Set up Ruby
         | 
| 28 | 
            +
                    # https://github.com/ruby/setup-ruby
         | 
| 29 | 
            +
                    uses: ruby/setup-ruby@v1
         | 
| 30 | 
            +
                    with:
         | 
| 31 | 
            +
                      ruby-version: ${{ matrix.ruby }}
         | 
| 32 | 
            +
                  - name: Install dependencies
         | 
| 33 | 
            +
                    run: bundle install
         | 
| 34 | 
            +
                  - name: Run tests
         | 
| 35 | 
            +
                    run: bundle exec rspec
         | 
    
        data/README.md
    CHANGED
    
    | @@ -11,7 +11,7 @@ Dwolla V2 Ruby client. | |
| 11 11 | 
             
            Add this line to your application's Gemfile:
         | 
| 12 12 |  | 
| 13 13 | 
             
            ```ruby
         | 
| 14 | 
            -
            gem 'dwolla_v2', '3. | 
| 14 | 
            +
            gem 'dwolla_v2', '~> 3.1'
         | 
| 15 15 | 
             
            ```
         | 
| 16 16 |  | 
| 17 17 | 
             
            And then execute:
         | 
| @@ -41,6 +41,10 @@ $dwolla = DwollaV2::Client.new( | |
| 41 41 | 
             
            )
         | 
| 42 42 | 
             
            ```
         | 
| 43 43 |  | 
| 44 | 
            +
            ### Integrations Authorization
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            Check out our [Integrations Authorization Guide](https://developers.dwolla.com/integrations/authorization).
         | 
| 47 | 
            +
             | 
| 44 48 | 
             
            ### Configure Faraday (optional)
         | 
| 45 49 |  | 
| 46 50 | 
             
            DwollaV2 uses [Faraday][faraday] to make HTTP requests. You can configure your own
         | 
| @@ -183,6 +187,10 @@ The gem is available as open source under the terms of the [MIT License](https:/ | |
| 183 187 |  | 
| 184 188 | 
             
            ## Changelog
         | 
| 185 189 |  | 
| 190 | 
            +
            - **3.1.1** - Fix deprecation warning on Faraday::Connection#authorization (Thanks @javierjulio!). [#60](https://github.com/Dwolla/dwolla-v2-ruby/pull/60)
         | 
| 191 | 
            +
            - **3.1.0** - Added `DwollaV2::MaxNumberOfResourcesError` (Thanks @paulyeo21!). [#54](https://github.com/Dwolla/dwolla-v2-ruby/pull/54)
         | 
| 192 | 
            +
            - **3.0.1** - Update dependencies (Thanks @sealabcore!). [#48](https://github.com/Dwolla/dwolla-v2-ruby/pull/48)
         | 
| 193 | 
            +
            - **3.0.0** - Add integrations auth functions
         | 
| 186 194 | 
             
            - **3.0.0.beta1** - Add token management functionality to `DwollaV2::Client`
         | 
| 187 195 | 
             
            - **2.2.1** - Update dependencies
         | 
| 188 196 | 
             
            - **2.2.0** - Change token url from `www.dwolla.com/oauth/v2/token` to `accounts.dwolla.com/token`
         | 
    
        data/dwolla_v2.gemspec
    CHANGED
    
    | @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| | |
| 24 24 | 
             
              spec.add_development_dependency "rspec", "~> 3.8"
         | 
| 25 25 | 
             
              spec.add_development_dependency "webmock", "~> 3.6"
         | 
| 26 26 |  | 
| 27 | 
            -
              spec.add_dependency "hashie", " | 
| 28 | 
            -
              spec.add_dependency "faraday", " | 
| 29 | 
            -
              spec.add_dependency "faraday_middleware", " | 
| 27 | 
            +
              spec.add_dependency "hashie", ">= 3.6"
         | 
| 28 | 
            +
              spec.add_dependency "faraday", ">= 0.15"
         | 
| 29 | 
            +
              spec.add_dependency "faraday_middleware", ">= 0.13"
         | 
| 30 30 | 
             
            end
         | 
    
        data/lib/dwolla_v2/client.rb
    CHANGED
    
    | @@ -18,7 +18,7 @@ module DwollaV2 | |
| 18 18 | 
             
                attr_reader :id, :secret, :auths, :tokens
         | 
| 19 19 | 
             
                alias_method :key, :id
         | 
| 20 20 |  | 
| 21 | 
            -
                def_delegators : | 
| 21 | 
            +
                def_delegators :current_token, :get, :post, :delete
         | 
| 22 22 |  | 
| 23 23 | 
             
                def initialize opts
         | 
| 24 24 | 
             
                  opts[:id] ||= opts[:key]
         | 
| @@ -70,6 +70,21 @@ module DwollaV2 | |
| 70 70 | 
             
                  end
         | 
| 71 71 | 
             
                end
         | 
| 72 72 |  | 
| 73 | 
            +
                def auth(params = {})
         | 
| 74 | 
            +
                  DwollaV2::Auth.new(self, params)
         | 
| 75 | 
            +
                end
         | 
| 76 | 
            +
             | 
| 77 | 
            +
                def refresh_token(params = {})
         | 
| 78 | 
            +
                  unless params.is_a?(Hash) && params.has_key?(:refresh_token)
         | 
| 79 | 
            +
                    raise ArgumentError.new(":refresh_token is required")
         | 
| 80 | 
            +
                  end
         | 
| 81 | 
            +
                  auths.refresh(params, params)
         | 
| 82 | 
            +
                end
         | 
| 83 | 
            +
             | 
| 84 | 
            +
                def token(params = {})
         | 
| 85 | 
            +
                  tokens.new(params)
         | 
| 86 | 
            +
                end
         | 
| 87 | 
            +
             | 
| 73 88 | 
             
                def auth_url
         | 
| 74 89 | 
             
                  ENVIRONMENTS[environment][:auth_url]
         | 
| 75 90 | 
             
                end
         | 
| @@ -88,7 +103,7 @@ module DwollaV2 | |
| 88 103 |  | 
| 89 104 | 
             
                private
         | 
| 90 105 |  | 
| 91 | 
            -
                  def  | 
| 106 | 
            +
                  def current_token
         | 
| 92 107 | 
             
                    @token_manager.get_token
         | 
| 93 108 | 
             
                  end
         | 
| 94 109 | 
             
              end
         | 
    
        data/lib/dwolla_v2/token.rb
    CHANGED
    
    | @@ -53,7 +53,7 @@ module DwollaV2 | |
| 53 53 |  | 
| 54 54 | 
             
                def conn
         | 
| 55 55 | 
             
                  @conn ||= Faraday.new do |f|
         | 
| 56 | 
            -
                    f.authorization :Bearer, access_token if access_token
         | 
| 56 | 
            +
                    f.request :authorization, :Bearer, access_token if access_token
         | 
| 57 57 | 
             
                    f.headers[:accept] = "application/vnd.dwolla.v1.hal+json"
         | 
| 58 58 | 
             
                    f.request :multipart
         | 
| 59 59 | 
             
                    f.request :json
         | 
    
        data/lib/dwolla_v2/version.rb
    CHANGED
    
    
    
        data/lib/dwolla_v2.rb
    CHANGED
    
    | @@ -56,6 +56,7 @@ require "dwolla_v2/errors/request_timeout_error" | |
| 56 56 | 
             
            require "dwolla_v2/errors/too_many_requests_error"
         | 
| 57 57 | 
             
            require "dwolla_v2/errors/conflict_error"
         | 
| 58 58 | 
             
            require "dwolla_v2/errors/duplicate_resource_error"
         | 
| 59 | 
            +
            require "dwolla_v2/errors/max_number_of_resources_error"
         | 
| 59 60 |  | 
| 60 61 | 
             
            module DwollaV2
         | 
| 61 62 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: dwolla_v2
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3. | 
| 4 | 
            +
              version: 3.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Stephen Ausman
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-12-22 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -70,42 +70,42 @@ dependencies: | |
| 70 70 | 
             
              name: hashie
         | 
| 71 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 72 | 
             
                requirements:
         | 
| 73 | 
            -
                - - " | 
| 73 | 
            +
                - - ">="
         | 
| 74 74 | 
             
                  - !ruby/object:Gem::Version
         | 
| 75 75 | 
             
                    version: '3.6'
         | 
| 76 76 | 
             
              type: :runtime
         | 
| 77 77 | 
             
              prerelease: false
         | 
| 78 78 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 79 | 
             
                requirements:
         | 
| 80 | 
            -
                - - " | 
| 80 | 
            +
                - - ">="
         | 
| 81 81 | 
             
                  - !ruby/object:Gem::Version
         | 
| 82 82 | 
             
                    version: '3.6'
         | 
| 83 83 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 84 84 | 
             
              name: faraday
         | 
| 85 85 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 86 | 
             
                requirements:
         | 
| 87 | 
            -
                - - " | 
| 87 | 
            +
                - - ">="
         | 
| 88 88 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 89 | 
             
                    version: '0.15'
         | 
| 90 90 | 
             
              type: :runtime
         | 
| 91 91 | 
             
              prerelease: false
         | 
| 92 92 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 93 | 
             
                requirements:
         | 
| 94 | 
            -
                - - " | 
| 94 | 
            +
                - - ">="
         | 
| 95 95 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 96 | 
             
                    version: '0.15'
         | 
| 97 97 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 98 98 | 
             
              name: faraday_middleware
         | 
| 99 99 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 100 100 | 
             
                requirements:
         | 
| 101 | 
            -
                - - " | 
| 101 | 
            +
                - - ">="
         | 
| 102 102 | 
             
                  - !ruby/object:Gem::Version
         | 
| 103 103 | 
             
                    version: '0.13'
         | 
| 104 104 | 
             
              type: :runtime
         | 
| 105 105 | 
             
              prerelease: false
         | 
| 106 106 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 107 107 | 
             
                requirements:
         | 
| 108 | 
            -
                - - " | 
| 108 | 
            +
                - - ">="
         | 
| 109 109 | 
             
                  - !ruby/object:Gem::Version
         | 
| 110 110 | 
             
                    version: '0.13'
         | 
| 111 111 | 
             
            description: Dwolla V2 Ruby client
         | 
| @@ -115,9 +115,9 @@ executables: [] | |
| 115 115 | 
             
            extensions: []
         | 
| 116 116 | 
             
            extra_rdoc_files: []
         | 
| 117 117 | 
             
            files:
         | 
| 118 | 
            +
            - ".github/workflows/ruby.yml"
         | 
| 118 119 | 
             
            - ".gitignore"
         | 
| 119 120 | 
             
            - ".rspec"
         | 
| 120 | 
            -
            - ".travis.yml"
         | 
| 121 121 | 
             
            - Gemfile
         | 
| 122 122 | 
             
            - LICENSE.txt
         | 
| 123 123 | 
             
            - README.md
         | 
| @@ -146,6 +146,7 @@ files: | |
| 146 146 | 
             
            - lib/dwolla_v2/errors/invalid_scope_error.rb
         | 
| 147 147 | 
             
            - lib/dwolla_v2/errors/invalid_scopes_error.rb
         | 
| 148 148 | 
             
            - lib/dwolla_v2/errors/invalid_version_error.rb
         | 
| 149 | 
            +
            - lib/dwolla_v2/errors/max_number_of_resources_error.rb
         | 
| 149 150 | 
             
            - lib/dwolla_v2/errors/method_not_allowed_error.rb
         | 
| 150 151 | 
             
            - lib/dwolla_v2/errors/not_found_error.rb
         | 
| 151 152 | 
             
            - lib/dwolla_v2/errors/request_timeout_error.rb
         | 
| @@ -182,12 +183,11 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 182 183 | 
             
                  version: '0'
         | 
| 183 184 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 184 185 | 
             
              requirements:
         | 
| 185 | 
            -
              - - " | 
| 186 | 
            +
              - - ">="
         | 
| 186 187 | 
             
                - !ruby/object:Gem::Version
         | 
| 187 | 
            -
                  version:  | 
| 188 | 
            +
                  version: '0'
         | 
| 188 189 | 
             
            requirements: []
         | 
| 189 | 
            -
             | 
| 190 | 
            -
            rubygems_version: 2.5.2.3
         | 
| 190 | 
            +
            rubygems_version: 3.0.3.1
         | 
| 191 191 | 
             
            signing_key: 
         | 
| 192 192 | 
             
            specification_version: 4
         | 
| 193 193 | 
             
            summary: Dwolla V2 Ruby client
         | 
    
        data/.travis.yml
    DELETED
    
    | @@ -1,30 +0,0 @@ | |
| 1 | 
            -
            language: ruby
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            rvm:
         | 
| 4 | 
            -
              - 1.9.3
         | 
| 5 | 
            -
              - 2.0.0
         | 
| 6 | 
            -
              - 2.1.10
         | 
| 7 | 
            -
              - 2.2.10
         | 
| 8 | 
            -
              - 2.3.7
         | 
| 9 | 
            -
              - 2.4.4
         | 
| 10 | 
            -
              - 2.5.1
         | 
| 11 | 
            -
              - 2.6.3
         | 
| 12 | 
            -
              - ruby-head
         | 
| 13 | 
            -
              - rbx-2
         | 
| 14 | 
            -
              - rbx-3
         | 
| 15 | 
            -
              - rbx-4
         | 
| 16 | 
            -
              - jruby
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            before_install: gem install bundler -v 2.0.2
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            matrix:
         | 
| 21 | 
            -
              allow_failures:
         | 
| 22 | 
            -
                - rvm: 1.9.3
         | 
| 23 | 
            -
                - rvm: 2.0.0
         | 
| 24 | 
            -
                - rvm: 2.1.10
         | 
| 25 | 
            -
                - rvm: 2.2.10
         | 
| 26 | 
            -
                - rvm: rbx-2
         | 
| 27 | 
            -
                - rvm: rbx-3
         | 
| 28 | 
            -
                - rvm: rbx-4
         | 
| 29 | 
            -
                - rvm: jruby
         | 
| 30 | 
            -
              fast_finish: true
         |