Skip to content

Update generated code for private-preview - #1893

Open
stripe-openapi[bot] wants to merge 7 commits into
private-previewfrom
latest-codegen-private-preview
Open

Update generated code for private-preview#1893
stripe-openapi[bot] wants to merge 7 commits into
private-previewfrom
latest-codegen-private-preview

Conversation

@stripe-openapi

@stripe-openapi stripe-openapi Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Codegen for openapi v2455 and v2 openapi 668589296b587cb6b843b19716fb0990f1f2208f.

Changelog

  • Add support for create, deactivate, list, modify, and retrieve methods on resource billing.FeedbackOption
  • Add support for disable_stripe_user_authentication on AccountSessionCreateParamsComponentPaymentMethodSettingFeature
  • Add support for capital_financing_manual_payment on AccountSession.Component
  • Add support for sequra_payments on Account.Capability
  • Add support for feedback_options on billing_portal.ConfigurationCreateParamsFeatureSubscriptionCancelCancellationReason and billing_portal.ConfigurationModifyParamsFeatureSubscriptionCancelCancellationReason
  • Add support for new value fundbox_ca_financing on enum Capital.FinancingSummary.Detail.disclaimer_variant
  • Add support for sequra on Charge.PaymentMethodDetail, Checkout.Session.PaymentMethodOption, ConfirmationToken.PaymentMethodPreview, PaymentAttemptRecord.PaymentMethodDetail, PaymentIntent.PaymentMethodOption, and PaymentRecord.PaymentMethodDetail
  • ⚠️ Remove support for value data_share_only from enums Charge.PaymentMethodDetail.Card.ThreeDSecure.result, PaymentAttemptRecord.PaymentMethodDetail.Card.ThreeDSecure.result, PaymentRecord.PaymentMethodDetail.Card.ThreeDSecure.result, and SetupAttempt.PaymentMethodDetail.Card.ThreeDSecure.result
  • Add support for funding_types_blocked on checkout.SessionCreateParamsPaymentMethodOptionCardRestriction
  • Add support for payment_intent_data on checkout.SessionModifyParams
  • ⚠️ Change type of Checkout.Session.PaymentMethodOption.Bancontact.setup_future_usage from literal('none') to enum('none'|'off_session')
  • Add support for new value sequra on enums ConfirmationTokenCreateParamsPaymentMethodDatum.type, PaymentIntentConfirmParamsPaymentMethodDatum.type, PaymentIntentCreateParamsPaymentMethodDatum.type, PaymentIntentModifyParamsPaymentMethodDatum.type, SetupIntentConfirmParamsPaymentMethodDatum.type, SetupIntentCreateParamsPaymentMethodDatum.type, and SetupIntentModifyParamsPaymentMethodDatum.type
  • Add support for metadata on ConfirmationToken
  • Add support for new value sequra on enums ConfirmationToken.PaymentMethodPreview.type and PaymentMethod.type
  • Add support for active_entitlements and customer_portal on CustomerSessionCreateParamsComponent
  • Add support for new value sequra on enums CustomerListPaymentMethodsParams.type, PaymentMethodCreateParams.type, and PaymentMethodListParams.type
  • Add support for address_match_confidence and name_match_confidence on Identity.VerificationReport.Email and Identity.VerificationReport.Phone
  • Add support for domain_country, email_exists_confidence, observed_domain_tenure_days, observed_email_tenure_days, and phone_match_confidence on Identity.VerificationReport.Email
  • Add support for new values email_address_mismatch, email_name_mismatch, email_ownership_unverified, email_phone_mismatch, and email_short_tenure on enum Identity.VerificationReport.Email.Error.code
  • Add support for carrier, line_type, and observed_phone_tenure_days on Identity.VerificationReport.Phone
  • Add support for new values phone_address_mismatch, phone_invalid_line_type, phone_invalid, phone_name_mismatch, phone_ownership_unverified, phone_short_tenure, and phone_unsupported_country on enum Identity.VerificationReport.Phone.Error.code
  • Add support for new values email_address_mismatch, email_name_mismatch, email_ownership_unverified, email_phone_mismatch, email_short_tenure, phone_address_mismatch, phone_invalid_line_type, phone_invalid, phone_name_mismatch, phone_ownership_unverified, phone_short_tenure, and phone_unsupported_country on enum Identity.VerificationSession.LastError.code
  • Add support for new value truemoney on enums Invoice.PaymentSetting.payment_method_types, InvoiceCreateParamsPaymentSetting.payment_method_types, InvoiceModifyParamsPaymentSetting.payment_method_types, QuotePreviewInvoice.PaymentSetting.payment_method_types, Subscription.PaymentSetting.payment_method_types, SubscriptionCreateParamsPaymentSetting.payment_method_types, and SubscriptionModifyParamsPaymentSetting.payment_method_types
  • Change type of PaymentAttemptRecordReportCanceledParams.reason and PaymentRecordReportPaymentAttemptCanceledParams.reason from literal('blocked_for_fraud') to enum('blocked_for_fraud'|'merchant_canceled')
  • ⚠️ Remove support for payment_method_types on PaymentIntentConfirmParams, PaymentIntentCreateParams, PaymentIntentModifyParams, SetupIntentCreateParams, and SetupIntentModifyParams
  • Add support for new value touch_n_go on enums PaymentIntent.allowed_payment_method_types, PaymentIntentConfirmParams.allowed_payment_method_types, PaymentIntentCreateParams.allowed_payment_method_types, PaymentIntentModifyParams.allowed_payment_method_types, SetupIntent.allowed_payment_method_types, SetupIntentConfirmParams.allowed_payment_method_types, SetupIntentCreateParams.allowed_payment_method_types, and SetupIntentModifyParams.allowed_payment_method_types
  • Add support for new value sequra on enums PaymentIntent.excluded_payment_method_types, PaymentIntentConfirmParams.excluded_payment_method_types, PaymentIntentCreateParams.excluded_payment_method_types, PaymentIntentModifyParams.excluded_payment_method_types, SetupIntent.excluded_payment_method_types, SetupIntentCreateParams.excluded_payment_method_types, and SetupIntentModifyParams.excluded_payment_method_types
  • Change PaymentIntent.allowed_payment_method_types and SetupIntent.allowed_payment_method_types to be required
  • Add support for application_fee_amount, application_fee_percent, on_behalf_of, and transfer_data on PaymentLinkModifyParams
  • Add support for canceled on PaymentRecordReportPaymentAttemptParams and PaymentRecordReportPaymentParams
  • ⚠️ Change type of ProductCatalog.TrialOffer.price from $Price to deletable($Price)
  • ⚠️ Change ProductCatalog.TrialOffer.name to be optional
  • Add support for recurring on SharedPayment.GrantedToken.UsageLimit, SharedPayment.IssuedToken.UsageLimit, shared_payment.GrantedTokenCreateParamsUsageLimit, and shared_payment.IssuedTokenCreateParamsUsageLimit
  • Add support for feedback_option on SubscriptionCancelParamsCancellationDetail and SubscriptionModifyParamsCancellationDetail
  • Add support for pricing_token on SubscriptionModifyParams
  • Add support for igic on tax.RegistrationCreateParamsCountryOptionAt, tax.RegistrationCreateParamsCountryOptionBe, tax.RegistrationCreateParamsCountryOptionBg, tax.RegistrationCreateParamsCountryOptionCy, tax.RegistrationCreateParamsCountryOptionCz, tax.RegistrationCreateParamsCountryOptionDe, tax.RegistrationCreateParamsCountryOptionDk, tax.RegistrationCreateParamsCountryOptionE, tax.RegistrationCreateParamsCountryOptionEe, tax.RegistrationCreateParamsCountryOptionFi, tax.RegistrationCreateParamsCountryOptionFr, tax.RegistrationCreateParamsCountryOptionGr, tax.RegistrationCreateParamsCountryOptionHr, tax.RegistrationCreateParamsCountryOptionHu, tax.RegistrationCreateParamsCountryOptionIe, tax.RegistrationCreateParamsCountryOptionIt, tax.RegistrationCreateParamsCountryOptionLt, tax.RegistrationCreateParamsCountryOptionLu, tax.RegistrationCreateParamsCountryOptionLv, tax.RegistrationCreateParamsCountryOptionMt, tax.RegistrationCreateParamsCountryOptionNl, tax.RegistrationCreateParamsCountryOptionPl, tax.RegistrationCreateParamsCountryOptionPt, tax.RegistrationCreateParamsCountryOptionRo, tax.RegistrationCreateParamsCountryOptionSe, tax.RegistrationCreateParamsCountryOptionSi, and tax.RegistrationCreateParamsCountryOptionSk
  • Add support for new value 2026-08-26.dahlia on enum WebhookEndpointCreateParams.api_version
  • Add support for error codes authentication_failure, capability_not_active, expired_payment_method, incorrect_postal_code, invalid_canceled_subscription_fields, and payment_method_restricted on Invoice.LastFinalizationError, PaymentIntent.LastPaymentError, QuotePreviewInvoice.LastFinalizationError, SetupAttempt.SetupError, SetupIntent.LastSetupError, StripeError, and Terminal.Reader.Action.ApiError

