lib/epayco/configuration.rb in epayco-0.0.2 vs lib/epayco/configuration.rb in epayco-0.0.3

- old
+ new

@@ -10,11 +10,12 @@ :private_key, :adapter, :connection_options, :endpoint, :proxy, - :user_agent + :user_agent, + :test_mode ].freeze # By default, don't set a user public key DEFAULT_PUBLIC_KEY = nil @@ -38,10 +39,13 @@ DEFAULT_PROXY = nil # The user agent that will be sent to the API endpoint if none is set DEFAULT_USER_AGENT = "EPayCo Ruby Gem #{EPayCo::VERSION}".freeze + # Test param that will be send in the POST requets + DEFAULT_TEST_MODE = false + # @private attr_accessor *VALID_OPTIONS_KEYS # When this module is extended, set all configuration options to their default values def self.extended(base) @@ -60,15 +64,16 @@ end end # Reset all configuration options to defaults def reset - self.public_key = DEFAULT_PUBLIC_KEY - self.private_key = DEFAULT_PRIVATE_KEY + self.public_key = DEFAULT_PUBLIC_KEY + self.private_key = DEFAULT_PRIVATE_KEY self.adapter = DEFAULT_ADAPTER self.connection_options = DEFAULT_CONNECTION_OPTIONS self.endpoint = DEFAULT_ENDPOINT self.proxy = DEFAULT_PROXY self.user_agent = DEFAULT_USER_AGENT + self.test_mode = DEFAULT_TEST_MODE end end end