ruby-experian 0.0.8 → 0.1.0
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 +1 -1
- data/Gemfile.lock +6 -24
- data/lib/experian/trade_report.rb +8 -0
- data/lib/experian/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6c744efbe089056cb402d802ef84639284c6195156677fa9c9613cf5452d0b
|
4
|
+
data.tar.gz: 93910e87df645330255fa3ca288fc73468d579c4837e95820788cf52141a8554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00099d053097cd37b7ad517a2054760b78fc28e99eb31eea03b226723b05950cd79b9eccd108490518b60955de22d5d7ae7f908fb7bfc02e10ae2db52a0fcd67'
|
7
|
+
data.tar.gz: 56f76810e3ae4cc15f8daeb630ce97c76e26f670dcddacec5424eae55e05fd4bf070e9f873a2f5e4f05c49d751dc7029681dffe2ce29385467ea340e2892ce56
|
data/Gemfile
CHANGED
@@ -7,7 +7,6 @@ gem "dotenv", "~> 2.8.1"
|
|
7
7
|
gem "rake", "~> 13.1"
|
8
8
|
gem "rspec", "~> 3.13"
|
9
9
|
gem "rubocop", "~> 1.50.2"
|
10
|
-
gem "vcr", "~> 6.1.0"
|
11
10
|
gem "webmock", "~> 3.23.0"
|
12
11
|
|
13
12
|
group :development, :test do
|
@@ -19,6 +18,7 @@ group :development, :test do
|
|
19
18
|
end
|
20
19
|
|
21
20
|
group :test do
|
21
|
+
gem "vcr", "~> 6.1.0"
|
22
22
|
gem "simplecov"
|
23
23
|
gem "simplecov-cobertura"
|
24
24
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-experian (0.0
|
4
|
+
ruby-experian (0.1.0)
|
5
5
|
faraday (>= 1)
|
6
6
|
multi_xml (>= 0.6.0)
|
7
7
|
rexml (>= 3.2)
|
@@ -13,6 +13,7 @@ GEM
|
|
13
13
|
addressable (2.8.6)
|
14
14
|
public_suffix (>= 2.0.2, < 6.0)
|
15
15
|
ast (2.4.2)
|
16
|
+
base64 (0.2.0)
|
16
17
|
bigdecimal (3.1.6)
|
17
18
|
binding_of_caller (1.0.0)
|
18
19
|
debug_inspector (>= 0.0.1)
|
@@ -25,35 +26,16 @@ GEM
|
|
25
26
|
diff-lcs (1.5.1)
|
26
27
|
docile (1.4.0)
|
27
28
|
dotenv (2.8.1)
|
28
|
-
faraday (
|
29
|
-
|
30
|
-
faraday-
|
31
|
-
faraday-excon (~> 1.1)
|
32
|
-
faraday-httpclient (~> 1.0)
|
33
|
-
faraday-multipart (~> 1.0)
|
34
|
-
faraday-net_http (~> 1.0)
|
35
|
-
faraday-net_http_persistent (~> 1.0)
|
36
|
-
faraday-patron (~> 1.0)
|
37
|
-
faraday-rack (~> 1.0)
|
38
|
-
faraday-retry (~> 1.0)
|
29
|
+
faraday (2.8.1)
|
30
|
+
base64
|
31
|
+
faraday-net_http (>= 2.0, < 3.1)
|
39
32
|
ruby2_keywords (>= 0.0.4)
|
40
|
-
faraday-
|
41
|
-
faraday-em_synchrony (1.0.0)
|
42
|
-
faraday-excon (1.1.0)
|
43
|
-
faraday-httpclient (1.0.1)
|
44
|
-
faraday-multipart (1.0.4)
|
45
|
-
multipart-post (~> 2)
|
46
|
-
faraday-net_http (1.0.1)
|
47
|
-
faraday-net_http_persistent (1.2.0)
|
48
|
-
faraday-patron (1.0.0)
|
49
|
-
faraday-rack (1.0.0)
|
50
|
-
faraday-retry (1.0.3)
|
33
|
+
faraday-net_http (3.0.2)
|
51
34
|
hashdiff (1.1.0)
|
52
35
|
interception (0.5)
|
53
36
|
json (2.7.1)
|
54
37
|
method_source (1.0.0)
|
55
38
|
multi_xml (0.6.0)
|
56
|
-
multipart-post (2.3.0)
|
57
39
|
parallel (1.24.0)
|
58
40
|
parser (3.2.2.4)
|
59
41
|
ast (~> 2.4.1)
|
@@ -2,6 +2,9 @@ module Experian
|
|
2
2
|
class TradeReport < Report
|
3
3
|
def model_200(period: last_submitted_year)
|
4
4
|
{
|
5
|
+
"00041" => number_of_employees(period:, type: "EmpleadoFijo"),
|
6
|
+
"00042" => number_of_employees(period:, type: "EmpleadoEventual"),
|
7
|
+
|
5
8
|
# Balance Sheet - Assets
|
6
9
|
"00101" => financial_data("Activo", "11000", period:), # ACTIVO NO CORRIENTE
|
7
10
|
"00102" => financial_data("Activo", "11100", period:), # Inmovilizado intangible
|
@@ -27,6 +30,7 @@ module Experian
|
|
27
30
|
"00285" => financial_data("PerdidasGanancias", "40900", period:), # Imputación de subvenciones de inmovilizado no financiero y otras
|
28
31
|
"00286" => financial_data("PerdidasGanancias", "41000", period:), # Excesos de provisiones
|
29
32
|
"00287" => financial_data("PerdidasGanancias", "41100", period:), # Deterioro y resultado por enajenaciones del inmovilizad
|
33
|
+
"00295" => financial_data("PerdidasGanancias", "41300", period:), # Otros resultados
|
30
34
|
"00296" => financial_data("PerdidasGanancias", "49100", period:), # Resultado de explotacion
|
31
35
|
"00305" => financial_data("PerdidasGanancias", "41500", period:), # Gastos Financieros
|
32
36
|
"00326" => financial_data("PerdidasGanancias", "41900", period:), # Impuestos Sobre Beneficios
|
@@ -51,5 +55,9 @@ module Experian
|
|
51
55
|
def section(section_name)
|
52
56
|
data.dig("InformeEconomicoFinanciero")&.first&.dig("ListaGrupos", "Grupo").find { |d| d["Tipo"][section_name] }&.dig("ListaColumnas", "Columna", "ListaDatos", "Dato")
|
53
57
|
end
|
58
|
+
|
59
|
+
def number_of_employees(period:, type: "EmpleadoFijo")
|
60
|
+
data.dig("ListaAnualEmpleados", "Empleado").find { |d| d["Ejercicio"] == period.to_s }&.dig(type)&.to_i
|
61
|
+
end
|
54
62
|
end
|
55
63
|
end
|
data/lib/experian/version.rb
CHANGED
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.0
|
4
|
+
version: 0.1.0
|
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-
|
11
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|