Sha256: 9a33a20bbd5a4c9f292115a566c471ac192eadbe16bf805eea4f734c89848303

Contents?: true

Size: 405 Bytes

Versions: 25

Compression:

Stored size: 405 Bytes

Contents

module Braintree
  class OAuthTestHelper
    def self.create_grant(gateway, params)
      response = gateway.config.http.post("/oauth_testing/grants", {
        :grant => params
      })
      response[:grant][:code]
    end

    def self.create_token(gateway, params)
      code = create_grant(gateway, params)
      gateway.oauth.create_token_from_code(
        :code => code,
      )
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/oauth_test_helper.rb
braintree-4.22.0 spec/oauth_test_helper.rb
braintree-4.21.0 spec/oauth_test_helper.rb
braintree-4.20.0 spec/oauth_test_helper.rb
braintree-4.19.0 spec/oauth_test_helper.rb
braintree-4.18.0 spec/oauth_test_helper.rb
braintree-4.17.0 spec/oauth_test_helper.rb
braintree-4.16.0 spec/oauth_test_helper.rb
braintree-4.15.0 spec/oauth_test_helper.rb
braintree-4.14.0 spec/oauth_test_helper.rb
braintree-4.13.0 spec/oauth_test_helper.rb
braintree-4.12.0 spec/oauth_test_helper.rb
braintree-4.11.0 spec/oauth_test_helper.rb
braintree-4.10.0 spec/oauth_test_helper.rb
braintree-4.9.0 spec/oauth_test_helper.rb
braintree-4.8.0 spec/oauth_test_helper.rb
braintree-4.7.0 spec/oauth_test_helper.rb
braintree-4.6.0 spec/oauth_test_helper.rb
braintree-4.5.0 spec/oauth_test_helper.rb
braintree-4.4.0 spec/oauth_test_helper.rb