conekta 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/conekta/customer.rb +4 -0
- data/lib/conekta/payment_source.rb +1 -1
- data/lib/conekta/version.rb +1 -1
- data/spec/conekta/2.0.0/customer_spec.rb +30 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd1316f1bb6e5b655a00ee5c423de21178e78726
|
4
|
+
data.tar.gz: dc74ba4217ff50ec6575e0026b45778075cf4787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be37d7ac5edd79a63e5be7ad22f4f9e8ec335117025afb60d2b6bc69373d4504ac483ae51e771e9c275563c430e2dffe2c634670aea14f761215c328c322822
|
7
|
+
data.tar.gz: b12487e0b39f5011657481402dd87b1302467d84d4c4b7ab464455524f621bef6c0a6ba0dff386820ab6a72f6a2cf421e82ce4f302555386c837964166f06b5e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [2.4.0](https://github.com/conekta/conekta-ruby/releases/tag/2.4.0) - 2017-10-05
|
2
|
+
### Added oxxo recurrent support
|
3
|
+
- Added new method create_offline_recurrent_reference.
|
4
|
+
|
1
5
|
## [2.3.0](https://github.com/conekta/conekta-ruby/releases/tag/2.3.0) - 2017-10-05
|
2
6
|
### Fix
|
3
7
|
- Capture allow pass amount in api v1
|
data/README.md
CHANGED
data/lib/conekta/customer.rb
CHANGED
@@ -57,6 +57,10 @@ module Conekta
|
|
57
57
|
self.create_member_with_relation('payment_sources', params, self)
|
58
58
|
end
|
59
59
|
|
60
|
+
def create_offline_recurrent_reference(params)
|
61
|
+
self.create_member_with_relation('payment_sources', params, self)
|
62
|
+
end
|
63
|
+
|
60
64
|
def create_subscription(params)
|
61
65
|
self.create_member('subscription', params)
|
62
66
|
end
|
data/lib/conekta/version.rb
CHANGED
@@ -8,6 +8,24 @@ describe Conekta::Customer do
|
|
8
8
|
|
9
9
|
let(:customer) { Conekta::Customer.create(customer_data) }
|
10
10
|
|
11
|
+
let(:customer_oxxo) {
|
12
|
+
{
|
13
|
+
payment_sources: [{
|
14
|
+
type: 'oxxo_recurrent',
|
15
|
+
expires_at: 157_559_040_0
|
16
|
+
}],
|
17
|
+
email: 'test@gmail.com',
|
18
|
+
name: 'Mario'
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
let(:oxxo_source_params) do
|
23
|
+
{
|
24
|
+
type: 'oxxo_recurrent',
|
25
|
+
expires_at: 157_559_040_0
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
11
29
|
let(:source_params) do
|
12
30
|
{
|
13
31
|
type: "card",
|
@@ -31,10 +49,20 @@ describe Conekta::Customer do
|
|
31
49
|
end
|
32
50
|
|
33
51
|
it "successfully creates source for customer" do
|
34
|
-
|
52
|
+
customer = Conekta::Customer.create(customer_oxxo)
|
53
|
+
source = customer.payment_sources.first
|
54
|
+
|
55
|
+
expect(source.class.to_s).to eq('Conekta::PaymentSource')
|
56
|
+
expect(customer.payment_sources.class.to_s).to eq('Conekta::List')
|
57
|
+
expect(source.reference.size).to eq(14)
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'successfully creates oxxo recurrent reference for customer' do
|
61
|
+
source = customer.create_offline_recurrent_reference(oxxo_source_params)
|
35
62
|
|
36
63
|
expect(source.class.to_s).to eq("Conekta::PaymentSource")
|
37
64
|
expect(customer.payment_sources.class.to_s).to eq("Conekta::List")
|
65
|
+
expect(source.reference.size).to eq(14)
|
38
66
|
end
|
39
67
|
|
40
68
|
it "successfully creates shipping contact for customer" do
|
@@ -46,4 +74,4 @@ describe Conekta::Customer do
|
|
46
74
|
end
|
47
75
|
end
|
48
76
|
end
|
49
|
-
end
|
77
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conekta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MauricioMurga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|