stp_client 0.4.3 → 0.4.4

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: 261c9f866c7ceb1621dcfd05ebc51a2a23fa73f816c30089b34745a1e8f16458
4
- data.tar.gz: 897297e8713a5a081dc11d6a0642dd86299e09256d551217e426b514fee95e17
3
+ metadata.gz: 4013736c66bd4b1905fdc7393826500b44bd0c14d0e84be0ff4279185a24d993
4
+ data.tar.gz: 404bf60f4fc4b46329715d7688f0d6477f0dc05b2935102cd52f0fa18e87737d
5
5
  SHA512:
6
- metadata.gz: b269d1b5c55ca547639b53ff7a2f3b11a6e99900ed87f794e7143702f8934a84337577b975ed94674794a0d3e0b3e85174ff4993f2520ac80528b486dda9421a
7
- data.tar.gz: f49256bcb78005b6c0debe661eae877f77bb5dc9070cebcfa1f70701de40a7f0c77920f423373b36326b50495b196353155451f0912086e971e0157f9e115efc
6
+ metadata.gz: f20436a5e1744208f2d215f12842b840f7c998c87020f671997e705c3e95d59abb1e6e02cf5df3db75320eaf613d26d65b5d0af0f7aa47a58385bef8b41fdf1e
7
+ data.tar.gz: 5d0eabdea19253004e4cdd1b6d82d791fd30b5b61f4eebb162ab94125bf07a1e337aa6b19e5b49dcad1bc8c5c8dac860729534275c884a166b73ee4fe75ba60d
@@ -1,7 +1,7 @@
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
 
@@ -29,7 +29,7 @@ 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
35
  i18n (1.7.1)
@@ -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
@@ -34,12 +34,15 @@ 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: I18n.transliterate(@name),
41
- apellidoPaterno: I18n.transliterate(@paternal_surname),
42
- apellidoMaterno: I18n.transliterate(@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,
@@ -1,3 +1,3 @@
1
1
  module STP
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yellowme