Skip to content

Commit f8b1b0b

Browse files
committed
feat:amp-170 add client to call webhook
1 parent 439d4ae commit f8b1b0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/uk/gov/hmcts/cp/subscription/services/WebhookInvoiceService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ public class WebhookInvoiceService {
1313

1414
private final DocumentServiceClient client;
1515

16-
public void processInvoiceEvent(final PcrEventPayload payload) {
16+
public void processPcrEvent(final PcrEventPayload payload) {
1717
log.info("Processing invoice webhook event: {}", payload);
1818

1919
try {
2020
client.updateDocumentMetadata(payload);
2121
log.info("Successfully updated document metadata for invoice event");
22-
}catch (FeignException ex) {
22+
} catch (FeignException ex) {
2323
log.error("Failed to update document metadata for invoice event", ex);
2424
throw ex;
2525
}

src/test/java/uk/gov/hmcts/cp/subscription/services/WebhookInvoiceServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void shouldCallDocumentServiceToUpdateMetadata() {
6060
PcrEventPayload payload = new PcrEventPayload();
6161
payload.setEventId(UUID.randomUUID());
6262

63-
webhookInvoiceService.processInvoiceEvent(payload);
63+
webhookInvoiceService.processPcrEvent(payload);
6464

6565
wireMockServer.verify(postRequestedFor(
6666
urlEqualTo("/document-service/api/rest/document/metadata"))

0 commit comments

Comments
 (0)