cuenta_digital 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/cuenta_digital/coupon.rb +4 -0
- data/lib/cuenta_digital/payment.rb +13 -1
- data/lib/cuenta_digital/response.rb +4 -0
- data/lib/cuenta_digital/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a78d3f37c6b04c0bd37b008da468dc87076cc1adf8ffb24e83c5722ccd2533
|
4
|
+
data.tar.gz: 4aa62b7837bf4445e3fdf8d317060fd92948ee35d3341ecb5eafdc11f5e543fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c350334de734c6556b7eeaff36924f144599c94bb47aa5a8ea37c2809c0007b173e1b80268bbc20ae7cf2b85f56d102edc1ed53d9575b210544484be98758e4d
|
7
|
+
data.tar.gz: fb65094d6e8f5ea9276d571a9e1099dd3a0119cce22289ef0e640f9e3167da761d2edceee5f47a5106e931fe0c9addb39045d57539c847b405add72b4cbc426a
|
data/README.md
CHANGED
@@ -45,7 +45,8 @@ Or install it yourself as:
|
|
45
45
|
#### Example
|
46
46
|
|
47
47
|
```ruby
|
48
|
-
coupon = CuentaDigital::Coupon.new(id: '
|
48
|
+
coupon = CuentaDigital::Coupon.new(id: '643233
|
49
|
+
',
|
49
50
|
price: 15.00,
|
50
51
|
first_due_date: 10,
|
51
52
|
site: 'Zorchalandia',
|
@@ -128,6 +129,7 @@ This method return `CuentaDigital::Response` object
|
|
128
129
|
- **checksum**
|
129
130
|
- **operation_event_number**
|
130
131
|
- **bar_code**
|
132
|
+
- **csv_line**
|
131
133
|
|
132
134
|
#### Methods
|
133
135
|
|
@@ -16,7 +16,8 @@ module CuentaDigital
|
|
16
16
|
:payment_number,
|
17
17
|
:checksum,
|
18
18
|
:operation_event_number,
|
19
|
-
:bar_code
|
19
|
+
:bar_code,
|
20
|
+
:csv_line
|
20
21
|
|
21
22
|
def initialize(params = {})
|
22
23
|
@operation_id = params[:operation_id]
|
@@ -30,6 +31,15 @@ module CuentaDigital
|
|
30
31
|
@payment_number = params[:payment_number]
|
31
32
|
@checksum = params[:checksum]
|
32
33
|
@bar_code = params[:bar_code]
|
34
|
+
@csv_line = params[:csv_line]
|
35
|
+
end
|
36
|
+
|
37
|
+
def credit?
|
38
|
+
@operation_kind == 1
|
39
|
+
end
|
40
|
+
|
41
|
+
def debit?
|
42
|
+
@operation_kind == 0
|
33
43
|
end
|
34
44
|
|
35
45
|
# Linea de operaciones:
|
@@ -44,6 +54,7 @@ module CuentaDigital
|
|
44
54
|
args = result.split(',')
|
45
55
|
|
46
56
|
params = {
|
57
|
+
csv_line: result,
|
47
58
|
operation_kind: args[0],
|
48
59
|
payment_date: Time.parse(
|
49
60
|
[
|
@@ -130,6 +141,7 @@ module CuentaDigital
|
|
130
141
|
args = result.split('|')
|
131
142
|
|
132
143
|
params = {
|
144
|
+
csv_line: result,
|
133
145
|
operation_kind: 1, # Credit
|
134
146
|
payment_date: Time.parse(
|
135
147
|
[
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuenta_digital
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ga6ix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|