Project

cpr-client

0.0
No release in over 3 years
Low commit activity in last 3 years
Client for making STAMP requests to the danish CPR registry (cpr.dk).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 5.8
~> 10.5

Runtime

~> 1.6
 Project Readme

CPR Client

A client for looking up people in the danish CPR registry. This cpr-client only supports requests allowed for private companies (STAMP). To use the CPR services, you must first get an agreement with cpr.dk.

Install

You can install cpr-client via rubygems:

$ gem install cpr-client

Or add this to your Gemfile

gem 'cpr-client'

Usage

# The client is connecting to the demo environment
client = CPRClient.new(username, password, true)
record = client.lookup('0707614285')

if record.nil?
  puts "The record was not found"
elsif record.protected?
  puts "The record has name and address protection"
else
  puts record[:adrnvn]
  puts record[:adrnvn, :t]
end