stripe-openapi Bot and others added 2 commits August 26, 2026 16:41
…8788c6f (#1876)

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
@stripe-openapi
stripe-openapi Bot requested a review from a team as a code owner August 27, 2026 08:04
@stripe-openapi
stripe-openapi Bot requested review from xavdid and removed request for a team and xavdid August 27, 2026 08:04
@stripe-openapi
stripe-openapi Bot enabled auto-merge August 27, 2026 08:04
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch 6 times, most recently from 3560931 to 953f84f Compare August 27, 2026 17:10
jar-stripe and others added 3 commits August 27, 2026 15:10
* Add zizmor config scoping the ref-pin policy to the stripe namespace

Actions under stripe/* are first-party and tracked on a branch on purpose,
so requiring a commit hash for them would be churn without a security gain.
Scoping the policy to that namespace keeps the blanket hash requirement in
force for every third-party action.

This lands before the pins so the auto-fixer honours the policy and leaves
stripe/openapi/actions/* alone rather than hash-pinning them for a revert.

Committed-By-Agent: claude

* Pin GitHub Actions references to commit hashes

A tag is a mutable pointer, so any action referenced by tag can change what
CI executes without a commit here. Pinning to a full commit hash makes the
reference immutable and the version comment auditable.

Thirteen of the fourteen pins came from the auto-fixer; every hash was then
resolved against its claimed tag through the GitHub API before committing.

pypa/gh-action-pypi-publish was pinned by hand because the auto-fixer cannot
resolve a version for a branch reference. It tracked release/v1, whose head is
currently tag v1.14.2, so the pin is both immutable and current. Dependabot
would be the mechanism to keep it moving.

Also sets persist-credentials: false on all three checkouts. The default leaves
the workflow token in .git/config for the rest of the job, where any later step
can read it; none of these jobs push, so nothing needs it retained.

Committed-By-Agent: claude

* Upgrade pinned actions off end-of-life runtimes

Pinning froze these at the versions master happened to reference, and four of
the five were on a Node runtime GitHub force-migrates, which every job warns
about today:

  extractions/setup-just  v2.0.0 -> v4.0.0
  actions/checkout        v3.7.0 -> v7.0.1   (node16 -> node24)
  actions/setup-python    v4.9.1 -> v7.0.0   (node16 -> node24)
  actions/upload-artifact v4.6.2 -> v7.0.1   (node20 -> node24)
  actions/download-artifact v4.3.0 -> v8.0.1 (node20 -> node24)

The artifact pair moves together on purpose: build uploads dist and publish
downloads it, and upload v7 / download v8 are the majors upstream ships as a
pair. download-artifact v5's breaking change is scoped to downloads by ID; this
one downloads by name, so it does not apply. v8 skips decompression based on
Content-Type, which only diverges when the uploader sets archive: false, and
this workflow does not.

setup-python's cache input has no default in v7, unlike setup-node's
package-manager-cache from v5 onward, so the upgrade adds no cache surface to
audit. v7 drops the pip-install input, which this workflow never set.

All five majors require Actions runner 2.327.1 or later, which the
GitHub-hosted runners this workflow uses already satisfy.

Committed-By-Agent: claude

* document download-artifact v8 digest-mismatch behavior

v8 fails the job on an artifact digest mismatch where v4 only logged a
warning. The publish job is tag-gated, so CI never exercises it — the
first person to see this failure will be mid-release, and the escape
hatch should be next to the code rather than in a PR body.

Committed-By-Agent: claude

* Add zizmor workflow security check

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Add temporary release workflow probe

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Remove temporary release workflow probe

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: codex <noreply@openai.com>
* Add discriminated union serialization tests

Tests discriminated union type shapes for both request-side (TypedDict
params with Literal discriminator) and response-side (StripeObject
deserialization), covering standalone and inline variants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude

* Clarify test docstring scope and dict() comment

The module docstring now explicitly states these tests exercise runtime
semantics (dict construction, field access, round-trip), not static type
narrowing. The dict() comment explains what it's actually testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude

* Rewrite DU tests: correct inline pattern + route through _api_encode

Inline union tests now use the flattened TypedDict pattern (discriminator
and per-variant payload fields on the parent) rather than the incorrect
per-variant TypedDicts-with-type-field pattern that was there before.

Request-side tests now exercise `_api_encode` so they verify real SDK
encoding behavior (bracket notation, nested dicts) rather than just dict
construction and key lookup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude

* Dispatch discriminated union fields to their variant class

A discriminated union field arrived as a dict with no class attached, so it
became a bare StripeObject. That object carries no `_field_encodings`, so an
int64 or decimal field inside a variant stayed a string — `luminance` came
back as "1500" rather than 1500.

Codegen already emits `_inner_class_union_variant_types` on the parent
(`{"color": ("model", {"rgb": RgbColor, ...})}`); nothing read it. Consume it
in `_update_attributes` so the discriminator inside the value selects the
variant class, which then applies its own encodings.

Mirrors stripe-ruby#1923. Falls back to a plain StripeObject when the
discriminator is absent, is not a string, or names a variant this release
does not know, so a variant the API adds later still deserializes.

Rewrites tests/test_discriminated_unions.py, which could not detect any of
this: every response-side test ran `StripeObject.construct_from` on the base
class with no variant map, so all seven passed identically against `{"foo":
1}`. The fixtures now mirror the generated shape — two color variants with
*different* encodings — so identical wire bytes hydrate differently based
only on the discriminator. Seven of the 24 tests fail with the dispatch line
reverted.

The request side moves from `_api_encode` to `_coerce_v2_params`.
`_api_encode` is v1 form encoding, which treats any dict identically and so
asserted nothing about unions; v2 requests coerce through the method-level
schema. One test pins the generator's deliberate flattening of variants into
one field-name-keyed map.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Committed-By-Agent: claude

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Replace --quiet with stdout redirection. Ruff's --quiet flag suppresses
all output including parse errors (e.g. merge markers), making format
failures in CI impossible to diagnose. Redirecting stdout to /dev/null
suppresses the file list but lets errors (which go to stderr) through.


Committed-By-Agent: claude

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch from 953f84f to d01d95c Compare August 28, 2026 19:45
private-preview's ci.yml differs from master's by one additive hunk:
`private-preview` in `on.push.branches`.

Because that hunk lives only on private-preview, every merge of master into
private-preview yields a workflow blob matching neither parent. GitHub refuses a
push from a GitHub App lacking `workflows` permission when it introduces a
workflow blob that does not already exist in the repository, so the codegen repo's
Codegen job's push to latest-codegen-private-preview is rejected and a human has
to perform the merge by hand. Holding the hunk on master too means both sides of
the merge carry the same change, the merge result is byte-identical to master's
blob, and the App only ever carries an already-committed file forward.

The hunk is a no-op on master. For a push event the workflow file comes from the
pushed ref, so master's copy listing private-preview is never consulted for a
push to private-preview, and it cannot affect pushes to master or beta.
`on.pull_request.branches` already lists private-preview.


Committed-By-Agent: claude

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch 4 times, most recently from 26bfa03 to c1dba90 Compare August 31, 2026 15:11
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch from c1dba90 to 42d48ae Compare August 31, 2026 15:27
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