Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTSRD-2132.Update contactinformation for an organisation #1576

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
4525006
Upgrading perftest branch to V16 and adding subnet_suffix
SabinaHMCTS Dec 11, 2023
3b99e90
Update contactinformation for an organisation adding test cases
SabinaHMCTS Feb 27, 2024
5b4b273
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Mar 8, 2024
6c99bec
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Apr 11, 2024
f5b99fa
Update name sra for an organisation adding test cases
SabinaHMCTS Apr 11, 2024
81d9552
Update contact information for an organisation adding test cases
SabinaHMCTS Apr 11, 2024
43944b9
Update contact information for an organisation adding test cases
SabinaHMCTS Apr 11, 2024
0f02825
Update contact information for an organisation adding test cases
SabinaHMCTS Apr 11, 2024
f7c651a
Update contact information for an organisation adding test cases
SabinaHMCTS Apr 11, 2024
9bd62ba
Update application.yml
SabinaHMCTS Apr 12, 2024
bd06ee9
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Apr 19, 2024
d81e6b6
update contact information review comments
SabinaHMCTS May 3, 2024
bca596f
Merge branch 'master' into DTSRD-2132
SabinaHMCTS May 3, 2024
1c55b22
fixing review comments
SabinaHMCTS May 13, 2024
4df88af
fixing review comments
SabinaHMCTS May 13, 2024
daf82ea
fixing review comments
SabinaHMCTS May 13, 2024
7d04ffa
fixing review comments
SabinaHMCTS May 13, 2024
24ba34a
fixing review comments
SabinaHMCTS May 13, 2024
23f5dec
fixing review comments
SabinaHMCTS May 13, 2024
ba7b5af
fixing review comments
SabinaHMCTS May 13, 2024
954cf2b
fixing review comments
SabinaHMCTS May 13, 2024
257018e
fixing review comments
SabinaHMCTS May 13, 2024
384c1c0
fixing review comments
SabinaHMCTS May 13, 2024
a9edd55
fixing review comments
SabinaHMCTS May 13, 2024
f5ed946
fixing review comments
SabinaHMCTS May 14, 2024
50160db
fixing review comments
SabinaHMCTS May 14, 2024
3f9590f
fixing review comments
SabinaHMCTS May 14, 2024
cf00715
fixing review comments
SabinaHMCTS May 14, 2024
7fa4b61
Merge branch 'master' into DTSRD-2132
SabinaHMCTS May 29, 2024
507d4cb
checnged endpoint
SabinaHMCTS Jun 3, 2024
6223858
checnged endpoint
SabinaHMCTS Jun 3, 2024
dfcfad5
changes to logic
SabinaHMCTS Aug 28, 2024
8b650ac
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Aug 28, 2024
eb08be7
changes to logic
SabinaHMCTS Aug 28, 2024
fb4444b
changes to logic adding test cases
SabinaHMCTS Aug 28, 2024
5dc59b9
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
ec9bf3d
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
96fffd8
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
0d7750a
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
be25b24
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
6123244
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
0a65900
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
a7e6b50
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
f8de665
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
ac9767e
changes to logic adding test cases
SabinaHMCTS Aug 29, 2024
9c70da3
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Sep 9, 2024
cf20e99
Changes to fix review comments
SabinaHMCTS Sep 11, 2024
a27c993
Changes to fix review comments
SabinaHMCTS Sep 11, 2024
c5b36fc
Changes to fix review comments
SabinaHMCTS Sep 11, 2024
33361cd
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Sep 17, 2024
2a5b0bf
Changes to fix review comments
SabinaHMCTS Sep 25, 2024
9fc04eb
fixing review comments according to DTSRD-2136
SabinaHMCTS Sep 26, 2024
af33d84
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Sep 27, 2024
157cc57
changes to update contact information
SabinaHMCTS Sep 30, 2024
1175b6e
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Oct 1, 2024
38c88bf
Merge branch 'master' into DTSRD-2132
SabinaHMCTS Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.springframework.http.HttpStatus;
import uk.gov.hmcts.reform.professionalapi.controller.advice.ErrorResponse;
import uk.gov.hmcts.reform.professionalapi.controller.request.ContactInformationCreationRequest;
import uk.gov.hmcts.reform.professionalapi.controller.request.ContactInformationUpdateRequest;
import uk.gov.hmcts.reform.professionalapi.controller.request.DeleteMultipleAddressRequest;
import uk.gov.hmcts.reform.professionalapi.controller.request.DxAddressCreationRequest;
import uk.gov.hmcts.reform.professionalapi.controller.request.MfaUpdateRequest;
Expand Down Expand Up @@ -260,6 +261,77 @@ public static OrganisationOtherOrgsCreationRequest createOrganisationRequestForV
return organisationOtherOrgsCreationRequest;
}

public static List<ContactInformationCreationRequest> createContactInformationRequests() {

List<DxAddressCreationRequest> dx1 = new LinkedList<>();
dx1.add(dxAddressCreationRequest()
.dxNumber("DX 1234567890")
.dxExchange("dxExchange").build());
dx1.add(dxAddressCreationRequest()
.dxNumber("DX 123456777")
.dxExchange("dxExchange").build());
List<DxAddressCreationRequest> dx2 = new LinkedList<>();
dx2.add(dxAddressCreationRequest()
.dxNumber("DX 123452222")
.dxExchange("dxExchange").build());
dx2.add(dxAddressCreationRequest()
.dxNumber("DX 123456333")
.dxExchange("dxExchange").build());

List<ContactInformationCreationRequest> contactInfoList = new LinkedList<>();
contactInfoList.add(aContactInformationCreationRequest()
.uprn("u1")
.addressLine1("address1")
.addressLine2("address2")
.addressLine3("address3")
.country("country")
.county("county")
.townCity("city")
.postCode("code")
.dxAddress(dx1)
.build());
contactInfoList.add(aContactInformationCreationRequest()
.uprn("up2")
.addressLine1("add")
.addressLine2("add2")
.addressLine3("add3")
.country("country2")
.county("county2")
.townCity("city2")
.postCode("code2")
.dxAddress(dx2)
.build());

return contactInfoList;
}

public ContactInformationCreationRequest createContactInformationWithDXAddUpdatedInfoRequests() {

List<DxAddressCreationRequest> dx1 = new LinkedList<>();
dx1.add(dxAddressCreationRequest()
.dxNumber("DX1234567890")
.dxExchange("dxExchange").build());
dx1.add(dxAddressCreationRequest()
.dxNumber("DX123456777")
.dxExchange("dxExchange1").build());


ContactInformationCreationRequest updatedContactInfoRequest =
aContactInformationCreationRequest()
.uprn("uuprn")
.addressLine1("updatedaddressLine1")
.addressLine2("updatedaddressLine2")
.addressLine3("updatedaddressLine3")
.country("updatedcountry")
.county("updatedcounty")
.townCity("updatedtowncity")
.postCode("uppostcode")
.dxAddress(dx1)
.build();

return updatedContactInfoRequest;
}

public static List<ContactInformationCreationRequest> createContactInformationCreationRequests() {
Set<String> paymentAccounts = new HashSet<>();
paymentAccounts.add("PBA" + randomAlphabetic(7));
Expand Down Expand Up @@ -1752,4 +1824,26 @@ public void deleteMultipleAddressesOfOrganisation(List<DeleteMultipleAddressRequ
log.info("{}:: Delete Multiple Addresses of an organisation status response: {}",
loggingComponentName, response.getStatusCode());
}

@SuppressWarnings("unchecked")
public Response updateContactInformationsToOrganisation(
ContactInformationUpdateRequest
contactInformationUpdateRequest,
HttpStatus expectedStatus) {

Response response = getMultipleAuthHeadersInternal()
.body(contactInformationUpdateRequest)
.put("/refdata/internal/v1/organisations/contactInformation")
.andReturn();

response.then()
.assertThat()
.statusCode(expectedStatus.value());

log.info("{}:: Update organisation contact information response: {}",
loggingComponentName, response.getStatusCode());

return response;

}
}
Loading