- That gem is not ready yet, is missing reports and few stuffs
Add this line to your application's Gemfile:
gem 'credit_device'
And then execute:
$ bundle
Or install it yourself as:
$ gem install credit_device
CreditDevice.configure do |config|
config.url = "url"
config.username = "username"
config.password = "password"
end
# check the status after setup your configuration CreaditDevice
CreditDevice::Status.check_status
@company = CreditDevice::Company.new("ABN", "NL",1)
@company.get_all
- ex: by reg_number
- check all list of parameter here: https://inquiry.creditandcollection.nl/docs/company.html
- parameters for Comapny.new is :
def initialize(term, country, page = 1, **parameter)
@company = CreditDevice::Company.new("97123456", "NL",1, type: CreditDevice::Type::QueryParameterType::REG_NUMBER)
@company.get_all
ex: using Inquiry above:
# D44CI701 => type -> all types on https://inquiry.creditandcollection.nl/docs/inquiry.html
# l7Ox1kNbDBaL3ljSsWZi+A== => company_id
# NL = country language
@inquery = CreditDevice::Inquiry.new("D44CI701", "l7Ox1kNbDBaL3ljSs12asd==", "NL")
CreditDevice::Report.new("inquiries/150987/").request_report
or
CreditDevice::Report.new(nil, inquiry_id: 150987).request_report
Bug reports and pull requests are welcome on GitHub at https://github.com/rodrigobarreto/credit_device. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the CreditDevice project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
The gem is available in Credit Device.