-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from companieshouse/DSDN-1701
added new endpoint for Legal person Beneficial
- Loading branch information
Showing
10 changed files
with
490 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/itest/resources/features/get_legal_person_beneficial_owner.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Feature: Get Legal Person Beneficial Owner | ||
|
||
Scenario Outline: Get individual successfully | ||
Given Psc data api service is running | ||
And a PSC exists for "<company_number>" for Legal Person Beneficial Owner | ||
When a Get request is sent for "<company_number>" and "<notificationId>" for Legal Person Beneficial Owner | ||
And the Get call response body should match "<result>" file for Legal Person Beneficial Owner | ||
Then I should receive 200 status code | ||
|
||
Examples: | ||
| company_number | notificationId | result | | ||
| 347777755 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV | LPBO_get_request_result | | ||
|
||
|
||
|
||
Scenario Outline: Get Legal Person when sending get request without Eric headers | ||
|
||
Given Psc data api service is running | ||
And a PSC exists for "<company_number>" for Legal Person Beneficial Owner | ||
When a Get request is sent for "<company_number>" and "<notificationId>" without ERIC headers for Legal Person Beneficial Owner | ||
Then I should receive 401 status code | ||
|
||
Examples: | ||
| company_number | notificationId | | ||
| 347777755 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV | | ||
|
||
Scenario Outline: Get PSC unsuccessfully - PSC resource does not exist | ||
Given a PSC does not exist for "<company_number>" | ||
When a Get request has been sent for "<company_number>" and "<notificationId>" for Legal Person Beneficial Owner | ||
Then I should receive 404 status code | ||
|
||
Examples: | ||
| company_number | notificationId | | ||
| 347777755 | ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"_id": "YfTs9WeeqpXTqf6dc6FZ4C0H0ZVV", | ||
"internal_data": { | ||
"created_at" : "2021-11-02T08:47:45", | ||
"updated_at" :"2021-09-14T10:30:16.000Z", | ||
"updated_by" :"CHIPS", | ||
"delta_at" : "2023-11-20T08:47:45.378Z" | ||
}, | ||
"external_data": { | ||
"notification_id": "ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV", | ||
"psc_id" : "ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV", | ||
"sensitive_data": { | ||
"usual_residential_address" : { | ||
"address_line_1" : "ura_line1", | ||
"address_line_2" : "ura_line2", | ||
"care_of" : "ura_care_of", | ||
"country" : "United Kingdom", | ||
"locality" : "Cardiff", | ||
"po_box" : "ura_po", | ||
"postal_code" : "CF2 1B6", | ||
"premises" : "URA", | ||
"region" : "ura_region" | ||
}, | ||
"residential_address_same_as_service_address": true, | ||
"date_of_birth": { | ||
"day": 21, | ||
"year": 1995, | ||
"month": 10 | ||
} | ||
}, | ||
"data" : { | ||
"service_address" : { | ||
"address_line_1" : "sa_line1", | ||
"address_line_2" : "sa_line2", | ||
"care_of" : "sa_care_of", | ||
"country" : "United Kingdom", | ||
"locality" : "Cardiff", | ||
"po_box" : "sa_po", | ||
"postal_code" : "CF2 1B6", | ||
"premises" : "SA", | ||
"region" : "sa_region" | ||
}, | ||
"natures_of_control": [ | ||
"part-right-to-share-surplus-assets-75-to-100-percent" | ||
], | ||
"country_of_residence" : "United Kingdom", | ||
"links" : [{ | ||
"self" : "/company/34777775/persons-with-significant-control/ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV" | ||
}], | ||
"nationality" : "British", | ||
"is_sanctioned": true, | ||
"kind" : "legal-person-beneficial-owner", | ||
"company_number": "347777755", | ||
"name": "string", | ||
"name_elements": { | ||
"title":"Mr.", | ||
"surname" : "JONES", | ||
"forename" : "PHIL", | ||
"middlename" : "tom" | ||
} | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/itest/resources/json/output/LPBO_get_request_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"address": { | ||
"address_line_1" : "ura_line1", | ||
"address_line_2" : "ura_line2", | ||
"care_of" : "ura_care_of", | ||
"country" : "United Kingdom", | ||
"locality" : "Cardiff", | ||
"po_box" : "ura_po", | ||
"postal_code" : "CF2 1B6", | ||
"premises" : "URA", | ||
"region" : "ura_region" | ||
}, | ||
"country_of_residence": "United Kingdom", | ||
"date_of_birth": { | ||
"day": 21, | ||
"month": 10, | ||
"year": 1995 | ||
}, | ||
"etag": "string", | ||
"kind": "legal-person-beneficial-owner", | ||
"links": { | ||
"self": "/company/347777755/persons-with-significant-control/individual/ZfTs9WeeqpXTqf6dc6FZ4C0H0ZVV", | ||
"statement": "string" | ||
}, | ||
"name": "string", | ||
"is_sanctioned": true, | ||
"name_elements": { | ||
"forename": "PHIL", | ||
"other_forenames": "tom", | ||
"surname": "JONES", | ||
"title": "Mr" | ||
}, | ||
"nationality": "British", | ||
"natures_of_control": [ | ||
"part-right-to-share-surplus-assets-75-to-100-percent" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.