From 0ce262420847468b07bd7bad9e6f7a45969a3ddc Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 18:38:40 +0000 Subject: [PATCH 1/3] Add identity and business verification trigger Co-authored-by: myles.foster --- test/unit/testReleasePrep.py | 25 +++++++++++++++++++++++++ trolley/verification_gateway.py | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/test/unit/testReleasePrep.py b/test/unit/testReleasePrep.py index 6c34932..b563c1c 100644 --- a/test/unit/testReleasePrep.py +++ b/test/unit/testReleasePrep.py @@ -52,6 +52,18 @@ def get(self, endpoint): def post(self, endpoint, body): self.calls.append(("POST", endpoint, body)) + if endpoint == "/v1/verifications/trigger": + return { + "ok": True, + "recipientId": body["recipientId"], + "verifications": [ + { + "type": body["types"][0], + "status": "created", + "verificationId": "IV-123", + } + ], + } if endpoint.startswith("/v1/batches/"): return {"ok": True, "batch": {"id": "B-123", "status": "open"}} if endpoint.startswith("/v1/invoices/payment/create"): @@ -105,15 +117,28 @@ def test_verification_gateway_calls_documented_endpoints(self): expire = gateway.verification.expire({"type": "individual", "verificationIds": ["IV-123"]}) trigger = gateway.verification.trigger("individual", {"recipientIds": ["R-123"]}) watchlist = gateway.verification.trigger_watchlist({"recipientIds": ["R-123"]}) + identity = gateway.verification.trigger_identity_or_business_verification({ + "recipientId": "R-123", + "types": ["individual"], + "retryAllowed": True, + }) self.assertEqual("WV-123", search[0].id) self.assertEqual("WV-123", expire[0].id) self.assertEqual("WV-123", trigger[0].id) self.assertEqual("WV-123", watchlist[0].id) + self.assertTrue(identity.ok) + self.assertEqual("R-123", identity.recipientId) + self.assertEqual("IV-123", identity.verifications[0].verificationId) self.assertEqual(("GET", "/v1/verifications?verificationType=watchlist&page=1&pageSize=10", None), fake_client.calls[0]) self.assertEqual(("PATCH", "/v1/verifications/expire", {"type": "individual", "verificationIds": ["IV-123"]}), fake_client.calls[1]) self.assertEqual(("POST", "/v1/verifications/individual/trigger", {"recipientIds": ["R-123"]}), fake_client.calls[2]) self.assertEqual(("POST", "/v1/verifications/watchlist/trigger", {"recipientIds": ["R-123"]}), fake_client.calls[3]) + self.assertEqual(("POST", "/v1/verifications/trigger", { + "recipientId": "R-123", + "types": ["individual"], + "retryAllowed": True, + }), fake_client.calls[4]) def test_invoice_payment_create_preserves_existing_body_and_adds_batch_id(self): gateway = Gateway(Configuration("public", "private")) diff --git a/trolley/verification_gateway.py b/trolley/verification_gateway.py index 1a05968..93e2101 100644 --- a/trolley/verification_gateway.py +++ b/trolley/verification_gateway.py @@ -42,6 +42,24 @@ def trigger(self, verification_type, body): response = trolley.configuration.Configuration.client(self.config).post(endpoint, body) return self.__build_verifications_from_response(response, True) + def trigger_identity_or_business_verification(self, body): + if body is None: + raise InvalidFieldException("Body cannot be None.") + endpoint = '/v1/verifications/trigger' + response = trolley.configuration.Configuration.client(self.config).post(endpoint, body) + verifications = [ + namedtuple("TriggeredVerification", verification.keys())(*verification.values()) + for verification in response.get('verifications', []) + ] + return namedtuple( + "IdentityOrBusinessVerificationResult", + ["ok", "recipientId", "verifications"], + )( + response.get('ok'), + response.get('recipientId'), + verifications, + ) + def trigger_watchlist(self, body): if body is None: raise InvalidFieldException("Body cannot be None.") From b873cbb8079c246cc84e7529978b9efe3ee68c71 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 18:42:16 +0000 Subject: [PATCH 2/3] Normalize verification trigger results Co-authored-by: myles.foster --- trolley/verification_gateway.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/trolley/verification_gateway.py b/trolley/verification_gateway.py index 93e2101..a736f7d 100644 --- a/trolley/verification_gateway.py +++ b/trolley/verification_gateway.py @@ -47,8 +47,17 @@ def trigger_identity_or_business_verification(self, body): raise InvalidFieldException("Body cannot be None.") endpoint = '/v1/verifications/trigger' response = trolley.configuration.Configuration.client(self.config).post(endpoint, body) + triggered_verification = namedtuple( + "TriggeredVerification", + ["type", "status", "verificationId", "error"], + ) verifications = [ - namedtuple("TriggeredVerification", verification.keys())(*verification.values()) + triggered_verification( + verification.get('type'), + verification.get('status'), + verification.get('verificationId'), + verification.get('error'), + ) for verification in response.get('verifications', []) ] return namedtuple( From 8f364d285aa153ee175a13c112c1eb334b6b77f8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 19:27:07 +0000 Subject: [PATCH 3/3] 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 a50e2ea..c1c9dbc 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