Class: Locaweb::Gateway::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/locaweb-gateway/config.rb

Class Method Summary collapse

Class Method Details

.base_uriObject

Returns the base endpoint for the Locaweb Payment Gateway.



23
24
25
26
27
28
29
# File 'lib/locaweb-gateway/config.rb', line 23

def self.base_uri
  if environment.equal?(:production)
    'https://api.gatewaylocaweb.com.br/v1/transacao'
  else
    'https://api-sandbox.gatewaylocaweb.com.br/v1/transacao'
  end
end

.configure(&block) ⇒ Object



31
32
33
# File 'lib/locaweb-gateway/config.rb', line 31

def self.configure(&block)
  block.call(self)
end