Class: Superpay::Configuracao
- Inherits:
-
Object
- Object
- Superpay::Configuracao
- Defined in:
- lib/superpay/configuracao.rb
Instance Attribute Summary collapse
-
#ambiente ⇒ Object
Returns the value of attribute ambiente.
-
#estabelecimento ⇒ Object
Returns the value of attribute estabelecimento.
-
#senha ⇒ Object
Returns the value of attribute senha.
-
#usuario ⇒ Object
Returns the value of attribute usuario.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#ambiente ⇒ Object
Returns the value of attribute ambiente.
6 7 8 |
# File 'lib/superpay/configuracao.rb', line 6 def ambiente @ambiente end |
#estabelecimento ⇒ Object
Returns the value of attribute estabelecimento.
6 7 8 |
# File 'lib/superpay/configuracao.rb', line 6 def estabelecimento @estabelecimento end |
#senha ⇒ Object
Returns the value of attribute senha.
6 7 8 |
# File 'lib/superpay/configuracao.rb', line 6 def senha @senha end |
#usuario ⇒ Object
Returns the value of attribute usuario.
6 7 8 |
# File 'lib/superpay/configuracao.rb', line 6 def usuario @usuario end |
Class Method Details
.instance ⇒ Object
8 9 10 |
# File 'lib/superpay/configuracao.rb', line 8 def self.instance @__instance__ ||= new end |
Instance Method Details
#ambiente_producao? ⇒ Boolean
24 25 26 27 |
# File 'lib/superpay/configuracao.rb', line 24 def ambiente_producao? return (ambiente.to_sym == :producao) if !ambiente.blank? return true end |
#ambiente_teste? ⇒ Boolean
20 21 22 |
# File 'lib/superpay/configuracao.rb', line 20 def ambiente_teste? !ambiente_producao? end |
#url ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/superpay/configuracao.rb', line 12 def url if ambiente_producao? return 'https://superpay2.superpay.com.br/checkout/servicosPagamentoCompletoWS.Services?wsdl' else return 'http://homologacao2.superpay.com.br/checkout/servicosPagamentoCompletoWS.Services?wsdl' end end |