fix: use canonical shipping destination address fields - #97
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: |
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