Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .cspell/custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Visa
Wayfair
Worldpay
Zalando
absl
absltest
adyen
agentic
atok
Expand All @@ -52,6 +54,7 @@ fontawesome
fpan
fulfillable
gpay
healthz
ingestions
inlinehilite
linenums
Expand All @@ -75,4 +78,4 @@ shopify
superfences
vulnz
yaml
yml
yml
20 changes: 19 additions & 1 deletion integration_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading