From 87434df2b177ec44fb2d7a159658c4690eee52f3 Mon Sep 17 00:00:00 2001 From: Samuel Xavier Date: Mon, 25 Aug 2025 13:40:52 -0300 Subject: [PATCH] CUST-4719 Fixed grants.update() not using PATCH, fixed tests) --- CHANGELOG.md | 1 + nylas/resources/grants.py | 1 + tests/resources/test_grants.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e50fc314..33f1e2c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ nylas-python Changelog Unreleased ---------- * Added Yahoo, Zoom, EWS as providers to models/auth.py +* Fixed grants.update() not using the correct "PATCH" method v6.11.1 ---------- diff --git a/nylas/resources/grants.py b/nylas/resources/grants.py index 5f6e0266..06a951bc 100644 --- a/nylas/resources/grants.py +++ b/nylas/resources/grants.py @@ -92,6 +92,7 @@ def update( response_type=Grant, request_body=request_body, overrides=overrides, + method="PATCH" ) def destroy( diff --git a/tests/resources/test_grants.py b/tests/resources/test_grants.py index 9dfcef94..e7d61d32 100644 --- a/tests/resources/test_grants.py +++ b/tests/resources/test_grants.py @@ -67,7 +67,7 @@ def test_update_grant(self, http_client_response): ) http_client_response._execute.assert_called_once_with( - "PUT", "/v3/grants/grant-123", None, None, request_body, overrides=None + "PATCH", "/v3/grants/grant-123", None, None, request_body, overrides=None ) def test_destroy_grant(self, http_client_delete_response):