ruby-experian 0.1.1 → 0.1.3

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: 49f72214cb1be783e88337a4252fe8f43bae3094264009d8cb320ff6d16af3f6
4
- data.tar.gz: f960aa5170a197c7094d69ec4249ce789197e835183cdd8b1f2182d84732e2ee
3
+ metadata.gz: 7975cec5e275690cf65ef6aa4fefe83adb45a70163f5809e439cfd13f3146e80
4
+ data.tar.gz: 9f8d696355efefc18c6cce09aad5bc520c7bc23b5d534497999a38dcf159d491
5
5
  SHA512:
6
- metadata.gz: 2a04cc506991c122892e4c53fc298cf9dfb710a993b426e3b5f225a624b45a2c785cb3eb719980355e0e0cbc3e41c329afe65d2946b78d3c61b81d5557b188e2
7
- data.tar.gz: 68b312e16f9125b563cb862521b6473d135b610d5f95dd9620075fb46036e41acedd1d7af102e1d5c07eeaa79e5473f023f3040a82b0bd653aac38092a7657b9
6
+ metadata.gz: 4ce1cc2008efb597f7069d9cba2ab7d808a61cd95e388cab976d552616fe9d6c3a814f6acf0dca216d3dbf75921ee0a8f7c3a05f26d89c7ed63f2807fd242b6d
7
+ data.tar.gz: e4c308da569b6b059b33442193aa55514ecf0cb89a142cbec71b7781c341d22726fa7b52e4e72d89847a9362087094bce04a59550c9008828fd4530e0c5ff5c6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-experian (0.1.1)
4
+ ruby-experian (0.1.3)
5
5
  faraday (>= 1)
6
6
  multi_xml (>= 0.6.0)
7
7
  rexml (>= 3.2)
@@ -44,7 +44,7 @@ module Experian
44
44
  end
45
45
 
46
46
  def address
47
- if (address_xml = data["SeccionDatosRegistrales"]["DomicilioSocial"])
47
+ if (address_xml = data.dig("SeccionDatosRegistrales", "DomicilioSocial"))
48
48
  OpenStruct.new(
49
49
  line: address_xml["Domicilio"],
50
50
  city: address_xml["Poblacion"] || address_xml["Provincia"],
@@ -56,7 +56,7 @@ module Experian
56
56
  end
57
57
 
58
58
  def most_recent_number_of_employees
59
- data.dig("ListaAnualEmpleados", "Empleado").first&.dig("EmpleadoFijo")&.to_i
59
+ data.dig("ListaAnualEmpleados", "Empleado")&.first&.dig("EmpleadoFijo")&.to_i
60
60
  end
61
61
 
62
62
  def cnae
@@ -91,11 +91,11 @@ module Experian
91
91
  end
92
92
 
93
93
  def section(section_name)
94
- data.dig("InformeEconomicoFinanciero")&.first&.dig("ListaGrupos", "Grupo").find { |d| d["Tipo"][section_name] }&.dig("ListaColumnas", "Columna", "ListaDatos", "Dato")
94
+ data.dig("InformeEconomicoFinanciero")&.first&.dig("ListaGrupos", "Grupo")&.find { |d| d["Tipo"][section_name] }&.dig("ListaColumnas", "Columna", "ListaDatos", "Dato")
95
95
  end
96
96
 
97
97
  def number_of_employees(period:, type: "EmpleadoFijo")
98
- data.dig("ListaAnualEmpleados", "Empleado").find { |d| d["Ejercicio"] == period.to_s }&.dig(type)&.to_i
98
+ data.dig("ListaAnualEmpleados", "Empleado")&.find { |d| d["Ejercicio"] == period.to_s }&.dig(type)&.to_i
99
99
  end
100
100
  end
101
101
  end
@@ -1,3 +1,3 @@
1
1
  module Experian
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-experian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Mochetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-12 00:00:00.000000000 Z
11
+ date: 2024-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday