padron 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a33b6376e2836385a8f8d1f34f2fc94a6aa2b61f7e756052a29c11d05706df18
4
- data.tar.gz: 7ce199a4470a7f0779eae8c051ab47e76320e2c494f23a98fb769c9d1cdb50c1
3
+ metadata.gz: 39032c8e50bf14881b44a7392299024986251bad01234ea068c594cdc2f21633
4
+ data.tar.gz: 0704c2886a4769dba6833f70a5728049a2bd39bba9f354a63a0744f6bde94b8c
5
5
  SHA512:
6
- metadata.gz: ccc80e008903562e8bb8321afbe274887f3bfd0a90a858e76ada9ad3785b85ffb36c646486d5c62a52bda588e7ccf87bf4b727264471f427e4e1e88a305cacd2
7
- data.tar.gz: c361357577861da3dae7b22c236f28ea490f7132d9e466c656b3ab2b6ea2a3f35e6a02234dc198c38e57837fb5e1945203c6eef0ab97fdeccc3137981a4fc299
6
+ metadata.gz: 209e219faf9f91c5a4b2d2ecf8cdd3f7effdc0c3266d107e84e67d4a73fd5c8a8ba7c14cba2379c640132d8ca9fc7453da7d35f70774f466f06da141b1e85ff3
7
+ data.tar.gz: '05536124996b51b5d90ad1a232d9bc2ca6467834556fd5324050cc1e25e20d76d4b6e696ab4d66c68c2c259d0df9ccca538bcfe433998456d08bb286eb02e0fc'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- padron (0.1.3)
4
+ padron (0.1.5)
5
5
  httpi (= 2.3)
6
6
  nokogiri (~> 1.10.4)
7
7
  savon (~> 2.12)
data/lib/padron/call.rb CHANGED
@@ -65,18 +65,18 @@ module Padron
65
65
  def set_data
66
66
  personas = data.body[:get_persona_list_response][:persona_list_return][:persona]
67
67
  personas.map do |persona|
68
- unless persona[:error_constancia] && persona[:error_constancia].try(:[],:apellido).nil?
69
- if !persona[:error_constancia].nil?
68
+ unless persona[0] == :error_constancia && persona.try(:[],:apellido).nil?
69
+ if !persona[1].nil? && persona[0] == :error_constancia
70
70
  {:name => set_name(persona[:error_constancia]),
71
71
  :cuit => persona[:error_constancia][:id_persona]}
72
72
  else
73
- {:name => set_name(persona[:datos_generales]),
74
- :cuit => persona[:datos_generales][:id_persona],
75
- :cp => persona[:datos_generales].try(:[], :domicilio_fiscal).try(:[], :cod_postal),
76
- :address => persona[:datos_generales].try(:[], :domicilio_fiscal).try(:[], :direccion),
77
- :city_id => persona[:datos_generales].try(:[], :domicilio_fiscal).try(:[], :id_provincia),
78
- :city => Padron::PROVINCIAS[persona[:datos_generales].try(:[],:domicilio_fiscal).try(:[], :id_provincia)],
79
- :locality => persona[:datos_generales].try(:[], :domicilio_fiscal).try(:[], :localidad)}
73
+ {:name => set_name(persona),
74
+ :cuit => persona[:id_persona],
75
+ :cp => persona.try(:[], :domicilio_fiscal).try(:[], :cod_postal),
76
+ :address => persona.try(:[], :domicilio_fiscal).try(:[], :direccion),
77
+ :city_id => persona.try(:[], :domicilio_fiscal).try(:[], :id_provincia),
78
+ :city => Padron::PROVINCIAS[persona.try(:[],:domicilio_fiscal).try(:[], :id_provincia)],
79
+ :locality => persona.try(:[], :domicilio_fiscal).try(:[], :localidad)}
80
80
  end
81
81
  end
82
82
  end
@@ -1,3 +1,3 @@
1
1
  module Padron
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo Diaz Martinez