Class: VaultedBilling::Configuration::GatewayConfiguration
- Inherits:
-
Object
- Object
- VaultedBilling::Configuration::GatewayConfiguration
- Defined in:
- lib/vaulted_billing/configuration.rb
Overview
This class holds default configuration options for a specific gateway in the library.
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#raw_options ⇒ Object
Returns the value of attribute raw_options.
-
#test_mode ⇒ Object
Returns the value of attribute test_mode.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ GatewayConfiguration
constructor
Possible options are:.
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ GatewayConfiguration
Possible options are:
-
password - The default password for the gateway.
-
test_mode - A boolean indicating whether or not to use the test mode of the gateway (sandbox server, test API, etc.)
-
username - The default username for the gateway.
Unless otherwise defined, test_mode will default to being true.
26 27 28 29 30 31 32 33 34 |
# File 'lib/vaulted_billing/configuration.rb', line 26 def initialize( = {}, &block) = .with_indifferent_access self.username = [:username] self.password = [:password] self. = [:raw_options] self.test_mode = .has_key?(:test_mode) ? [:test_mode] : true yield(self) if block_given? end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
15 16 17 |
# File 'lib/vaulted_billing/configuration.rb', line 15 def password @password end |
#raw_options ⇒ Object
Returns the value of attribute raw_options.
15 16 17 |
# File 'lib/vaulted_billing/configuration.rb', line 15 def @raw_options end |
#test_mode ⇒ Object
Returns the value of attribute test_mode.
15 16 17 |
# File 'lib/vaulted_billing/configuration.rb', line 15 def test_mode @test_mode end |
#username ⇒ Object
Returns the value of attribute username.
15 16 17 |
# File 'lib/vaulted_billing/configuration.rb', line 15 def username @username end |