Module: VaultedBilling
- Defined in:
- lib/vaulted_billing.rb,
lib/vaulted_billing/http.rb,
lib/vaulted_billing/errors.rb,
lib/vaulted_billing/gateway.rb,
lib/vaulted_billing/version.rb,
lib/vaulted_billing/customer.rb,
lib/vaulted_billing/gateways.rb,
lib/vaulted_billing/credit_card.rb,
lib/vaulted_billing/transaction.rb,
lib/vaulted_billing/configuration.rb,
lib/vaulted_billing/core_ext/hash.rb,
lib/vaulted_billing/chainable_hash.rb,
lib/vaulted_billing/gateways/bogus.rb,
lib/vaulted_billing/gateways/ipcommerce.rb,
lib/vaulted_billing/gateways/bogus/failure.rb,
lib/vaulted_billing/gateways/authorize_net_cim.rb,
lib/vaulted_billing/gateways/nmi_customer_vault.rb
Defined Under Namespace
Modules: CoreExt, Gateway, Gateways Classes: ChainableHash, Configuration, CreditCard, Customer, HTTP, Transaction
Constant Summary collapse
- Error =
Class.new(RuntimeError)
- CredentialError =
Class.new(Error)
- Version =
'1.4.0'
Class Method Summary collapse
-
.config ⇒ Object
Returns the VaultedBilling::Configuration.
-
.gateway(name) ⇒ Object
Return the matching gateway for the name provided.
- .logger ⇒ Object
- .logger=(input) ⇒ Object
- .logger? ⇒ Boolean
-
.set_config(options = {}) ⇒ Object
A helper method to allow you to set the configuration en mass via a properly formatted Hash of options:.
Class Method Details
.config ⇒ Object
Returns the VaultedBilling::Configuration. This is primarily used to modify the default settings used when new gateways are instantiated.
44 45 46 |
# File 'lib/vaulted_billing.rb', line 44 def self.config @@config ||= VaultedBilling::Configuration.new end |
.gateway(name) ⇒ Object
Return the matching gateway for the name provided.
:bogus
-
Bogus - always successful, does nothing.
:nmi_customer_vault
-
NmiCustomerVault
:authorize_net_cim
-
AuthorizeNetCim
36 37 38 |
# File 'lib/vaulted_billing.rb', line 36 def self.gateway(name) Gateways.const_get(name.to_s.camelize) end |
.logger ⇒ Object
65 |
# File 'lib/vaulted_billing.rb', line 65 def self.logger; config.logger; end |
.logger=(input) ⇒ Object
66 |
# File 'lib/vaulted_billing.rb', line 66 def self.logger=(input); config.logger = input; end |
.logger? ⇒ Boolean
67 |
# File 'lib/vaulted_billing.rb', line 67 def self.logger?; config.logger?; end |
.set_config(options = {}) ⇒ Object
A helper method to allow you to set the configuration en mass via a properly formatted Hash of options:
VaultedBilling.set_config({
:test_mode => false,
:authorize_net_cim => {
:username => 'APIName',
:password => 'APIPassword',
:test_mode => false,
:nmi_customer_vault => { ... }
})
61 62 63 |
# File 'lib/vaulted_billing.rb', line 61 def self.set_config( = {}) @@config = VaultedBilling::Configuration.new() end |