Skip to content

CUST-5221: add "destroy" with json-body to booking deletion#308

Merged
googsvg merged 2 commits intomainfrom
CUST-5221-v-3-java-sdk-bookings-destroy-does-not-pass-cancellation-reason-request-body-causing-400-errors
Mar 26, 2026
Merged

CUST-5221: add "destroy" with json-body to booking deletion#308
googsvg merged 2 commits intomainfrom
CUST-5221-v-3-java-sdk-bookings-destroy-does-not-pass-cancellation-reason-request-body-causing-400-errors

Conversation

@googsvg
Copy link
Copy Markdown
Contributor

@googsvg googsvg commented Mar 25, 2026

Added support for sending a JSON body with booking cancellation requests in the Java SDK.

Bookings.destroy() now has request-body overloads that accept DestroyBookingRequest and forward cancellation_reason through the SDK, while the existing legacy destroy(bookingId, queryParams, overrides) overload remains unchanged for backward compatibility. NylasClient.executeDelete() was extended with a body-capable overload to support this behavior.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.47%. Comparing base (fd861fb) to head (1119e38).

Files with missing lines Patch % Lines
src/main/kotlin/com/nylas/resources/Bookings.kt 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #308      +/-   ##
============================================
+ Coverage     82.38%   82.47%   +0.09%     
- Complexity      354      357       +3     
============================================
  Files            37       37              
  Lines          1016     1027      +11     
  Branches         95       95              
============================================
+ Hits            837      847      +10     
- Misses          120      121       +1     
  Partials         59       59              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@googsvg googsvg merged commit 5912164 into main Mar 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants