lib/braintree/configuration.rb in braintree-2.10.3 vs lib/braintree/configuration.rb in braintree-2.11.0

- old
+ new

@@ -1,13 +1,12 @@ module Braintree # See http://www.braintreepayments.com/docs/ruby class Configuration API_VERSION = "2" # :nodoc: - DEFAULT_ENDPOINT = "www" # :nodoc: class << self - attr_writer :custom_user_agent, :endpoint, :logger, :merchant_id, :public_key, :private_key + attr_writer :custom_user_agent, :logger, :merchant_id, :public_key, :private_key end attr_reader :merchant_id, :public_key, :private_key def self.expectant_reader(*attributes) # :nodoc: attributes.each do |attribute| @@ -33,11 +32,10 @@ end def self.instantiate # :nodoc: config = new( :custom_user_agent => @custom_user_agent, - :endpoint => @endpoint, :environment => environment, :logger => logger, :merchant_id => merchant_id, :private_key => private_key, :public_key => public_key @@ -47,11 +45,11 @@ def self.logger @logger ||= _default_logger end def initialize(options = {}) - [:endpoint, :environment, :merchant_id, :public_key, :private_key, :custom_user_agent, :logger].each do |attr| + [:environment, :merchant_id, :public_key, :private_key, :custom_user_agent, :logger].each do |attr| instance_variable_set "@#{attr}", options[attr] end end def api_version # :nodoc: @@ -73,14 +71,10 @@ when :production File.expand_path(File.join(File.dirname(__FILE__), "..", "ssl", "www_braintreegateway_com.ca.crt")) end end - def endpoint - @endpoint || DEFAULT_ENDPOINT - end - def http # :nodoc: Http.new(self) end def logger @@ -103,10 +97,10 @@ def server # :nodoc: case @environment when :development "localhost" when :production - "#{endpoint}.braintreegateway.com" + "www.braintreegateway.com" when :qa "qa-master.braintreegateway.com" when :sandbox "sandbox.braintreegateway.com" end