diff --git a/lib/nylas/resources/grants.rb b/lib/nylas/resources/grants.rb index 912bbe27..f6234c37 100644 --- a/lib/nylas/resources/grants.rb +++ b/lib/nylas/resources/grants.rb @@ -9,6 +9,7 @@ class Grants < Resource include ApiOperations::Get include ApiOperations::Put include ApiOperations::Delete + include ApiOperations::Patch # Return all grants. # @@ -37,7 +38,7 @@ def find(grant_id:) # @param request_body [Hash] The values to update the grant with # @return [Array(Hash, String)] The updated grant and API Request ID. def update(grant_id:, request_body:) - put( + patch( path: "#{api_uri}/v3/grants/#{grant_id}", request_body: request_body ) diff --git a/spec/nylas/resources/grants_spec.rb b/spec/nylas/resources/grants_spec.rb index 78eea7e2..c923d1ab 100644 --- a/spec/nylas/resources/grants_spec.rb +++ b/spec/nylas/resources/grants_spec.rb @@ -56,7 +56,7 @@ scope: %w[https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile] } path = "#{api_uri}/v3/grants/#{grant_id}" - allow(grants).to receive(:put) + allow(grants).to receive(:patch) .with(path: path, request_body: request_body) .and_return(response)