From e1200b4e3076aff864ea01bb5e8ff192c9501da3 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 18:38:40 +0000 Subject: [PATCH 1/2] Add identity and business verification trigger Co-authored-by: myles.foster --- .../java/com/trolley/VerificationGateway.java | 5 ++ .../com/trolley/VerificationGatewayTest.java | 48 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/test/java/com/trolley/VerificationGatewayTest.java diff --git a/src/main/java/com/trolley/VerificationGateway.java b/src/main/java/com/trolley/VerificationGateway.java index 3afea80..9e34f0d 100644 --- a/src/main/java/com/trolley/VerificationGateway.java +++ b/src/main/java/com/trolley/VerificationGateway.java @@ -35,6 +35,11 @@ public String trigger(final String verificationType, final Object body) throws E return this.client.post(endpoint, new ObjectMapper().writeValueAsString(body)); } + public String triggerIdentityOrBusinessVerification(final Object body) throws Exception { + final String endpoint = "/v1/verifications/trigger"; + return this.client.post(endpoint, new ObjectMapper().writeValueAsString(body)); + } + public String triggerWatchlist(final Object body) throws Exception { final String endpoint = "/v1/verifications/watchlist/trigger"; return this.client.post(endpoint, new ObjectMapper().writeValueAsString(body)); diff --git a/src/test/java/com/trolley/VerificationGatewayTest.java b/src/test/java/com/trolley/VerificationGatewayTest.java new file mode 100644 index 0000000..9b25507 --- /dev/null +++ b/src/test/java/com/trolley/VerificationGatewayTest.java @@ -0,0 +1,48 @@ +package com.trolley; + +import static org.junit.Assert.assertEquals; + +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.junit.Test; + +public class VerificationGatewayTest { + @Test + public void triggerIdentityOrBusinessVerificationUsesDedicatedEndpoint() throws Exception { + final VerificationGateway gateway = new VerificationGateway(new Configuration()); + final RecordingClient client = new RecordingClient(); + gateway.client = client; + + final Map body = new LinkedHashMap<>(); + body.put("recipientId", "R-123"); + body.put("types", Arrays.asList("individual")); + body.put("retryAllowed", true); + + final String response = gateway.triggerIdentityOrBusinessVerification(body); + + assertEquals("/v1/verifications/trigger", client.endpoint); + assertEquals( + "{\"recipientId\":\"R-123\",\"types\":[\"individual\"],\"retryAllowed\":true}", + client.body + ); + assertEquals("{\"ok\":true}", response); + } + + private static class RecordingClient extends Client { + private String endpoint; + private String body; + + RecordingClient() { + super(new Configuration()); + } + + @Override + public String post(final String endpoint, final String body) { + this.endpoint = endpoint; + this.body = body; + return "{\"ok\":true}"; + } + } +} From 3273165ffec5d5689d4f05277c0aaf86347589b8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 19:27:07 +0000 Subject: [PATCH 2/2] fix(ci): update Codecov orb Co-authored-by: myles.foster --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f13629..fbc637d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - codecov: codecov/codecov@5.0.3 + codecov: codecov/codecov@6.0.0 defaults: &defaults working_directory: ~/project