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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d038cf175ba0451c3794a3e9366b08bae93a79907ae300adfad17fef6242f2c
4
- data.tar.gz: 5292c787fc71ddde9f25ed363ba137f3b00c1f08c12d8b13049fc843122f01c6
3
+ metadata.gz: 19454b246bdaa5b1ae1d0500db52a7dc175eca4325322fb8e96e88a89905d4ee
4
+ data.tar.gz: 271cc11dfe402344da55196eeea7e6ba65e2fab0511d94fca7edd2133cd1837c
5
5
  SHA512:
6
- metadata.gz: 56f485f62374ea5b55b532171ac6b9845dd506d090cde1551a8d868fa4e42439d32166f642bbb516140c383abfe0418f0b1f3b1597ebb86ecdd713b0d2cdde06
7
- data.tar.gz: 5876264f99ae9a1374fe5fd03043a23eb5c6f4eadaafe215e8f0341d2bc1f2c0130b0ff409933f781b020fae1eb2cb484a8726e9fa953bcf9c7db3f058f70044
6
+ metadata.gz: 175549e97a9b69f1ab2923966d3bdd697533604553a7c7ebebc75830c8d4b0e2e84718eb32d8c6f9e98417d575ff26526a151d5521c7ed496a5bbe908edbd54e
7
+ data.tar.gz: 64a9a6cb5d5b5023b1c3bffff9f1e60f960886074fc1b5c36c1c3154560d0a992fe53e3fa08bc5d07393d9e236996a070a4400a772c15cf60fbb7507a88704de
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stp_client (0.4.2)
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.1)
12
- activesupport (= 5.2.4.1)
13
- activesupport (5.2.4.1)
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.5)
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.0)
32
+ faraday (1.0.1)
33
33
  multipart-post (>= 1.2, < 3)
34
34
  hashdiff (1.0.1)
35
- i18n (1.7.0)
35
+ i18n (1.7.1)
36
36
  concurrent-ruby (~> 1.0)
37
37
  json (2.3.0)
38
- minitest (5.14.0)
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.6)
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.0.2
79
+ 2.1.2
@@ -16,8 +16,8 @@ module STP
16
16
  :interior_number, # numeroInterior
17
17
  :neighborhood, # colonia
18
18
  :municipality, # alcaldiaMunicipio
19
- :zip_code, # cp
20
- :country, # pais
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: @name,
41
- apellidoPaterno: @paternal_surname,
42
- apellidoMaterno: @maternal_surname,
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
- numeroExterior: @exterior_number,
50
- numeroInterior: @interior_number,
52
+ numExterior: @exterior_number,
53
+ numInterior: @interior_number,
51
54
  colonia: @neighborhood,
52
55
  alcaldiaMunicipio: @municipality,
53
- cp: @zip_code,
54
- pais: @country,
56
+ codigoPostal: @zip_code,
57
+ paisNacimiento: @country,
55
58
  email: @email,
56
59
  idIdentificacion: @identification_id,
57
60
  telefono: @phone,
@@ -1,3 +1,3 @@
1
1
  module STP
2
- VERSION = '0.4.2'
2
+ VERSION = '0.5.1'
3
3
  end
@@ -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
@@ -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", "~> 0.4"
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.2
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
- rubyforge_project:
146
- rubygems_version: 2.7.6
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: