chore(retentions): add new retentions method for support drafts#282
Open
raul-facturapi wants to merge 1 commit into
Open
chore(retentions): add new retentions method for support drafts#282raul-facturapi wants to merge 1 commit into
raul-facturapi wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the v2 OpenAPI specs (Spanish + English) to support “draft” retentions, including creating retentions as drafts, editing drafts, copying an existing retention into a draft, and stamping a draft when ready.
Changes:
- Document draft creation behavior (
status: "draft") and addis_ready_to_stampto theRetentionschema. - Add new endpoints for draft workflows: update draft (
PUT /retentions/{retention_id}), copy to draft, and stamp draft. - Add
statusfiltering to the retentions list endpoint and adjust cancellation docs/params for draft vs non-draft retentions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| website/openapi_v2.yaml | Spanish OpenAPI updates for draft retentions, new endpoints, status filtering, and schema changes. |
| website/openapi_v2.en.yaml | English OpenAPI updates mirroring the Spanish draft retention additions and schema/endpoint changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6180
to
+6186
| type: object | ||
| discriminator: | ||
| propertyName: status | ||
| mapping: | ||
| valid: "#/components/schemas/Retention" | ||
| pending: "#/components/schemas/Retention" | ||
| draft: "#/components/schemas/Retention" |
Comment on lines
+5963
to
+5969
| type: object | ||
| discriminator: | ||
| propertyName: status | ||
| mapping: | ||
| valid: "#/components/schemas/Retention" | ||
| pending: "#/components/schemas/Retention" | ||
| draft: "#/components/schemas/Retention" |
Comment on lines
+6330
to
+6345
| schema: | ||
| oneOf: | ||
| - type: string | ||
| enum: | ||
| - draft | ||
| - pending | ||
| - valid | ||
| - canceled | ||
| - type: array | ||
| items: | ||
| type: string | ||
| enum: | ||
| - draft | ||
| - pending | ||
| - valid | ||
| - canceled |
Comment on lines
+6114
to
+6129
| schema: | ||
| oneOf: | ||
| - type: string | ||
| enum: | ||
| - draft | ||
| - pending | ||
| - valid | ||
| - canceled | ||
| - type: array | ||
| items: | ||
| type: string | ||
| enum: | ||
| - draft | ||
| - pending | ||
| - valid | ||
| - canceled |
Comment on lines
+6516
to
+6523
| "400": | ||
| $ref: "#/components/responses/BadRequest" | ||
| "401": | ||
| $ref: "#/components/responses/Unauthenticated" | ||
| "429": | ||
| $ref: "#/components/responses/RateLimited" | ||
| "500": | ||
| $ref: "#/components/responses/UnexpectedError" |
Comment on lines
+6300
to
+6307
| "400": | ||
| $ref: "#/components/responses/BadRequest" | ||
| "401": | ||
| $ref: "#/components/responses/Unauthenticated" | ||
| "429": | ||
| $ref: "#/components/responses/RateLimited" | ||
| "500": | ||
| $ref: "#/components/responses/UnexpectedError" |
Comment on lines
16954
to
+16966
| RetentionInput: | ||
| type: object | ||
| required: | ||
| - customer | ||
| - cve_retenc | ||
| - periodo | ||
| - totales | ||
| properties: | ||
| status: | ||
| type: string | ||
| enum: | ||
| - draft | ||
| description: | | ||
| Estado inicial de la retención. Si se envía `draft`, la retención se | ||
| guardará como borrador y no se timbrará ni se enviará al SAT. También | ||
| al enviar `draft`, `customer`, `cve_retenc`, `periodo` y `totales` | ||
| pueden omitirse o enviarse como `null`. | ||
| example: draft |
Comment on lines
16713
to
+16725
| RetentionInput: | ||
| type: object | ||
| required: | ||
| - customer | ||
| - cve_retenc | ||
| - periodo | ||
| - totales | ||
| properties: | ||
| status: | ||
| type: string | ||
| enum: | ||
| - draft | ||
| description: | | ||
| Initial status of the retention. If `draft` is sent, the retention | ||
| will be saved as a draft and will not be stamped or sent to the SAT. | ||
| When `draft` is sent, `customer`, `cve_retenc`, `periodo`, and | ||
| `totales` may be omitted or sent as `null`. | ||
| example: draft |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.