Skip to content

Add VerifiedAccount and VerifiedTransfer resources - #170

Merged
edu-stark merged 2 commits into
masterfrom
feature/sdk-parity-equalization
Sep 17, 2026
Merged

edu-stark merged 2 commits into
masterfrom
feature/sdk-parity-equalization

Conversation

@antoniosilva-stark

Copy link
Copy Markdown
Contributor

Brings sdk-python to full resource parity with sdk-node (43/43), the reference SDK.

Resources included

  • VerifiedAccountcreate, get, cancel, query, page + Log (get, query, page)
  • VerifiedTransfercreate (reuses transfer.Rule)

Contract source

Fields, methods, query filters and docstrings were taken from sdk-node at 7e70ecb, converted to snake_case and to the Python docstring convention. A code review compared every field and filter against the reference and found no divergence.

Verification performed

  • python3 -c "import starkbank" resolves starkbank.VerifiedAccount and starkbank.VerifiedTransfer
  • py_compile clean on every new file
  • Code review per resource, with the findings applied

Not verified

Tests were written but not executed — no sandbox credentials were available in the environment where this was produced. SANDBOX_ID, SANDBOX_PRIVATE_KEY and the organization pair are required. Please run tests/sdk/test_verified_account.py, test_verified_account_log.py and test_verified_transfer.py before merging.

Review notes

  • Log.account is parsed into a VerifiedAccount via from_api_json, following the invoicepullrequest neighbour. The Node reference assigns the field raw.
  • Test fixtures use the reference's fixed tax ids (911.544.440-66, 039.946.040-36) rather than a generator. An earlier draft used TaxIdGenerator.taxId(), which returns a CNPJ about half the time and made the suite non-deterministic.

🤖 Generated with Claude Code

edu-stark
edu-stark previously approved these changes Sep 17, 2026
antoniosilva-stark and others added 2 commits September 16, 2026 22:51
…count_type

The suite created five Verified Accounts for one fixed CPF while the API
allows three per tax ID per 24 hours, so test_verified_transfer failed on
this PR's own CI run. Bank-detail accounts now mint a distinct valid CPF per
creation and the pix-key account is created once per run.

VerifiedTransfer sent account_type, which the API's whitelist rejects as an
unknown parameter; the parameter is removed from the resource and the
fixture. The fixture also stops sending scheduled=datetime.now() (naive local
time stamped as UTC). Four log docstring bullets gain the colon the grammar
requires, and the README index lists the two new resources.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@edu-stark
edu-stark force-pushed the feature/sdk-parity-equalization branch from 302b6e0 to e14472f Compare September 17, 2026 01:53
edu-stark
edu-stark previously approved these changes Sep 17, 2026

@edu-stark edu-stark 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.

Rebased onto master (the PR now runs the offline CI checks) and fixed the test failure: the suite created five Verified Accounts for one CPF against the API's three-per-tax-ID-per-24h cap — bank-detail accounts now mint a distinct valid CPF per creation and the pix-key account is created once per run. Also removed account_type (rejected by the API whitelist) from the VerifiedTransfer resource and fixture, dropped the naive scheduled=datetime.now(), added the four missing docstring colons and the README index bullets. Offline: compileall, flake8 E9/F63/F7/F82, import and fixture construction verified in a venv. Note: my approval does not satisfy the ruleset since I pushed last.

@edu-stark
edu-stark merged commit 7e817fa into master Sep 17, 2026
4 checks passed
@edu-stark
edu-stark deleted the feature/sdk-parity-equalization branch September 17, 2026 02:03
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.

2 participants