Module: Culqi
- Defined in:
- lib/culqi.rb,
lib/culqi/sale.rb,
lib/culqi/client.rb,
lib/culqi/version.rb,
lib/culqi/encryptor.rb
Defined Under Namespace
Classes: Client, Encryptor, Sale
Constant Summary collapse
- VERSION =
'1.2.8'
Class Method Summary collapse
Class Method Details
.default_client ⇒ Object
6 7 8 9 10 11 |
# File 'lib/culqi.rb', line 6 def self.default_client variables = %w{CULQI_KEY CULQI_ENDPOINT CULQI_CODIGO_COMERCIO} missing = variables - ENV.keys raise "The following env vars are missing and are needed to use this gem: #{missing.join(', ')}." unless missing.empty? Client.new(ENV['CULQI_KEY'], ENV['CULQI_ENDPOINT'], ENV['CULQI_CODIGO_COMERCIO']) end |