Module: CuentaDigital

Defined in:
lib/cuenta_digital.rb,
lib/cuenta_digital/coupon.rb,
lib/cuenta_digital/payment.rb,
lib/cuenta_digital/version.rb,
lib/cuenta_digital/webhook.rb,
lib/cuenta_digital/response.rb,
lib/cuenta_digital/exception.rb

Defined Under Namespace

Modules: Exception Classes: Coupon, Error, Payment, Response, Webhook

Constant Summary collapse

VALID_EMAIL_REGEX =
/\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i
CURRENCIES =
{ ars: 'ARS',
clp: 'CLP',
rbl: 'RBL',
mxn: 'MXN',
usd: 'USD',
eur: 'EUR' }.freeze
URL =
'https://www.cuentadigital.com'
CUOPON_GENERATION_URL =
[URL, 'api.php'].join('/').freeze
URL_EXP_SANDBOX =
[URL, 'exportacionsandbox.php'].join('/').freeze
URL_EXP_PRODUCTION =
[URL, 'exportacion.php'].join('/').freeze
VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.sandbox_uri_payment_exportObject



37
38
39
# File 'lib/cuenta_digital.rb', line 37

def self.sandbox_uri_payment_export
  URI.parse(URL_EXP_SANDBOX)
end

.uri_coupon_generationObject



33
34
35
# File 'lib/cuenta_digital.rb', line 33

def self.uri_coupon_generation
  URI.parse(CUOPON_GENERATION_URL)
end

.uri_payment_exportObject



41
42
43
# File 'lib/cuenta_digital.rb', line 41

def self.uri_payment_export
  URI.parse(URL_EXP_PRODUCTION)
end