Skip to content

chore(retentions): add new retentions method for support drafts (#282) - #289

Open
raul-facturapi wants to merge 1 commit into
mainfrom
chore/download_zip_api
Open

chore(retentions): add new retentions method for support drafts (#282)#289
raul-facturapi wants to merge 1 commit into
mainfrom
chore/download_zip_api

Conversation

@raul-facturapi

Copy link
Copy Markdown
Collaborator

No description provided.

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 updates the OpenAPI v2 specs (ES + EN) to document new functionality around retention drafts (draft creation, draft-only update, copy-to-draft, and stamp-draft flows) and adds a new set of endpoints to create/list/retrieve/download monthly invoice ZIP export requests.

Changes:

  • Document draft retentions support: creation via status: "draft", draft update via PUT /retentions/{retention_id}, draft stamping, and copy-to-draft.
  • Add retention list filtering by status and extend Retention schema with is_ready_to_stamp.
  • Add /invoices/zip-requests endpoints plus related schemas/parameters/responses for monthly invoice ZIP generation and download.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
website/openapi_v2.yaml Adds monthly invoice ZIP request endpoints and extends retention endpoints/schemas to support draft workflows (Spanish spec).
website/openapi_v2.en.yaml Mirrors the same monthly invoice ZIP request endpoints and retention draft workflow documentation (English spec).
Suppressed comments (2)

website/openapi_v2.yaml:6798

  • En los ejemplos de este endpoint se usa un ID de retención de 24 caracteres hex (p. ej. 6062d9fb...), pero el ejemplo de Java usa ret_123, que no coincide con el formato mostrado y puede confundir. Sugiero usar el mismo ID de ejemplo que los otros lenguajes.
            var retention = facturapi.retentions().retrieve(
                  "ret_123"
                );

website/openapi_v2.en.yaml:6584

  • The examples for this endpoint use a 24-hex retention id (e.g. 6062d9fb...), but the Java snippet uses ret_123, which doesn't match the shown format and may confuse readers. Consider using the same example id as the other languages.
            var retention = facturapi.retentions().retrieve(
                  "ret_123"
                );

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread website/openapi_v2.yaml
Comment on lines +3695 to +3700
/invoices/zip-requests:
post:
operationId: createInvoiceZipRequest
tags:
- invoice
summary: Crear o recuperar solicitud de ZIP mensual
Comment thread website/openapi_v2.yaml
Realiza una solicitud de cancelación de retención ante el SAT.

A diferencia de las facturas comunes, la cancelación de la retención es inmediata y no requiere autorización de parte del receptor.
A diferencia de las facturas comúnes, la cancelación de la retención es inmediata y no requiere autorización de parte del receptor.
Comment thread website/openapi_v2.yaml
Comment on lines +6995 to +6996
Clave que representa el motivo de la cancelación de la retención.
Requerido para retenciones que no son borrador.
Comment thread website/openapi_v2.yaml
Comment on lines +6790 to +6792
import io.facturapi.Facturapi;
import java.util.List;
import java.util.Map;
Comment on lines +6519 to +6523
- draft
- pending
- valid
- canceled
- failed
Comment on lines +6576 to +6578
import io.facturapi.Facturapi;
import java.util.List;
import java.util.Map;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants