Class: WorldpayCnp::Configuration
- Inherits:
-
Object
- Object
- WorldpayCnp::Configuration
- Defined in:
- lib/worldpay_cnp/configuration.rb
Constant Summary collapse
- ENVIRONMENTS =
{ sandbox: "https://www.testvantivcnp.com/sandbox/communicator/online", prelive: "https://payments.vantivprelive.com/vap/communicator/online", production: "https://payments.vantivcnp.com/vap/communicator/online" }.freeze
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#merchant_id ⇒ Object
readonly
Returns the value of attribute merchant_id.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#xml_namespace ⇒ Object
readonly
Returns the value of attribute xml_namespace.
-
#xml_request_root ⇒ Object
readonly
Returns the value of attribute xml_request_root.
Instance Method Summary collapse
- #api_url ⇒ Object
-
#initialize(**options) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(**options) ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 |
# File 'lib/worldpay_cnp/configuration.rb', line 19 def initialize(**) set_defaults set_config() end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def environment @environment end |
#merchant_id ⇒ Object (readonly)
Returns the value of attribute merchant_id.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def merchant_id @merchant_id end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def password @password end |
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def proxy @proxy end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def timeout @timeout end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def username @username end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def version @version end |
#xml_namespace ⇒ Object (readonly)
Returns the value of attribute xml_namespace.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def xml_namespace @xml_namespace end |
#xml_request_root ⇒ Object (readonly)
Returns the value of attribute xml_request_root.
9 10 11 |
# File 'lib/worldpay_cnp/configuration.rb', line 9 def xml_request_root @xml_request_root end |
Instance Method Details
#api_url ⇒ Object
24 25 26 |
# File 'lib/worldpay_cnp/configuration.rb', line 24 def api_url @api_url ||= ENVIRONMENTS[@environment.to_sym] end |