Sha256: 90a92c4e1fd98ef88d4e25959c6d419bed3d03761f5f0a959491ee29f12d6f1c

Contents?: true

Size: 807 Bytes

Versions: 2

Compression:

Stored size: 807 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 payer_authentication
      PayerAuthenticationGateway.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

2 entries across 2 versions & 1 rubygems

Version Path
braintree-2.10.3 lib/braintree/gateway.rb
braintree-2.10.2 lib/braintree/gateway.rb