padron 0.1.1 → 0.1.2
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/README.md +12 -9
- data/lib/padron/version.rb +1 -1
- data/lib/padron/wsaa.rb +1 -1
- 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: 8754f2ed59f59118b24daaa8b2cb8fcb155aa54c57b8df80d3271b1dfad47112
|
4
|
+
data.tar.gz: 1a41c5fa4fb2785d011e501c5977f49ed84b28e0de8e7e60b8f58a7c1f7f546c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a82bc47f0a2e750bab74dfa0b323062288024f6b8b9719e9d79a0cd8f48b9a63d66301cb097b423c158b1496ed02b8de377fe94ccfa28286ba923c1650f9920
|
7
|
+
data.tar.gz: 479b61546e0836b7dd0a88f003a10f1e98000c42f8688248a6f1e4107f2921cc51793c3a1658401ad4bd52e6bef933f0732f05521fa917e46c1419e53b2c5ba3
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Padron
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Gem to interact with ws_sr_padron_a4 web service from A.F.I.P.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -21,18 +19,23 @@ Or install it yourself as:
|
|
21
19
|
$ gem install padron
|
22
20
|
|
23
21
|
## Usage
|
22
|
+
Given a document type D.N.I. (length = 8) the get_data method will return all public info about the two posible persons for the given ID.
|
23
|
+
ex:
|
24
|
+
Padron::Call.new(id: "36864268").get_data
|
25
|
+
will return public info about document "20368642682" and "27368642687".
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
27
|
+
This's because a given D.N.I can be duplicated, for that reason the gem will build the two possible CUIL/CUIT for that DNI and will return the info.
|
28
28
|
|
29
|
-
|
29
|
+
The response has the following structure for each person returned:
|
30
|
+
if the person wasn't registered in AFIP:
|
31
|
+
{name: ..., cuit: ...}
|
32
|
+
if the person was registered in AFIP:
|
33
|
+
{name: ..., cuit: ..., cp: ..., address: ..., city_id: ..., city: ..., locality: ...}
|
30
34
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
35
|
|
33
36
|
## Contributing
|
34
37
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/FacundoDiaMartinez/padron.
|
36
39
|
|
37
40
|
|
38
41
|
## License
|
data/lib/padron/version.rb
CHANGED
data/lib/padron/wsaa.rb
CHANGED
@@ -81,7 +81,7 @@ XML
|
|
81
81
|
token: #{certs[0]}
|
82
82
|
sign: #{certs[1]}
|
83
83
|
YML
|
84
|
-
`echo '#{ yml }' > #{
|
84
|
+
`echo '#{ yml }' > /tmp/padron_a5_#{Padron.environment.to_s}_Padron_#{ Padron.cuit }_#{ Time.new.strftime('%Y_%m_%d') }.yml`
|
85
85
|
end
|
86
86
|
|
87
87
|
end
|