Class: RocketGate::Configuration
- Inherits:
-
Object
- Object
- RocketGate::Configuration
- Includes:
- Validatable
- Defined in:
- lib/rocketgate/configuration.rb
Constant Summary collapse
- GATEWAY_LIVE_HOST =
'gw-16.rocketgate.com'- GATEWAY_TEST_HOST =
'dev-gw.rocketgate.com'- GATEWAY_PORT =
443- GATEWAY_SERVLET =
'/gateway/servlet/ServiceDispatcherAccess'- GATEWAY_VERSION =
'R1.2'- DEFAULT_TIMEOUT =
10- DEFAULT_CURRENCY =
'USD'- USER_AGENT_STRING =
"rocketgate-ruby/#{RocketGate::VERSION}"
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#merchant_id ⇒ Object
Returns the value of attribute merchant_id.
-
#merchant_password ⇒ Object
Returns the value of attribute merchant_password.
-
#request_host ⇒ Object
Returns the value of attribute request_host.
-
#request_path ⇒ Object
Returns the value of attribute request_path.
-
#request_port ⇒ Object
Returns the value of attribute request_port.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
-
#request_version ⇒ Object
Returns the value of attribute request_version.
-
#require_avs ⇒ Object
Returns the value of attribute require_avs.
-
#require_cvv ⇒ Object
Returns the value of attribute require_cvv.
-
#require_scrub ⇒ Object
Returns the value of attribute require_scrub.
-
#require_ssl ⇒ Object
Returns the value of attribute require_ssl.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #testing! ⇒ Object
Methods included from Validatable
included, #invalid_attributes, #valid?, #validate!
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/rocketgate/configuration.rb', line 31 def initialize @currency = DEFAULT_CURRENCY @request_host = GATEWAY_LIVE_HOST @request_path = GATEWAY_SERVLET @request_port = GATEWAY_PORT @request_timeout = DEFAULT_TIMEOUT @request_version = GATEWAY_VERSION @require_avs = true @require_cvv = true @require_scrub = true @require_ssl = true end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def currency @currency end |
#merchant_id ⇒ Object
Returns the value of attribute merchant_id.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def merchant_id @merchant_id end |
#merchant_password ⇒ Object
Returns the value of attribute merchant_password.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def merchant_password @merchant_password end |
#request_host ⇒ Object
Returns the value of attribute request_host.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def request_host @request_host end |
#request_path ⇒ Object
Returns the value of attribute request_path.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def request_path @request_path end |
#request_port ⇒ Object
Returns the value of attribute request_port.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def request_port @request_port end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def request_timeout @request_timeout end |
#request_version ⇒ Object
Returns the value of attribute request_version.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def request_version @request_version end |
#require_avs ⇒ Object
Returns the value of attribute require_avs.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def require_avs @require_avs end |
#require_cvv ⇒ Object
Returns the value of attribute require_cvv.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def require_cvv @require_cvv end |
#require_scrub ⇒ Object
Returns the value of attribute require_scrub.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def require_scrub @require_scrub end |
#require_ssl ⇒ Object
Returns the value of attribute require_ssl.
5 6 7 |
# File 'lib/rocketgate/configuration.rb', line 5 def require_ssl @require_ssl end |
Instance Method Details
#testing! ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/rocketgate/configuration.rb', line 44 def testing! @request_host = GATEWAY_TEST_HOST @request_port = GATEWAY_PORT @merchant_id = '1' @merchant_password = 'testpassword' self end |