stp_client 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Gemfile.lock +3 -3
 - data/lib/stp/structs/account.rb +6 -3
 - data/lib/stp/version.rb +1 -1
 - data/spec/stp/account_delete_spec.rb +3 -3
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 4013736c66bd4b1905fdc7393826500b44bd0c14d0e84be0ff4279185a24d993
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 404bf60f4fc4b46329715d7688f0d6477f0dc05b2935102cd52f0fa18e87737d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f20436a5e1744208f2d215f12842b840f7c998c87020f671997e705c3e95d59abb1e6e02cf5df3db75320eaf613d26d65b5d0af0f7aa47a58385bef8b41fdf1e
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5d0eabdea19253004e4cdd1b6d82d791fd30b5b61f4eebb162ab94125bf07a1e337aa6b19e5b49dcad1bc8c5c8dac860729534275c884a166b73ee4fe75ba60d
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       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 
     | 
    
         | 
| 
         @@ -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. 
     | 
| 
      
 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. 
     | 
| 
      
 79 
     | 
    
         
            +
               2.1.2
         
     | 
    
        data/lib/stp/structs/account.rb
    CHANGED
    
    | 
         @@ -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:  
     | 
| 
       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,
         
     | 
    
        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
         
     |