Skip to content

chore(retentions): add new retentions method for support drafts#50

Open
raul-facturapi wants to merge 2 commits into
mainfrom
chore/retention_draft
Open

chore(retentions): add new retentions method for support drafts#50
raul-facturapi wants to merge 2 commits into
mainfrom
chore/retention_draft

Conversation

@raul-facturapi

Copy link
Copy Markdown
Collaborator

No description provided.

@raul-facturapi raul-facturapi self-assigned this Jul 1, 2026
@raul-facturapi raul-facturapi changed the title Chore/retention draft chore(retentions): add new retentions method for support drafts Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces support for working with draft retentions in the PHP SDK, adding dedicated draft lifecycle methods and adjusting cancellation behavior to support deleting draft retentions. It also adds PHPUnit coverage to validate the generated HTTP requests for these new/updated behaviors.

Changes:

  • Add Retentions::updateDraft(), Retentions::copyToDraft(), and Retentions::stampDraft(), plus deprecated snake_case aliases for backward compatibility.
  • Allow Retentions::cancel() to be called without query parameters (enables deleting draft retentions via a plain DELETE).
  • Add PHPUnit tests verifying request methods, URLs, and payloads for draft retention flows.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
VERSION.md Documents the new 4.6.0 SDK changes related to draft retentions.
tests/Resources/RetentionsTest.php Adds request-level tests for draft retention creation, update, copy, stamp, cancellation, and filtering.
src/Resources/Retentions.php Implements draft retention methods and makes cancel() query optional; adds deprecated snake_case aliases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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