Skip to content

[ONB-4538] [Compose] Add v2 customers update - #148

Merged
FranciscaOtero merged 2 commits into
masterfrom
compose/customers-update-3502
Nov 24, 2026
Merged

FranciscaOtero merged 2 commits into
masterfrom
compose/customers-update-3502

Conversation

@FranciscaOtero

@FranciscaOtero FranciscaOtero commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

The public API now lets merchants replace a customer's metadata (PATCH /v2/customers/{id}, fintoc-com/fintoc-rails#22020). This PR exposes it in the SDK:

customer = client.v2.customers.update("cus_...", metadata={"channel": "digital"})
customer.update(metadata={...})  # also works on a returned Customer

Reviewed the rest of the public API diff (fintoc-rails abfc7e72 → 5da5cf24, pacioli a9adf6ff → 4ec1a96e); none of it needs SDK changes:

  • New response fields (payment_method.card.bank/bin/holder_name/holder_tax_id/institution_id, fintoc-com/fintoc-rails#21935, #22122, #22263; payment_intent.payment_method_details.card.bin/holder_name/holder_tax_id/institution_id on payment intents and checkout sessions, #22068, #22122, #22263): resources are built dynamically, and the nested holder_tax_id object becomes a generic resource.
  • New enum values (setup_intent.error_reason: identity_verification_failed, expired, #21892; insufficient_balance in transfer.error_reason and account_verification.reason, fintoc-com/pacioli#4396): plain strings in the SDK.
  • New request param mx_direct_debit[account_holder][phone] on POST /v2/payment_methods (#21943): kwargs pass through as-is, including the multipart flattening for payment methods.
  • New errors (429 rate_limit_exceeded on webhook endpoints, #21510; 403 product_access_required on entities, #20996; 400 invalid_phone_number on payment methods, #21943): mapped by the generic error handling.
  • Validation/semantics/docs only (zero-amount invoice lines, #21739; Chile certificates, #21873; subscription item interval_count, #21688; installments only in Chile, #21950; payment_intent.payment_method semantics, #22062; example-only changes): no SDK impact.

Left out:

  • Nothing from this API diff.
  • A pre-existing bug: responses whose nested objects (e.g. metadata) contain a client, handlers, methods or path key raise TypeError when building the resource, for every resource and operation. It needs a change in the shared ResourceMixin (positional-only params aren't available while the package supports Python 3.7), so it's left for a separate fix.
  • CI currently fails in every GitHub-hosted job at "Set up Python": ubuntu-latest now resolves to Ubuntu 26.04, where 3.10.6 isn't available. Unrelated to this branch; it affects every PR.

Tests: integration tests with mocked HTTP. Locally: full pytest suite, black and isort pass.

Release notes

  • Added client.v2.customers.update(id, metadata=...) to replace a customer's metadata.

Requirements

None.

Additional changes

None.

Co-authored-by: fin-compose[bot] <255610621+fin-compose[bot]@users.noreply.github.com>
@FranciscaOtero FranciscaOtero added the agent:compose PR created by Compose AI agent label Nov 23, 2026
@FranciscaOtero FranciscaOtero self-assigned this Nov 23, 2026
@fin-hermes fin-hermes Bot added the size/S label Nov 23, 2026
@FranciscaOtero FranciscaOtero added the release:minor Publica una versión minor al mergear label Nov 23, 2026
@FranciscaOtero

Copy link
Copy Markdown
Contributor Author

fin review

@fin-hermes fin-hermes Bot added the risk:low label Nov 23, 2026
Comment thread fintoc/managers/v2/customers_manager.py Resolved
@FranciscaOtero

Copy link
Copy Markdown
Contributor Author

fin review

@fin-review fin-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No hay findings nuevos. Los anteriores siguen vigentes: corrígelos o, si no aplican, resuelve su thread.

@FranciscaOtero
FranciscaOtero marked this pull request as ready for review November 24, 2026 12:44
Comment thread fintoc/managers/v2/customers_manager.py Resolved
@FranciscaOtero

Copy link
Copy Markdown
Contributor Author

fin review

@fin-review fin-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No hay findings nuevos. Los anteriores siguen vigentes: corrígelos o, si no aplican, resuelve su thread.

@FranciscaOtero

Copy link
Copy Markdown
Contributor Author

fin review

@fin-review fin-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM ✅

@FranciscaOtero
FranciscaOtero merged commit cf6d8ba into master Nov 24, 2026
11 checks passed
@FranciscaOtero
FranciscaOtero deleted the compose/customers-update-3502 branch November 24, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:compose PR created by Compose AI agent release:minor Publica una versión minor al mergear risk:low size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant