diff --git a/checkout_lifecycle_test.py b/checkout_lifecycle_test.py index 44bba18..d738135 100644 --- a/checkout_lifecycle_test.py +++ b/checkout_lifecycle_test.py @@ -30,10 +30,10 @@ ) from ucp_sdk.models.schemas.shopping.types import ( fulfillment_method_update_request, + item_update_request, + line_item_update_request, + shipping_destination_update_request, ) -from ucp_sdk.models.schemas.shopping.types import item_update_request -from ucp_sdk.models.schemas.shopping.types import line_item_update_request -from ucp_sdk.models.schemas.shopping.types import shipping_destination # Rebuild models to resolve forward references checkout.Checkout.model_rebuild(_types_namespace={"Payment": Payment}) @@ -126,13 +126,15 @@ def test_update_checkout(self): phone_number="+15555555556", ) - new_destination = shipping_destination.ShippingDestination( - id="dest_2", - address_country="US", - postal_code="90210", - locality="Beverly Hills", - region="CA", - street_address="456 Elm St", + new_destination = ( + shipping_destination_update_request.ShippingDestinationUpdateRequest( + id="dest_2", + address_country="US", + postal_code="90210", + locality="Beverly Hills", + region="CA", + street_address="456 Elm St", + ) ) existing_method = checkout_obj.fulfillment["methods"][0] diff --git a/integration_test_utils.py b/integration_test_utils.py index 826a018..f3368ab 100644 --- a/integration_test_utils.py +++ b/integration_test_utils.py @@ -48,7 +48,9 @@ from ucp_sdk.models.schemas.shopping.types import line_item_create_request from ucp_sdk.models.schemas.shopping.types import line_item_update_request from ucp_sdk.models.schemas import payment_handler -from ucp_sdk.models.schemas.shopping.types import shipping_destination +from ucp_sdk.models.schemas.shopping.types import ( + shipping_destination_create_request, +) import uvicorn @@ -889,15 +891,19 @@ def create_checkout_payload( if include_fulfillment: # Hierarchical Fulfillment Construction using dynamic destination dest_data = ctx.get_test_destination() - destination = shipping_destination.ShippingDestination( - id="dest_1", - address_country=dest_data.get( - "address_country", dest_data.get("country", "US") - ), - postal_code=dest_data.get("postal_code", "94105"), - locality=dest_data.get("locality", dest_data.get("city")), - region=dest_data.get("region", dest_data.get("state")), - street_address=dest_data.get("street_address", dest_data.get("street")), + destination = ( + shipping_destination_create_request.ShippingDestinationCreateRequest( + id="dest_1", + address_country=dest_data.get( + "address_country", dest_data.get("country", "US") + ), + postal_code=dest_data.get("postal_code", "94105"), + locality=dest_data.get("locality", dest_data.get("city")), + region=dest_data.get("region", dest_data.get("state")), + street_address=dest_data.get( + "street_address", dest_data.get("street") + ), + ) ) group = fulfillment_group_create_request.FulfillmentGroupCreateRequest( id="group_1", diff --git a/pyproject.toml b/pyproject.toml index 1eca52d..c5787c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "absl-py>=1.0.0", "httpx>=0.26.0", "pydantic>=2.12.0", - "ucp-sdk==0.4.4", + "ucp-sdk==0.4.6", "fastapi>=0.109.0", "uvicorn[standard]>=0.38.0", "ruff>=0.14.11",