Sha256: 28ef407b523fd310af98a31de5bee4056fd709b8edcbc844b0bf205f2b723b36

Contents?: true

Size: 975 Bytes

Versions: 8

Compression:

Stored size: 975 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 add_on
      AddOnGateway.new(self)
    end

    def address
      AddressGateway.new(self)
    end

    def credit_card
      CreditCardGateway.new(self)
    end

    def customer
      CustomerGateway.new(self)
    end

    def discount
      DiscountGateway.new(self)
    end

    def plan
      PlanGateway.new(self)
    end

    def settlement_batch_summary
      SettlementBatchSummaryGateway.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

8 entries across 8 versions & 1 rubygems

Version Path
braintree-2.15.0 lib/braintree/gateway.rb
braintree-2.14.0 lib/braintree/gateway.rb
braintree-2.13.4 lib/braintree/gateway.rb
braintree-2.13.3 lib/braintree/gateway.rb
braintree-2.13.2 lib/braintree/gateway.rb
braintree-2.13.1 lib/braintree/gateway.rb
braintree-2.13.0 lib/braintree/gateway.rb
braintree-2.12.0 lib/braintree/gateway.rb