Afip 1.1.9 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Afip/auth_data.rb +1 -1
- data/lib/Afip/padron.rb +6 -5
- data/lib/Afip/version.rb +1 -1
- data/lib/Afip/wsaa.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: 7d3220014f6e0c9d516e67e4d3837004c9fe41ecc10aa345b2329a579505ec0d
|
4
|
+
data.tar.gz: 3f2fdb7ab15a54f81d8353ed28b6cb488b62b51394278a2a710f55b0db5aa508
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76016c8e31265e90d25113ead0038dc50082e36ab29c6f4315d6239c23e2a85038e3c38ef407f339f8db9bef2d845e0314c54c51868cf3069d1428d862fe03cc
|
7
|
+
data.tar.gz: e23bd4f2545293f231daa06b052952236b5d06fe09a4b29c719a143c80ea5d4f1c461b3da0eea0413b83db4d98fc0637f29c33930242aeb2c2682344aaf18f3c
|
data/lib/Afip/auth_data.rb
CHANGED
@@ -64,7 +64,7 @@ module Afip
|
|
64
64
|
# @return [String]
|
65
65
|
#
|
66
66
|
def todays_data_file_name
|
67
|
-
"
|
67
|
+
"/tmp/#{environment.to_s}_Afip_#{ Afip.cuit }_#{ Time.new.strftime('%Y_%m_%d') }.yml"
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
data/lib/Afip/padron.rb
CHANGED
@@ -49,11 +49,9 @@ module Afip
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def set_data
|
52
|
-
pp data.body
|
53
52
|
if not data.body[:get_persona_response][:persona_return][:persona][:actividad].nil?
|
54
53
|
{
|
55
|
-
:
|
56
|
-
:first_name => data.body[:get_persona_response][:persona_return][:persona][:nombre],
|
54
|
+
:name => set_name(data),
|
57
55
|
:cuit => data.body[:get_persona_response][:persona_return][:persona][:id_persona],
|
58
56
|
:cp => data.body[:get_persona_response][:persona_return][:persona][:domicilio].last[:cod_postal],
|
59
57
|
:address => data.body[:get_persona_response][:persona_return][:persona][:domicilio].last[:direccion],
|
@@ -64,8 +62,7 @@ module Afip
|
|
64
62
|
}
|
65
63
|
else
|
66
64
|
{
|
67
|
-
:
|
68
|
-
:first_name => Padron.divide_name(data.body[:get_persona_response][:persona_return][:persona][:apellido])[1],
|
65
|
+
:name => data.body[:get_persona_response][:persona_return][:persona][:apellido])
|
69
66
|
:cuit => data.body[:get_persona_response][:persona_return][:persona][:id_persona],
|
70
67
|
:cp => data.body[:get_persona_response][:persona_return][:persona].try(:[], :domicilio).try(:[], :cod_postal),
|
71
68
|
:address => data.body[:get_persona_response][:persona_return][:persona].try(:[], :domicilio).try(:[], :direccion),
|
@@ -77,6 +74,10 @@ module Afip
|
|
77
74
|
end
|
78
75
|
end
|
79
76
|
|
77
|
+
def set_name(data)
|
78
|
+
return data.body[:get_persona_response][:persona_return][:persona][:nombre] + data.body[:get_persona_response][:persona_return][:persona][:apellido]
|
79
|
+
end
|
80
|
+
|
80
81
|
def self.divide_name(full_name)
|
81
82
|
full_name = full_name.strip.split(/\s+/)
|
82
83
|
last_name = ''
|
data/lib/Afip/version.rb
CHANGED
data/lib/Afip/wsaa.rb
CHANGED
@@ -87,7 +87,7 @@ XML
|
|
87
87
|
token: #{certs[0]}
|
88
88
|
sign: #{certs[1]}
|
89
89
|
YML
|
90
|
-
`echo '#{ yml }' >
|
90
|
+
`echo '#{ yml }' > /tmp/#{Afip::AuthData.environment.to_s}_Afip_#{ Afip.cuit }_#{ Time.new.strftime('%Y_%m_%d') }.yml`
|
91
91
|
end
|
92
92
|
|
93
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Afip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Facundo A. Díaz Martínez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|