File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838Wayfair
3939Worldpay
4040Zalando
41+ absl
42+ absltest
4143adyen
4244agentic
4345atok
@@ -52,6 +54,7 @@ fontawesome
5254fpan
5355fulfillable
5456gpay
57+ healthz
5558ingestions
5659inlinehilite
5760linenums
@@ -75,4 +78,4 @@ shopify
7578superfences
7679vulnz
7780yaml
78- yml
81+ yml
Original file line number Diff line number Diff line change @@ -778,7 +778,25 @@ def update_checkout_session(
778778
779779 """
780780 # Default to existing values if not provided
781- currency = currency if currency is not None else checkout_obj .currency
781+ if currency is None :
782+ currency = checkout_obj .currency
783+
784+ def to_json (obj ):
785+ if obj is not None and hasattr (obj , "model_dump" ):
786+ return obj .model_dump (mode = "json" , exclude_none = True )
787+ return obj
788+
789+ if buyer is None :
790+ buyer = to_json (getattr (checkout_obj , "buyer" , None ))
791+
792+ if fulfillment is None :
793+ fulfillment = to_json (getattr (checkout_obj , "fulfillment" , None ))
794+
795+ if discounts is None :
796+ discounts = to_json (getattr (checkout_obj , "discounts" , None ))
797+
798+ if platform is None :
799+ platform = to_json (getattr (checkout_obj , "platform" , None ))
782800
783801 # Construct Line Items
784802 if line_items is None :
You can’t perform that action at this time.
0 commit comments