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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1af5abe91d0ea0232598f73dfc547860ba3684da190bc7350fbe56b668d48edd
4
- data.tar.gz: 8019171f21e5b56e25c5cb54d2569633590eeeed79ef57a465312a47a6f3333d
3
+ metadata.gz: 8754f2ed59f59118b24daaa8b2cb8fcb155aa54c57b8df80d3271b1dfad47112
4
+ data.tar.gz: 1a41c5fa4fb2785d011e501c5977f49ed84b28e0de8e7e60b8f58a7c1f7f546c
5
5
  SHA512:
6
- metadata.gz: a04f6af6bd748521c164e975c2966efd1769b59c6d71e7b99f9bde7ea44b2f418d6aeb027f059d565a9c925ac4f1eef392086917cb2c783d05b14f1f647fc225
7
- data.tar.gz: cef6dac75f17b5afd0bb19fb7ca1b66ef40aa88cd8dc9a81b47ef9cd9643826f4a24d8759f2d31304e6477811aa97907df155dd79147d41f2a9b37daa9ff52ef
6
+ metadata.gz: 2a82bc47f0a2e750bab74dfa0b323062288024f6b8b9719e9d79a0cd8f48b9a63d66301cb097b423c158b1496ed02b8de377fe94ccfa28286ba923c1650f9920
7
+ data.tar.gz: 479b61546e0836b7dd0a88f003a10f1e98000c42f8688248a6f1e4107f2921cc51793c3a1658401ad4bd52e6bef933f0732f05521fa917e46c1419e53b2c5ba3
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Padron
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/padron`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
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
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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/[USERNAME]/padron.
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/FacundoDiaMartinez/padron.
36
39
 
37
40
 
38
41
  ## License
@@ -1,3 +1,3 @@
1
1
  module Padron
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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 }' > #{Rails.root}/Padron/#{Padron::AuthData.environment.to_s}_Padron_#{ Padron.cuit }_#{ Time.new.strftime('%Y_%m_%d') }.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
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo Diaz Martinez