openownership / register

A demonstration transnational register of beneficial ownership data from the UK, Denmark, Slovakia and Armenia
https://register.openownership.org
GNU Affero General Public License v3.0
18 stars 3 forks source link

PSC-STM-A5: Obtain company number from record #244

Open tiredpixel opened 8 months ago

tiredpixel commented 8 months ago

When a record is obtained through the PSC snapshots, it is in the form:

{ company_number: "12345678", data: {} }

However, when read through the PSC Stream API, it is just the data part.

This means the company number will need to be extracted from the data, probably through the psc_self_link.

This will include a research task to check that the company_number from here always matches the self_link identifier.

Estimate: 3 hours

tiredpixel commented 6 months ago

It appears that PscStream read_stream already extracts the company number, not from the self-link identifier, but from the resource URI: https://github.com/openownership/register-ingester-psc/blob/main/lib/register_ingester_psc/streams/clients/psc_stream.rb#L36-L38

This seems like a good approach, and it appears to be working correctly. So, there is nothing to do for this ticket.