stp_client 0.4.2 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -10
- data/lib/stp/structs/account.rb +12 -9
- data/lib/stp/version.rb +1 -1
- data/spec/stp/account_delete_spec.rb +3 -3
- data/stp_client.gemspec +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19454b246bdaa5b1ae1d0500db52a7dc175eca4325322fb8e96e88a89905d4ee
|
4
|
+
data.tar.gz: 271cc11dfe402344da55196eeea7e6ba65e2fab0511d94fca7edd2133cd1837c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 175549e97a9b69f1ab2923966d3bdd697533604553a7c7ebebc75830c8d4b0e2e84718eb32d8c6f9e98417d575ff26526a151d5521c7ed496a5bbe908edbd54e
|
7
|
+
data.tar.gz: 64a9a6cb5d5b5023b1c3bffff9f1e60f960886074fc1b5c36c1c3154560d0a992fe53e3fa08bc5d07393d9e236996a070a4400a772c15cf60fbb7507a88704de
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stp_client (0.4.
|
4
|
+
stp_client (0.4.3)
|
5
5
|
crypto_yellowme (~> 0.4)
|
6
6
|
faraday (~> 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (5.2.4.
|
12
|
-
activesupport (= 5.2.4.
|
13
|
-
activesupport (5.2.4.
|
11
|
+
activemodel (5.2.4.3)
|
12
|
+
activesupport (= 5.2.4.3)
|
13
|
+
activesupport (5.2.4.3)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 0.7, < 2)
|
16
16
|
minitest (~> 5.1)
|
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
addressable (2.7.0)
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
20
20
|
bcrypt (3.1.13)
|
21
|
-
concurrent-ruby (1.1.
|
21
|
+
concurrent-ruby (1.1.6)
|
22
22
|
crack (0.4.3)
|
23
23
|
safe_yaml (~> 1.0.0)
|
24
24
|
crypto_yellowme (0.4.0)
|
@@ -29,13 +29,13 @@ GEM
|
|
29
29
|
docile (1.3.2)
|
30
30
|
faker (2.10.0)
|
31
31
|
i18n (>= 1.6, < 1.8)
|
32
|
-
faraday (1.0.
|
32
|
+
faraday (1.0.1)
|
33
33
|
multipart-post (>= 1.2, < 3)
|
34
34
|
hashdiff (1.0.1)
|
35
|
-
i18n (1.7.
|
35
|
+
i18n (1.7.1)
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
37
|
json (2.3.0)
|
38
|
-
minitest (5.14.
|
38
|
+
minitest (5.14.1)
|
39
39
|
multipart-post (2.1.1)
|
40
40
|
public_suffix (4.0.3)
|
41
41
|
rspec (3.9.0)
|
@@ -58,7 +58,7 @@ GEM
|
|
58
58
|
simplecov-html (~> 0.10.0)
|
59
59
|
simplecov-html (0.10.2)
|
60
60
|
thread_safe (0.3.6)
|
61
|
-
tzinfo (1.2.
|
61
|
+
tzinfo (1.2.7)
|
62
62
|
thread_safe (~> 0.1)
|
63
63
|
webmock (3.4.2)
|
64
64
|
addressable (>= 2.3.6)
|
@@ -76,4 +76,4 @@ DEPENDENCIES
|
|
76
76
|
webmock (~> 3.4.2)
|
77
77
|
|
78
78
|
BUNDLED WITH
|
79
|
-
2.
|
79
|
+
2.1.2
|
data/lib/stp/structs/account.rb
CHANGED
@@ -16,8 +16,8 @@ module STP
|
|
16
16
|
:interior_number, # numeroInterior
|
17
17
|
:neighborhood, # colonia
|
18
18
|
:municipality, # alcaldiaMunicipio
|
19
|
-
:zip_code, #
|
20
|
-
:country, #
|
19
|
+
:zip_code, # codigoPostal
|
20
|
+
:country, # paisNacimiento
|
21
21
|
:email, # email
|
22
22
|
:identification_id, # idIdentificacion: credencial para votar (INE/IFE)
|
23
23
|
:phone, # telefono
|
@@ -34,24 +34,27 @@ module STP
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def as_json(_options = {})
|
37
|
+
name = @name.present? ? I18n.transliterate(@name) : nil
|
38
|
+
paternal_surname = @paternal_surname.present? ? I18n.transliterate(@paternal_surname) : nil
|
39
|
+
maternal_surname = @maternal_surname.present? ? I18n.transliterate(@maternal_surname) : nil
|
37
40
|
{
|
38
41
|
cuenta: @account,
|
39
42
|
empresa: @company,
|
40
|
-
nombre:
|
41
|
-
apellidoPaterno:
|
42
|
-
apellidoMaterno:
|
43
|
+
nombre: name,
|
44
|
+
apellidoPaterno: paternal_surname,
|
45
|
+
apellidoMaterno: maternal_surname,
|
43
46
|
rfcCurp: @rfc,
|
44
47
|
fechaNacimiento: @birthdate,
|
45
48
|
genero: @sex,
|
46
49
|
entidadFederativa: @state,
|
47
50
|
actividadEconomica: @economic_activity,
|
48
51
|
calle: @street,
|
49
|
-
|
50
|
-
|
52
|
+
numExterior: @exterior_number,
|
53
|
+
numInterior: @interior_number,
|
51
54
|
colonia: @neighborhood,
|
52
55
|
alcaldiaMunicipio: @municipality,
|
53
|
-
|
54
|
-
|
56
|
+
codigoPostal: @zip_code,
|
57
|
+
paisNacimiento: @country,
|
55
58
|
email: @email,
|
56
59
|
idIdentificacion: @identification_id,
|
57
60
|
telefono: @phone,
|
data/lib/stp/version.rb
CHANGED
@@ -41,7 +41,7 @@ RSpec.describe STP::Account do
|
|
41
41
|
allow(STP::Account).to receive(:create).
|
42
42
|
and_return(STPTestHelpers::ACCOUNT_DELETE_MOCK_SUCCESS())
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
before do
|
46
46
|
stub_request(:delete, "#{STP.api_uri}/cuentaModule/fisica").to_return(
|
47
47
|
body: JSON.dump(STPTestHelpers::ACCOUNT_DELETE_MOCK_SUCCESS()), status: 200
|
@@ -59,7 +59,7 @@ RSpec.describe STP::Account do
|
|
59
59
|
account.rfc = 'RFCURP'
|
60
60
|
account
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
before do
|
64
64
|
stub_request(:delete, "#{STP.api_uri}/cuentaModule/fisica").to_return(
|
65
65
|
body: JSON.dump(STPTestHelpers::ACCOUNT_DELETE_MOCK_SUCCESS()), status: 200
|
@@ -95,7 +95,7 @@ RSpec.describe STP::Account do
|
|
95
95
|
account.phone = Faker::PhoneNumber.phone_number
|
96
96
|
account
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
before do
|
100
100
|
stub_request(:delete, "#{STP.api_uri}/cuentaModule/fisica").to_return(
|
101
101
|
body: JSON.dump(STPTestHelpers::ACCOUNT_DELETE_MOCK_ERROR(-2)), status: 200
|
data/stp_client.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.license = 'MIT'
|
20
20
|
|
21
21
|
spec.add_dependency "faraday", "~> 1.0"
|
22
|
-
spec.add_dependency "crypto_yellowme", "
|
22
|
+
spec.add_dependency "crypto_yellowme", ">= 0.4"
|
23
23
|
|
24
24
|
spec.add_development_dependency "rspec", "~> 3.8"
|
25
25
|
spec.add_development_dependency "faker", "~> 2.0"
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yellowme
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-12-10 00:00:00.000000000 Z
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: crypto_yellowme
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -127,7 +127,7 @@ homepage: https://github.com/yellowme/stp-client
|
|
127
127
|
licenses:
|
128
128
|
- MIT
|
129
129
|
metadata: {}
|
130
|
-
post_install_message:
|
130
|
+
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
133
133
|
- lib
|
@@ -142,9 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
|
146
|
-
|
147
|
-
signing_key:
|
145
|
+
rubygems_version: 3.1.2
|
146
|
+
signing_key:
|
148
147
|
specification_version: 4
|
149
148
|
summary: STP Client is a ruby integration to STP services
|
150
149
|
test_files:
|