Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/strzibny/ruby-ares
Gem for accesing business information from ARES database
https://github.com/strzibny/ruby-ares
Last synced: 2 months ago
JSON representation
Gem for accesing business information from ARES database
- Host: GitHub
- URL: https://github.com/strzibny/ruby-ares
- Owner: strzibny
- License: other
- Created: 2012-12-02T23:11:06.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2023-05-19T05:50:37.000Z (over 1 year ago)
- Last Synced: 2024-10-31T13:54:56.247Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 2
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ruby-ares
Gem for accesing business information from ARES database.
ARES is the Czech business database maintained by Ministry of Finance of the Czech Republic.
This gem helps to retrieve data provided by this database. Currently ruby-ares supports only retrieval of basic information and addresses for business contacts by IČ (Czech business contact identification number).## Installation and Requirements
Install the gem and require it:
```
$ gem install ruby-ares
```
```ruby
require 'ruby-ares'
```This will need libxml2 (with header files) installed. On Fedora:
```
su -c 'yum install libxml2-devel'
```### Gained information
* ICO / Company number
* DIC / VAT number
* Company name
* Company state
* Addresses
* Legal form / Legal form ARES id
* Case reference (where company is registered)## Usage
To get an ARES subjet/party by IČ:
```ruby
subject = RubyARES::Subject.get(27074358)
```
And then:
```ruby
subject => #], @updated_at=nil, @legal_form=”Akciová společnost”, @legal_form_id=”121”, @case_reference=#>
subject.name => “Asseco Central Europe, a.s.”
subject.ic => “27074358”
subject.address => #
subject.address.to_str => “Budějovická 3a/778\n14000 Praha\nMichle\n”
subject.case_reference => #
subject.case_reference.to_str => “Městský soud v Praze B 8525”
```### Exceptions
ruby-ares will raise either `RubyARES::Parser::ARESDatabaseError` or `RubyARES::Parser::ParseError` if the ARES database responds with an error or the XML doesn't contain the information you are looking for.
If the connection to the ARES database can't be established ruby-ares raises `RubyARES::HTTP::ConnectionError`.
## License
ruby-ares is written and maintained by [Josef Strzibny](http://strzibny.name).
See LICENSE file.
## Contributors
Contributions are welcome!
Here are the list of current contributors:
- Jindřich Skupa