Use canonical country identifier - #13815
Draft
cttsai-stripe wants to merge 1 commit into
Draft
Conversation
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com> Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
cttsai-stripe
force-pushed
the
cttsai/mobilesdk-4667-remove-custom-country-path
branch
from
August 6, 2026 23:11
bfc4b5f to
42ab186
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CountrySpecnow collects country values under the canonicalIdentifierSpec.Countrykey. A schema-providedapi_pathis no longer used as the runtime country-field identifier.JIRA: MOBILESDK-4667
What changed
CountrySpec.transform()creates its country field withIdentifierSpec.Country.IdentifierSpec.Country.CountrySpecno longer declares anapi_path; only API-path-backed specifications retain that field.What stays the same
Motivation
Current Android payment-method forms collect country at
billing_details[address][country]. Removing the unused configurable runtime path keeps that contract explicit before the shared billing-address migration in #13723.Coverage
LpmSerializerTestlimits custom and default API-path assertions to specifications that actually own an API path.TransformSpecToElementsTestasserts CountrySpec's canonical country-only collection, while the dependent migration tests cover Klarna, Klarna without a form, Wero, payment-method metadata, and FormViewModel behavior.Testing
./gradlew :payments-ui-core:testDebugUnitTest --tests 'com.stripe.android.ui.core.elements.LpmSerializerTest' :paymentsheet:testDebugUnitTest --tests 'com.stripe.android.lpmfoundations.luxe.TransformSpecToElementsTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.PaymentMethodMetadataTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.definitions.KlarnaDefinitionTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.definitions.KlarnaDefinitionNoFormTest' --tests 'com.stripe.android.lpmfoundations.paymentmethod.definitions.WeroDefinitionTest' --tests 'com.stripe.android.paymentsheet.forms.FormViewModelTest'passed../gradlew :payments-ui-core:detekt :payments-ui-core:apiCheck :paymentsheet:detekt :paymentsheet:apiCheckpassed.git diff --checkpassed.Screenshots
None. No visual change is expected.
Changelog
N/A. No customer-visible change.