Sha256: e7357cd002247a8f97b50e8a47e48c1da9233ae78af8a5c0a50cad44f29de7a4

Contents?: true

Size: 612 Bytes

Versions: 15

Compression:

Stored size: 612 Bytes

Contents

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

    def find(ideal_payment_id)
      raise ArgumentError if ideal_payment_id.nil? || ideal_payment_id.to_s.strip == ""
      response = @config.http.get("#{@config.base_merchant_path}/ideal_payments/#{ideal_payment_id}")
      IdealPayment._new(@gateway, response[:ideal_payment])
    rescue NotFoundError
      raise NotFoundError, "ideal payment with ideal_payment_id #{ideal_payment_id.inspect} not found"
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
braintree-2.83.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.82.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.81.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.80.1 lib/braintree/ideal_payment_gateway.rb
braintree-2.80.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.79.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.78.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.77.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.76.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.75.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.74.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.73.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.72.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.71.0 lib/braintree/ideal_payment_gateway.rb
braintree-2.70.0 lib/braintree/ideal_payment_gateway.rb