Sha256: 6800ff11b5cc792f8d6d54093b40285184c169d5e0591fe12f2bf4c70a876547

Contents?: true

Size: 726 Bytes

Versions: 11

Compression:

Stored size: 726 Bytes

Contents

module Braintree
  class Gateway # :nodoc:
    attr_reader :config

    def initialize(config)
      if config.is_a?(Hash)
        @config = Configuration.new config
      elsif config.is_a?(Braintree::Configuration)
        @config = config
      else
        raise ArgumentError, "config is an invalid type"
      end
    end

    def address
      AddressGateway.new(self)
    end

    def credit_card
      CreditCardGateway.new(self)
    end

    def customer
      CustomerGateway.new(self)
    end

    def subscription
      SubscriptionGateway.new(self)
    end

    def transparent_redirect
      TransparentRedirectGateway.new(self)
    end

    def transaction
      TransactionGateway.new(self)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
braintree-2.10.1 lib/braintree/gateway.rb
braintree-2.10.0 lib/braintree/gateway.rb
braintree-2.9.1 lib/braintree/gateway.rb
braintree-2.8.0 lib/braintree/gateway.rb
braintree-2.7.0 lib/braintree/gateway.rb
braintree-2.6.3 lib/braintree/gateway.rb
braintree-2.6.2 lib/braintree/gateway.rb
braintree-2.6.1 lib/braintree/gateway.rb
braintree-2.6.0 lib/braintree/gateway.rb
braintree-2.5.2 lib/braintree/gateway.rb
braintree-2.5.1 lib/braintree/gateway.rb