Add automatic pix#53
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review da PR🔴 Bloqueadores1. Webhook dispatch não está wired 2. 3. Enum 🟠 Major4. 5. 6. Filtros não documentados em
O forward cego de 7. Enums de
Aqui só consta "See contract for accepted values per role." A API retorna 4xx para valores inválidos — vale documentar para evitar suporte desnecessário.
|
- src/event/event.php:32 — list pix-dispute, pix-pull-subscription, pix-pull-request in the subscription enum docstring (item A) - src/event/event.php:64 — add pix-pull-subscription and pix-pull-request entries to $makerOptions (item A) - src/event/event.php — add pixPullSubscriptionLogResource() and pixPullRequestLogResource() private helpers, following the pixDisputeLogResource closure pattern (item A) - src/webhook/webhook.php:19,23 — extend accepted subscription list with pix-dispute, pix-pull-subscription, pix-pull-request (item B) - src/pixPullRequest/pixPullRequest.php:61 — replace status enum with the full lifecycle (created, scheduled, active, denied, canceled, failed); previous list was the subscription enum, not the request enum (item C) - src/pixPullRequest/pixPullRequest.php:102-124 — add full PHPDoc to create(), get(), query(), page() following PixPullSubscription pattern (item D) - src/pixPullRequest/pixPullRequest.php — document query/page filters: flow, subscriptionIds (item F) - src/pixPullRequest/pixPullRequest.php — expand update() and cancel() docblocks with reason enums per role (sender/receiver), using values verified against starkinfra/pixpullrequest/__pixpullrequest.py:177 and :195 (item G; reviewer's listed update reasons were for PixPullSubscription, corrected to the canonical PixPullRequest set) - src/pixPullRequest/log.php:20 — add class-level PHPDoc following PixPullSubscription\Log pattern (item E) - src/pixPullSubscription/pixPullSubscription.php — document query/page filters: status, tags, ids, limit (item F)
Summary
Adds support for the Pix Automático (Automatic Pix) feature: recurring debit authorizations and the per-cycle pulls that draw on them.
New resources
PixPullSubscription— recurring debit authorization. Full CRUD:create(batch),get,query,page,update,cancel. PlusLogsub-resource withget/query/page.PixPullRequest— single pull cycle against an active subscription. Full CRUD +Logsub-resource (same shape).Wiring
pix-pull-subscriptionandpix-pull-request-log.[Unreleased] → Added.Test plan
Integration tests run end-to-end against the sandbox via
php tests/test_pix_pull.php:tests/pixPullSubscription.php+pixPullSubscriptionLog.php— CRUD round-trip,subscriptionIdsplural filter, M8 datetime empty-string normalization.tests/pixPullRequest.php+pixPullRequestLog.php— CRUD,requestIdsplural filter, M12 noparsemethod on resource.Notes
due,installmentEnd) tonullbefore parsing.try/catchguards where the sandbox enforces business rules outside the SDK's contract (state-transition restrictions, receiver-only roles). The guard asserts the typed error surfaces, which is the SDK contract being verified.🤖 Generated with Claude Code