Repository navigation
fix: use canonical shipping destination address fields - #97
FanouZeng-TT wants to merge 1 commit into
Conversation
|
Ran this branch against the reference with the python sdk at head: the 52 suite errors persist, because both construction sites still build shipping_destination.ShippingDestination while the post #83 destination unions accept only the request variants, so validation rejects the instance with a model_type error before the renamed fields are reached. On top of this branch, switching create_checkout_payload in integration_test_utils.py to ShippingDestinationCreateRequest and the test_update_checkout site in checkout_lifecycle_test.py to ShippingDestinationUpdateRequest takes the suite from 52 errors to 2. The remaining 2 are the OrderTest failures already red in the nightly since Aug 21, a server side Payment validation error in the reference, unrelated to these fields. |
|
Thanks for testing this against the SDK at head. I updated both construction sites to use the request-specific models: |
213395f to
df144e7
Compare
|
Rebased this branch onto the latest Local verification:
|
Normalize the fixture destination in get_test_destination() so a destination configured with the standard UCP field names (address_locality/address_region) reaches the request intact, and legacy locality/city and region/state keys still populate the standard names. Fixes Universal-Commerce-Protocol#116
df144e7 to
4ca6f93
Compare
|
Updated this PR to also normalize the fixture destination in This closes the gap reported in #116: previously a destination configured with standard field names was silently replaced by the default locality. Verified offline against |
Description
ShippingDestinationinherits the canonical address fieldsaddress_localityandaddress_region. The conformance helpers instead passedlocalityandregionwhen creating destinations:The model accepts extra fields, so those names are serialized as non-contract
keys while
address_localityandaddress_regionremain unset. The samemismatch appears in the checkout-update lifecycle destination.
Fix: pass the canonical address field names in both construction paths.
A direct serialization regression confirms that the old keys omit the canonical
fields, while the corrected fields serialize exclusively as
address_localityandaddress_region.Type of change
Is this a Breaking Change or Removal?
N/A — fixes conformance test request construction without removing schema fields.
Checklist