Sha256: fe5b7f040b77107fc71d00716072fb0b30139aba505cfacf276f8a15bbcb22b5

Contents?: true

Size: 568 Bytes

Versions: 20

Compression:

Stored size: 568 Bytes

Contents

module Braintree
  class UsBankAccountGateway
    def initialize(gateway)
      @gateway = gateway
      @config = gateway.config
      @config.assert_has_access_token_or_keys
    end

    def find(token)
      raise ArgumentError if token.nil? || token.to_s.strip == ""
      response = @config.http.get("#{@config.base_merchant_path}/payment_methods/us_bank_account/#{token}")
      UsBankAccount._new(@gateway, response[:us_bank_account])
    rescue NotFoundError
      raise NotFoundError, "payment method with token #{token.inspect} not found"
    end

  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
braintree-2.83.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.82.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.81.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.80.1 lib/braintree/us_bank_account_gateway.rb
braintree-2.80.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.79.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.78.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.77.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.76.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.75.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.74.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.73.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.72.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.71.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.70.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.69.1 lib/braintree/us_bank_account_gateway.rb
braintree-2.69.0 lib/braintree/us_bank_account_gateway.rb
braintree-2.68.2 lib/braintree/us_bank_account_gateway.rb
braintree-2.68.1 lib/braintree/us_bank_account_gateway.rb
braintree-2.68.0 lib/braintree/us_bank_account_gateway.rb