diff --git a/.cspell/custom-words.txt b/.cspell/custom-words.txt index 0a4b07d..16af9a4 100644 --- a/.cspell/custom-words.txt +++ b/.cspell/custom-words.txt @@ -38,6 +38,8 @@ Visa Wayfair Worldpay Zalando +absl +absltest adyen agentic atok @@ -52,6 +54,7 @@ fontawesome fpan fulfillable gpay +healthz ingestions inlinehilite linenums @@ -75,4 +78,4 @@ shopify superfences vulnz yaml -yml \ No newline at end of file +yml diff --git a/integration_test_utils.py b/integration_test_utils.py index 8c53e97..77e3519 100644 --- a/integration_test_utils.py +++ b/integration_test_utils.py @@ -778,7 +778,25 @@ def update_checkout_session( """ # Default to existing values if not provided - currency = currency if currency is not None else checkout_obj.currency + if currency is None: + currency = checkout_obj.currency + + def to_json(obj): + if obj is not None and hasattr(obj, "model_dump"): + return obj.model_dump(mode="json", exclude_none=True) + return obj + + if buyer is None: + buyer = to_json(getattr(checkout_obj, "buyer", None)) + + if fulfillment is None: + fulfillment = to_json(getattr(checkout_obj, "fulfillment", None)) + + if discounts is None: + discounts = to_json(getattr(checkout_obj, "discounts", None)) + + if platform is None: + platform = to_json(getattr(checkout_obj, "platform", None)) # Construct Line Items if line_items is None: