diff --git a/Package.resolved b/Package.resolved index e5d0861b..0cf6bfc4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,15 @@ { + "originHash" : "26dbcafccf3b59eed474185fd06890aec2eacb608722f803008729da6a0bfe0d", "pins" : [ + { + "identity" : "apollo-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apollographql/apollo-ios.git", + "state" : { + "revision" : "5a8d18cc239dd3c4b31c9e13e671dbcef5e4072a", + "version" : "2.2.0" + } + }, { "identity" : "viewinspector", "kind" : "remoteSourceControl", @@ -10,5 +20,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/platforms/swift/api/EmbeddedCheckoutProtocol.json b/platforms/swift/api/EmbeddedCheckoutProtocol.json index f0ea7e91..d59c8b49 100644 --- a/platforms/swift/api/EmbeddedCheckoutProtocol.json +++ b/platforms/swift/api/EmbeddedCheckoutProtocol.json @@ -3960,21 +3960,35 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals?", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]?", "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], "usr": "s:Sq" } ], "declKind": "Var", - "usr": "s:24EmbeddedCheckoutProtocol0B0V7signalsAA7SignalsVSgvp", - "mangledName": "$s24EmbeddedCheckoutProtocol0B0V7signalsAA7SignalsVSgvp", + "usr": "s:24EmbeddedCheckoutProtocol0B0V7signalsSDySSAA7JSONAnyCGSgvp", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V7signalsSDySSAA7JSONAnyCGSgvp", "moduleName": "EmbeddedCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -3990,21 +4004,35 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals?", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]?", "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], "usr": "s:Sq" } ], "declKind": "Accessor", - "usr": "s:24EmbeddedCheckoutProtocol0B0V7signalsAA7SignalsVSgvg", - "mangledName": "$s24EmbeddedCheckoutProtocol0B0V7signalsAA7SignalsVSgvg", + "usr": "s:24EmbeddedCheckoutProtocol0B0V7signalsSDySSAA7JSONAnyCGSgvg", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V7signalsSDySSAA7JSONAnyCGSgvg", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -5406,13 +5434,27 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals?", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]?", "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], "usr": "s:Sq" @@ -5445,35 +5487,125 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol0B0V11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSg_AA5BuyerVSgAA7ContextVSgSSSgSSAA0B9DiscountsVSg10Foundation4DateVSgAA0B11FulfillmentVSgSSSayAA8LineItemVGSayAA4LinkVGSayAA7MessageVGSgAA17OrderConfirmationVSgAA7PaymentVSgAA7SignalsVSgAA0B6StatusOSayAA0B5TotalVGAA25UCPCheckoutResponseSchemaVtcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol0B0V11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSg_AA5BuyerVSgAA7ContextVSgSSSgSSAA0B9DiscountsVSg10Foundation4DateVSgAA0B11FulfillmentVSgSSSayAA8LineItemVGSayAA4LinkVGSayAA7MessageVGSgAA17OrderConfirmationVSgAA7PaymentVSgAA7SignalsVSgAA0B6StatusOSayAA0B5TotalVGAA25UCPCheckoutResponseSchemaVtcfc", + "usr": "s:24EmbeddedCheckoutProtocol0B0V11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSg_AA5BuyerVSgAA7ContextVSgSSSgSSAA0B9DiscountsVSg10Foundation4DateVSgAA0B11FulfillmentVSgSSSayAA8LineItemVGSayAA4LinkVGSayAA7MessageVGSgAA17OrderConfirmationVSgAA7PaymentVSgSDySSAA7JSONAnyCGSgAA0B6StatusOSayAA0B5TotalVGAA25UCPCheckoutResponseSchemaVtcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSg_AA5BuyerVSgAA7ContextVSgSSSgSSAA0B9DiscountsVSg10Foundation4DateVSgAA0B11FulfillmentVSgSSSayAA8LineItemVGSayAA4LinkVGSayAA7MessageVGSgAA17OrderConfirmationVSgAA7PaymentVSgSDySSAA7JSONAnyCGSgAA0B6StatusOSayAA0B5TotalVGAA25UCPCheckoutResponseSchemaVtcfc", "moduleName": "EmbeddedCheckoutProtocol", "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol0B0V6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol0B0V6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol0B0V20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol0B0V20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol0B0V20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -5497,10 +5629,33 @@ "usr": "s:24EmbeddedCheckoutProtocol0B0V4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol0B0V4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol0B0V6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5928,18 +6083,32 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals??", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]??", "children": [ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals?", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]?", "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], "usr": "s:Sq" @@ -6003,8 +6172,8 @@ } ], "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol0B0V4with11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSgSg_AA5BuyerVSgSgAA7ContextVSgSgSSSgSgA6_AA0B9DiscountsVSgSg10Foundation4DateVSgSgAA0B11FulfillmentVSgSgA6_SayAA8LineItemVGSgSayAA4LinkVGSgSayAA7MessageVGSgSgAA17OrderConfirmationVSgSgAA7PaymentVSgSgAA7SignalsVSgSgAA0B6StatusOSgSayAA0B5TotalVGSgAA25UCPCheckoutResponseSchemaVSgtF", - "mangledName": "$s24EmbeddedCheckoutProtocol0B0V4with11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSgSg_AA5BuyerVSgSgAA7ContextVSgSgSSSgSgA6_AA0B9DiscountsVSgSg10Foundation4DateVSgSgAA0B11FulfillmentVSgSgA6_SayAA8LineItemVGSgSayAA4LinkVGSgSayAA7MessageVGSgSgAA17OrderConfirmationVSgSgAA7PaymentVSgSgAA7SignalsVSgSgAA0B6StatusOSgSayAA0B5TotalVGSgAA25UCPCheckoutResponseSchemaVSgtF", + "usr": "s:24EmbeddedCheckoutProtocol0B0V4with11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSgSg_AA5BuyerVSgSgAA7ContextVSgSgSSSgSgA6_AA0B9DiscountsVSgSg10Foundation4DateVSgSgAA0B11FulfillmentVSgSgA6_SayAA8LineItemVGSgSayAA4LinkVGSgSayAA7MessageVGSgSgAA17OrderConfirmationVSgSgAA7PaymentVSgSgSDySSAA7JSONAnyCGSgSgAA0B6StatusOSgSayAA0B5TotalVGSgAA25UCPCheckoutResponseSchemaVSgtF", + "mangledName": "$s24EmbeddedCheckoutProtocol0B0V4with11attribution5buyer7context11continueURL8currency9discounts9expiresAt11fulfillment2id9lineItems5links8messages5order7payment7signals6status6totals3ucpACSDyS2SGSgSg_AA5BuyerVSgSgAA7ContextVSgSgSSSgSgA6_AA0B9DiscountsVSgSg10Foundation4DateVSgSgAA0B11FulfillmentVSgSgA6_SayAA8LineItemVGSgSayAA4LinkVGSgSayAA7MessageVGSgSgAA17OrderConfirmationVSgSgAA7PaymentVSgSgSDySSAA7JSONAnyCGSgSgAA0B6StatusOSgSayAA0B5TotalVGSgAA25UCPCheckoutResponseSchemaVSgtF", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -6953,43 +7122,133 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol5BuyerV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol5BuyerV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol5BuyerV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol5BuyerV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(from:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Buyer", - "printedName": "EmbeddedCheckoutProtocol.Buyer", - "usr": "s:24EmbeddedCheckoutProtocol5BuyerV" - }, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ { - "kind": "TypeNominal", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol5BuyerV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol5BuyerV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol5BuyerV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol5BuyerV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Buyer", + "printedName": "EmbeddedCheckoutProtocol.Buyer", + "usr": "s:24EmbeddedCheckoutProtocol5BuyerV" + }, + { + "kind": "TypeNominal", "name": "Decoder", "printedName": "any Swift.Decoder", "usr": "s:s7DecoderP" @@ -6999,10 +7258,33 @@ "usr": "s:24EmbeddedCheckoutProtocol5BuyerV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol5BuyerV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol5BuyerV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol5BuyerV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -8499,29 +8781,119 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol7ContextV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol7ContextV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol7ContextV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol7ContextV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol7ContextV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol7ContextV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol7ContextV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol7ContextV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -8545,10 +8917,33 @@ "usr": "s:24EmbeddedCheckoutProtocol7ContextV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol7ContextV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol7ContextV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol7ContextV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -13077,29 +13472,119 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" - } - ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV6encode2toys7Encoder_p_tKF", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -13123,10 +13608,33 @@ "usr": "s:24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol26FulfillmentAvailableMethodV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -14741,29 +15249,119 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentMethodV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentMethodV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentMethodV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentMethodV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentMethodV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentMethodV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentMethodV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentMethodV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -14787,10 +15385,33 @@ "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentMethodV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentMethodV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentMethodV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentMethodV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -20072,29 +20693,119 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol16FulfillmentGroupV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol16FulfillmentGroupV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol16FulfillmentGroupV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol16FulfillmentGroupV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol16FulfillmentGroupV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol16FulfillmentGroupV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol16FulfillmentGroupV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol16FulfillmentGroupV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -20118,10 +20829,33 @@ "usr": "s:24EmbeddedCheckoutProtocol16FulfillmentGroupV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol16FulfillmentGroupV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol16FulfillmentGroupV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol16FulfillmentGroupV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -21546,29 +22280,119 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -21592,32 +22416,55 @@ "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, { - "kind": "Constructor", - "name": "init", - "printedName": "init(data:)", + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", "children": [ { "kind": "TypeNominal", - "name": "FulfillmentOption", - "printedName": "EmbeddedCheckoutProtocol.FulfillmentOption", - "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV" + "name": "Void", + "printedName": "()" }, { "kind": "TypeNominal", - "name": "Data", - "printedName": "Foundation.Data", - "usr": "s:10Foundation4DataV" + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" } ], - "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV4dataAC10Foundation4DataV_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV4dataAC10Foundation4DataV_tKcfc", - "moduleName": "EmbeddedCheckoutProtocol", + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentOption", + "printedName": "EmbeddedCheckoutProtocol.FulfillmentOption", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:24EmbeddedCheckoutProtocol17FulfillmentOptionV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17FulfillmentOptionV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "throwing": true, "init_kind": "Designated" @@ -30996,29 +31843,119 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + }, + { + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "set" + } + ] }, { "kind": "Constructor", @@ -31042,10 +31979,33 @@ "usr": "s:24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV4fromACs7Decoder_p_tKcfc", "mangledName": "$s24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol25SelectedPaymentInstrumentV6encode2toys7Encoder_p_tKF", + "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -31482,406 +32442,117 @@ "init_kind": "Designated" }, { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", + "kind": "Var", + "name": "additionalProperties", + "printedName": "additionalProperties", "children": [ { "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" } ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV6encode2toys7Encoder_p_tKF", + "declKind": "Var", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV20additionalPropertiesSDySSAA7JSONAnyCGvp", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV20additionalPropertiesSDySSAA7JSONAnyCGvp", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "funcSelfKind": "NonMutating" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(from:)", - "children": [ + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "hasStorage": true, + "accessors": [ { - "kind": "TypeNominal", - "name": "PaymentCredential", - "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "declKind": "Accessor", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV20additionalPropertiesSDySSAA7JSONAnyCGvg", + "moduleName": "EmbeddedCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" }, { - "kind": "TypeNominal", - "name": "Decoder", - "printedName": "any Swift.Decoder", - "usr": "s:s7DecoderP" - } - ], - "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV4fromACs7Decoder_p_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV4fromACs7Decoder_p_tKcfc", - "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(data:)", - "children": [ - { - "kind": "TypeNominal", - "name": "PaymentCredential", - "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" - }, - { - "kind": "TypeNominal", - "name": "Data", - "printedName": "Foundation.Data", - "usr": "s:10Foundation4DataV" - } - ], - "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV4dataAC10Foundation4DataV_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV4dataAC10Foundation4DataV_tKcfc", - "moduleName": "EmbeddedCheckoutProtocol", - "isFromExtension": true, - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(_:using:)", - "children": [ - { - "kind": "TypeNominal", - "name": "PaymentCredential", - "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "Encoding", - "printedName": "Swift.String.Encoding", - "hasDefaultArg": true, - "usr": "s:SS10FoundationE8EncodingV" - } - ], - "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV_5usingACSS_SS10FoundationE8EncodingVtKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV_5usingACSS_SS10FoundationE8EncodingVtKcfc", - "moduleName": "EmbeddedCheckoutProtocol", - "isFromExtension": true, - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(fromURL:)", - "children": [ - { - "kind": "TypeNominal", - "name": "PaymentCredential", - "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" - }, - { - "kind": "TypeNominal", - "name": "URL", - "printedName": "Foundation.URL", - "usr": "s:10Foundation3URLV" - } - ], - "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV7fromURLAC10Foundation0G0V_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV7fromURLAC10Foundation0G0V_tKcfc", - "moduleName": "EmbeddedCheckoutProtocol", - "isFromExtension": true, - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "with", - "printedName": "with(type:)", - "children": [ - { - "kind": "TypeNominal", - "name": "PaymentCredential", - "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "hasDefaultArg": true, - "usr": "s:Sq" - } - ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV4with4typeACSSSg_tF", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV4with4typeACSSSg_tF", - "moduleName": "EmbeddedCheckoutProtocol", - "isFromExtension": true, - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "jsonData", - "printedName": "jsonData()", - "children": [ - { - "kind": "TypeNominal", - "name": "Data", - "printedName": "Foundation.Data", - "usr": "s:10Foundation4DataV" - } - ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV8jsonData10Foundation0G0VyKF", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV8jsonData10Foundation0G0VyKF", - "moduleName": "EmbeddedCheckoutProtocol", - "isFromExtension": true, - "throwing": true, - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "jsonString", - "printedName": "jsonString(encoding:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeNominal", - "name": "Encoding", - "printedName": "Swift.String.Encoding", - "hasDefaultArg": true, - "usr": "s:SS10FoundationE8EncodingV" - } - ], - "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", - "moduleName": "EmbeddedCheckoutProtocol", - "isFromExtension": true, - "throwing": true, - "funcSelfKind": "NonMutating" - } - ], - "declKind": "Struct", - "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV", - "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV", - "moduleName": "EmbeddedCheckoutProtocol", - "conformances": [ - { - "kind": "Conformance", - "name": "Decodable", - "printedName": "Decodable", - "usr": "s:Se", - "mangledName": "$sSe" - }, - { - "kind": "Conformance", - "name": "Encodable", - "printedName": "Encodable", - "usr": "s:SE", - "mangledName": "$sSE" - }, - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, - { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, - { - "kind": "TypeDecl", - "name": "Signals", - "printedName": "Signals", - "children": [ - { - "kind": "Var", - "name": "devUcpBuyerIP", - "printedName": "devUcpBuyerIP", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", + "kind": "Accessor", + "name": "Set", + "printedName": "Set()", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV13devUcpBuyerIPSSSgvp", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV13devUcpBuyerIPSSSgvp", - "moduleName": "EmbeddedCheckoutProtocol", - "declAttributes": [ - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ + "name": "Void", + "printedName": "()" + }, { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", + "name": "Dictionary", + "printedName": "[Swift.String : EmbeddedCheckoutProtocol.JSONAny]", "children": [ { "kind": "TypeNominal", "name": "String", "printedName": "Swift.String", "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV13devUcpBuyerIPSSSgvg", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV13devUcpBuyerIPSSSgvg", - "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "devUcpUserAgent", - "printedName": "devUcpUserAgent", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV15devUcpUserAgentSSSgvp", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV15devUcpUserAgentSSSgvp", - "moduleName": "EmbeddedCheckoutProtocol", - "declAttributes": [ - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ + }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "JSONAny", + "printedName": "EmbeddedCheckoutProtocol.JSONAny", + "usr": "s:24EmbeddedCheckoutProtocol7JSONAnyC" } ], - "usr": "s:Sq" + "usr": "s:SD" } ], "declKind": "Accessor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV15devUcpUserAgentSSSgvg", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV15devUcpUserAgentSSSgvg", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV20additionalPropertiesSDySSAA7JSONAnyCGvs", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV20additionalPropertiesSDySSAA7JSONAnyCGvs", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "declAttributes": [ "Transparent" ], - "accessorKind": "get" + "accessorKind": "set" } ] }, @@ -31892,67 +32563,30 @@ "children": [ { "kind": "Var", - "name": "devUcpBuyerIP", - "printedName": "devUcpBuyerIP", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(EmbeddedCheckoutProtocol.Signals.CodingKeys.Type) -> EmbeddedCheckoutProtocol.Signals.CodingKeys", - "children": [ - { - "kind": "TypeNominal", - "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO13devUcpBuyerIPyA2EmF", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO13devUcpBuyerIPyA2EmF", - "moduleName": "EmbeddedCheckoutProtocol" - }, - { - "kind": "Var", - "name": "devUcpUserAgent", - "printedName": "devUcpUserAgent", + "name": "type", + "printedName": "type", "children": [ { "kind": "TypeFunc", "name": "Function", - "printedName": "(EmbeddedCheckoutProtocol.Signals.CodingKeys.Type) -> EmbeddedCheckoutProtocol.Signals.CodingKeys", + "printedName": "(EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys.Type) -> EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys", "children": [ { "kind": "TypeNominal", "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO" }, { "kind": "TypeNominal", "name": "Metatype", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys.Type", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys.Type", "children": [ { "kind": "TypeNominal", "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO" } ] } @@ -31960,8 +32594,8 @@ } ], "declKind": "EnumElement", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO15devUcpUserAgentyA2EmF", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO15devUcpUserAgentyA2EmF", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO4typeyA2EmF", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO4typeyA2EmF", "moduleName": "EmbeddedCheckoutProtocol" }, { @@ -31972,13 +32606,13 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys?", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys?", "children": [ { "kind": "TypeNominal", "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO" } ], "usr": "s:Sq" @@ -31991,8 +32625,8 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8rawValueAESgSS_tcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8rawValueAESgSS_tcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8rawValueAESgSS_tcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8rawValueAESgSS_tcfc", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -32008,13 +32642,13 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys?", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys?", "children": [ { "kind": "TypeNominal", "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO" } ], "usr": "s:Sq" @@ -32027,8 +32661,8 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO11stringValueAESgSS_tcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO11stringValueAESgSS_tcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO11stringValueAESgSS_tcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO11stringValueAESgSS_tcfc", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "init_kind": "Designated" @@ -32041,13 +32675,13 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys?", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys?", "children": [ { "kind": "TypeNominal", "name": "CodingKeys", - "printedName": "EmbeddedCheckoutProtocol.Signals.CodingKeys", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO" + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential.CodingKeys", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO" } ], "usr": "s:Sq" @@ -32060,8 +32694,8 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8intValueAESgSi_tcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8intValueAESgSi_tcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8intValueAESgSi_tcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8intValueAESgSi_tcfc", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "init_kind": "Designated" @@ -32079,8 +32713,8 @@ } ], "declKind": "TypeAlias", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8RawValuea", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8RawValuea", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8RawValuea", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8RawValuea", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true }, @@ -32105,8 +32739,8 @@ } ], "declKind": "Var", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8intValueSiSgvp", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8intValueSiSgvp", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8intValueSiSgvp", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8intValueSiSgvp", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "accessors": [ @@ -32131,8 +32765,8 @@ } ], "declKind": "Accessor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8intValueSiSgvg", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8intValueSiSgvg", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8intValueSiSgvg", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8intValueSiSgvg", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "accessorKind": "get" @@ -32152,8 +32786,8 @@ } ], "declKind": "Var", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8rawValueSSvp", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8rawValueSSvp", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8rawValueSSvp", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8rawValueSSvp", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "accessors": [ @@ -32170,8 +32804,8 @@ } ], "declKind": "Accessor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8rawValueSSvg", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO8rawValueSSvg", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8rawValueSSvg", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO8rawValueSSvg", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -32194,8 +32828,8 @@ } ], "declKind": "Var", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO11stringValueSSvp", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO11stringValueSSvp", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO11stringValueSSvp", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO11stringValueSSvp", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "accessors": [ @@ -32212,8 +32846,8 @@ } ], "declKind": "Accessor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO11stringValueSSvg", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO11stringValueSSvg", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO11stringValueSSvg", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO11stringValueSSvg", "moduleName": "EmbeddedCheckoutProtocol", "implicit": true, "accessorKind": "get" @@ -32222,8 +32856,8 @@ } ], "declKind": "Enum", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10CodingKeysO", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10CodingKeysO", "moduleName": "EmbeddedCheckoutProtocol", "enumRawTypeName": "String", "isEnumExhaustive": true, @@ -32318,47 +32952,26 @@ { "kind": "Constructor", "name": "init", - "printedName": "init(devUcpBuyerIP:devUcpUserAgent:)", + "printedName": "init(from:)", "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" + "name": "PaymentCredential", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" }, { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV13devUcpBuyerIP0eF9UserAgentACSSSg_AFtcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV13devUcpBuyerIP0eF9UserAgentACSSSg_AFtcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV4fromACs7Decoder_p_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", + "throwing": true, "init_kind": "Designated" }, { @@ -32379,39 +32992,12 @@ } ], "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV6encode2toys7Encoder_p_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV6encode2toys7Encoder_p_tKF", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV6encode2toys7Encoder_p_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV6encode2toys7Encoder_p_tKF", "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, "throwing": true, "funcSelfKind": "NonMutating" }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(from:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" - }, - { - "kind": "TypeNominal", - "name": "Decoder", - "printedName": "any Swift.Decoder", - "usr": "s:s7DecoderP" - } - ], - "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV4fromACs7Decoder_p_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV4fromACs7Decoder_p_tKcfc", - "moduleName": "EmbeddedCheckoutProtocol", - "implicit": true, - "throwing": true, - "init_kind": "Designated" - }, { "kind": "Constructor", "name": "init", @@ -32419,9 +33005,9 @@ "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "PaymentCredential", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" }, { "kind": "TypeNominal", @@ -32431,8 +33017,8 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV4dataAC10Foundation4DataV_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV4dataAC10Foundation4DataV_tKcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV4dataAC10Foundation4DataV_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -32445,9 +33031,9 @@ "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "PaymentCredential", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" }, { "kind": "TypeNominal", @@ -32464,8 +33050,8 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV_5usingACSS_SS10FoundationE8EncodingVtKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV_5usingACSS_SS10FoundationE8EncodingVtKcfc", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -32478,9 +33064,9 @@ "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" + "name": "PaymentCredential", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" }, { "kind": "TypeNominal", @@ -32490,8 +33076,8 @@ } ], "declKind": "Constructor", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV7fromURLAC10Foundation0F0V_tKcfc", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV7fromURLAC10Foundation0F0V_tKcfc", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV7fromURLAC10Foundation0G0V_tKcfc", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -32500,55 +33086,24 @@ { "kind": "Function", "name": "with", - "printedName": "with(devUcpBuyerIP:devUcpUserAgent:)", + "printedName": "with(type:)", "children": [ { "kind": "TypeNominal", - "name": "Signals", - "printedName": "EmbeddedCheckoutProtocol.Signals", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String??", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "hasDefaultArg": true, - "usr": "s:Sq" + "name": "PaymentCredential", + "printedName": "EmbeddedCheckoutProtocol.PaymentCredential", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV" }, { "kind": "TypeNominal", "name": "Optional", - "printedName": "Swift.String??", + "printedName": "Swift.String?", "children": [ { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "hasDefaultArg": true, @@ -32556,8 +33111,8 @@ } ], "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV4with13devUcpBuyerIP0fG9UserAgentACSSSgSg_AHtF", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV4with13devUcpBuyerIP0fG9UserAgentACSSSgSg_AHtF", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV4with4typeACSSSg_tF", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV4with4typeACSSSg_tF", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -32575,8 +33130,8 @@ } ], "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV8jsonData10Foundation0F0VyKF", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV8jsonData10Foundation0F0VyKF", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV8jsonData10Foundation0G0VyKF", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV8jsonData10Foundation0G0VyKF", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -32610,8 +33165,8 @@ } ], "declKind": "Func", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", "moduleName": "EmbeddedCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -32619,8 +33174,8 @@ } ], "declKind": "Struct", - "usr": "s:24EmbeddedCheckoutProtocol7SignalsV", - "mangledName": "$s24EmbeddedCheckoutProtocol7SignalsV", + "usr": "s:24EmbeddedCheckoutProtocol17PaymentCredentialV", + "mangledName": "$s24EmbeddedCheckoutProtocol17PaymentCredentialV", "moduleName": "EmbeddedCheckoutProtocol", "conformances": [ { diff --git a/protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api b/protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api index 6d635a8b..7787f9b2 100644 --- a/protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api +++ b/protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api @@ -284,15 +284,17 @@ public final class com/shopify/ucp/embedded/checkout/AuthResult$Companion { public final class com/shopify/ucp/embedded/checkout/Buyer { public static final field Companion Lcom/shopify/ucp/embedded/checkout/Buyer$Companion; public fun ()V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/shopify/ucp/embedded/checkout/Buyer; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Buyer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Buyer; + public final fun component5 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/Buyer; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Buyer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Buyer; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getEmail ()Ljava/lang/String; public final fun getFirstName ()Ljava/lang/String; public final fun getLastName ()Ljava/lang/String; @@ -301,21 +303,19 @@ public final class com/shopify/ucp/embedded/checkout/Buyer { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/Buyer$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/Buyer$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Buyer; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Buyer;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/Buyer$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/BuyerSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/BuyerSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Buyer; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Buyer;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/CapabilityElement { public static final field Companion Lcom/shopify/ucp/embedded/checkout/CapabilityElement$Companion; public fun (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/Extends;)V @@ -394,18 +394,19 @@ public final class com/shopify/ucp/embedded/checkout/CapabilityResponseSchema$Co public final class com/shopify/ucp/embedded/checkout/Checkout { public static final field Companion Lcom/shopify/ucp/embedded/checkout/Checkout$Companion; - public fun (Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lcom/shopify/ucp/embedded/checkout/Signals;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;)V - public synthetic fun (Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lcom/shopify/ucp/embedded/checkout/Signals;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lkotlinx/serialization/json/JsonObject;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;Ljava/util/Map;)V + public synthetic fun (Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lkotlinx/serialization/json/JsonObject;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/util/Map; public final fun component10 ()Ljava/util/List; public final fun component11 ()Ljava/util/List; public final fun component12 ()Ljava/util/List; public final fun component13 ()Lcom/shopify/ucp/embedded/checkout/OrderConfirmation; public final fun component14 ()Lcom/shopify/ucp/embedded/checkout/Payment; - public final fun component15 ()Lcom/shopify/ucp/embedded/checkout/Signals; + public final fun component15 ()Lkotlinx/serialization/json/JsonObject; public final fun component16 ()Lcom/shopify/ucp/embedded/checkout/CheckoutStatus; public final fun component17 ()Ljava/util/List; public final fun component18 ()Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema; + public final fun component19 ()Ljava/util/Map; public final fun component2 ()Lcom/shopify/ucp/embedded/checkout/Buyer; public final fun component3 ()Lcom/shopify/ucp/embedded/checkout/Context; public final fun component4 ()Ljava/lang/String; @@ -414,9 +415,10 @@ public final class com/shopify/ucp/embedded/checkout/Checkout { public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment; public final fun component9 ()Ljava/lang/String; - public final fun copy (Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lcom/shopify/ucp/embedded/checkout/Signals;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;)Lcom/shopify/ucp/embedded/checkout/Checkout; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Checkout;Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lcom/shopify/ucp/embedded/checkout/Signals;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Checkout; + public final fun copy (Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lkotlinx/serialization/json/JsonObject;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/Checkout; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Checkout;Ljava/util/Map;Lcom/shopify/ucp/embedded/checkout/Buyer;Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutDiscounts;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/CheckoutFulfillment;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/OrderConfirmation;Lcom/shopify/ucp/embedded/checkout/Payment;Lkotlinx/serialization/json/JsonObject;Lcom/shopify/ucp/embedded/checkout/CheckoutStatus;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Checkout; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getAttribution ()Ljava/util/Map; public final fun getBuyer ()Lcom/shopify/ucp/embedded/checkout/Buyer; public final fun getContext ()Lcom/shopify/ucp/embedded/checkout/Context; @@ -431,7 +433,7 @@ public final class com/shopify/ucp/embedded/checkout/Checkout { public final fun getMessages ()Ljava/util/List; public final fun getOrder ()Lcom/shopify/ucp/embedded/checkout/OrderConfirmation; public final fun getPayment ()Lcom/shopify/ucp/embedded/checkout/Payment; - public final fun getSignals ()Lcom/shopify/ucp/embedded/checkout/Signals; + public final fun getSignals ()Lkotlinx/serialization/json/JsonObject; public final fun getStatus ()Lcom/shopify/ucp/embedded/checkout/CheckoutStatus; public final fun getTotals ()Ljava/util/List; public final fun getUcp ()Lcom/shopify/ucp/embedded/checkout/UCPCheckoutResponseSchema; @@ -439,17 +441,6 @@ public final class com/shopify/ucp/embedded/checkout/Checkout { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/Checkout$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/Checkout$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Checkout; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Checkout;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/Checkout$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } @@ -547,6 +538,15 @@ public final class com/shopify/ucp/embedded/checkout/CheckoutFulfillmentClass$Co public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/CheckoutSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/CheckoutSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Checkout; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Checkout;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/CheckoutStatus : java/lang/Enum { public static final field Canceled Lcom/shopify/ucp/embedded/checkout/CheckoutStatus; public static final field Companion Lcom/shopify/ucp/embedded/checkout/CheckoutStatus$Companion; @@ -616,8 +616,8 @@ public final class com/shopify/ucp/embedded/checkout/ContentType$Companion { public final class com/shopify/ucp/embedded/checkout/Context { public static final field Companion Lcom/shopify/ucp/embedded/checkout/Context$Companion; public fun ()V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; @@ -625,9 +625,11 @@ public final class com/shopify/ucp/embedded/checkout/Context { public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/shopify/ucp/embedded/checkout/Context; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Context; + public final fun component8 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/Context; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Context; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getAddressCountry ()Ljava/lang/String; public final fun getAddressRegion ()Ljava/lang/String; public final fun getCurrency ()Ljava/lang/String; @@ -639,21 +641,19 @@ public final class com/shopify/ucp/embedded/checkout/Context { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/Context$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/Context$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Context; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Context;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/Context$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/ContextSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/ContextSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Context; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Context;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/CredentialCheckout { public static final field Companion Lcom/shopify/ucp/embedded/checkout/CredentialCheckout$Companion; public fun ()V @@ -1187,15 +1187,17 @@ public final class com/shopify/ucp/embedded/checkout/Fulfillment$Companion { public final class com/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod { public static final field Companion Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/util/List; public final fun component4 ()Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;)Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod; + public final fun component5 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getDescription ()Ljava/lang/String; public final fun getFulfillableOn ()Ljava/lang/String; public final fun getLineItemIDS ()Ljava/util/List; @@ -1204,21 +1206,19 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/FulfillmentAvailableMethodSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethodSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentAvailableMethod;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/FulfillmentDestination { public static final field Companion Lcom/shopify/ucp/embedded/checkout/FulfillmentDestination$Companion; public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/PostalAddress;Ljava/lang/String;)V @@ -1313,15 +1313,17 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentEvent$Companion public final class com/shopify/ucp/embedded/checkout/FulfillmentGroup { public static final field Companion Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup$Companion; - public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/List; public final fun component3 ()Ljava/util/List; public final fun component4 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup; + public final fun component5 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getId ()Ljava/lang/String; public final fun getLineItemIDS ()Ljava/util/List; public final fun getOptions ()Ljava/util/List; @@ -1330,34 +1332,34 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentGroup { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/FulfillmentGroup$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/FulfillmentGroup$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/FulfillmentGroupSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentGroupSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentGroup;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/FulfillmentMethod { public static final field Companion Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod$Companion; - public fun (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;)V - public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;)V + public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/util/List; public final fun component2 ()Ljava/util/List; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/util/List; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType; - public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;)Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod; + public final fun component7 ()Ljava/util/Map; + public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getDestinations ()Ljava/util/List; public final fun getGroups ()Ljava/util/List; public final fun getId ()Ljava/lang/String; @@ -1368,21 +1370,19 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentMethod { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/FulfillmentMethod$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/FulfillmentMethod$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/FulfillmentMethodSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentMethod;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/FulfillmentMethodType : java/lang/Enum { public static final field Companion Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType$Companion; public static final field Pickup Lcom/shopify/ucp/embedded/checkout/FulfillmentMethodType; @@ -1399,8 +1399,8 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentMethodType$Compa public final class com/shopify/ucp/embedded/checkout/FulfillmentOption { public static final field Companion Lcom/shopify/ucp/embedded/checkout/FulfillmentOption$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; @@ -1408,9 +1408,11 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentOption { public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/shopify/ucp/embedded/checkout/FulfillmentOption; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentOption;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentOption; + public final fun component8 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/FulfillmentOption; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/FulfillmentOption;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/FulfillmentOption; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getCarrier ()Ljava/lang/String; public final fun getDescription ()Ljava/lang/String; public final fun getEarliestFulfillmentTime ()Ljava/lang/String; @@ -1422,21 +1424,19 @@ public final class com/shopify/ucp/embedded/checkout/FulfillmentOption { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/FulfillmentOption$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentOption$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentOption; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentOption;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/FulfillmentOption$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/FulfillmentOptionSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/FulfillmentOptionSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/FulfillmentOption; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/FulfillmentOption;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/InstrumentsChangeCheckout { public static final field Companion Lcom/shopify/ucp/embedded/checkout/InstrumentsChangeCheckout$Companion; public fun ()V @@ -2010,31 +2010,32 @@ public final class com/shopify/ucp/embedded/checkout/Payment$Companion { public final class com/shopify/ucp/embedded/checkout/PaymentCredential { public static final field Companion Lcom/shopify/ucp/embedded/checkout/PaymentCredential$Companion; - public fun (Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;)Lcom/shopify/ucp/embedded/checkout/PaymentCredential; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Ljava/lang/String;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/PaymentCredential; + public final fun component2 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/PaymentCredential; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/PaymentCredential; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getType ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/PaymentCredential$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/PaymentCredential$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/PaymentCredential; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/PaymentCredential$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/PaymentCredentialSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/PaymentCredentialSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/PaymentCredential; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/PaymentHandlerAvailableInstrument { public static final field Companion Lcom/shopify/ucp/embedded/checkout/PaymentHandlerAvailableInstrument$Companion; public fun (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;)V @@ -2357,8 +2358,8 @@ public final class com/shopify/ucp/embedded/checkout/RequestDescriptor { public final class com/shopify/ucp/embedded/checkout/SelectedPaymentInstrument { public static final field Companion Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument$Companion; - public fun (Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V - public synthetic fun (Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Map;)V + public synthetic fun (Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Lcom/shopify/ucp/embedded/checkout/PostalAddress; public final fun component2 ()Lcom/shopify/ucp/embedded/checkout/PaymentCredential; public final fun component3 ()Lkotlinx/serialization/json/JsonObject; @@ -2366,9 +2367,11 @@ public final class com/shopify/ucp/embedded/checkout/SelectedPaymentInstrument { public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/Boolean; - public final fun copy (Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument;Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument; + public final fun component8 ()Ljava/util/Map; + public final fun copy (Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Map;)Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument; + public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument;Lcom/shopify/ucp/embedded/checkout/PostalAddress;Lcom/shopify/ucp/embedded/checkout/PaymentCredential;Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Map;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument; public fun equals (Ljava/lang/Object;)Z + public final fun getAdditionalProperties ()Ljava/util/Map; public final fun getBillingAddress ()Lcom/shopify/ucp/embedded/checkout/PostalAddress; public final fun getCredential ()Lcom/shopify/ucp/embedded/checkout/PaymentCredential; public final fun getDisplay ()Lkotlinx/serialization/json/JsonObject; @@ -2380,21 +2383,19 @@ public final class com/shopify/ucp/embedded/checkout/SelectedPaymentInstrument { public fun toString ()Ljava/lang/String; } -public final synthetic class com/shopify/ucp/embedded/checkout/SelectedPaymentInstrument$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/SelectedPaymentInstrument$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class com/shopify/ucp/embedded/checkout/SelectedPaymentInstrumentSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrumentSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/SelectedPaymentInstrument;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + public final class com/shopify/ucp/embedded/checkout/Service { public static final field Companion Lcom/shopify/ucp/embedded/checkout/Service$Companion; public fun (Lkotlinx/serialization/json/JsonObject;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/shopify/ucp/embedded/checkout/Transport;)V @@ -2491,37 +2492,6 @@ public final class com/shopify/ucp/embedded/checkout/Severity$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } -public final class com/shopify/ucp/embedded/checkout/Signals { - public static final field Companion Lcom/shopify/ucp/embedded/checkout/Signals$Companion; - public fun ()V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/shopify/ucp/embedded/checkout/Signals; - public static synthetic fun copy$default (Lcom/shopify/ucp/embedded/checkout/Signals;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/shopify/ucp/embedded/checkout/Signals; - public fun equals (Ljava/lang/Object;)Z - public final fun getDevUcpBuyerIP ()Ljava/lang/String; - public final fun getDevUcpUserAgent ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final synthetic class com/shopify/ucp/embedded/checkout/Signals$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/shopify/ucp/embedded/checkout/Signals$$serializer; - public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/shopify/ucp/embedded/checkout/Signals; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/shopify/ucp/embedded/checkout/Signals;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/shopify/ucp/embedded/checkout/Signals$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class com/shopify/ucp/embedded/checkout/Transport : java/lang/Enum { public static final field A2A Lcom/shopify/ucp/embedded/checkout/Transport; public static final field Companion Lcom/shopify/ucp/embedded/checkout/Transport$Companion; diff --git a/protocol/languages/kotlin/embedded-checkout-protocol/src/main/java/com/shopify/ucp/embedded/checkout/Models.kt b/protocol/languages/kotlin/embedded-checkout-protocol/src/main/java/com/shopify/ucp/embedded/checkout/Models.kt index 279a276c..03aae01a 100644 --- a/protocol/languages/kotlin/embedded-checkout-protocol/src/main/java/com/shopify/ucp/embedded/checkout/Models.kt +++ b/protocol/languages/kotlin/embedded-checkout-protocol/src/main/java/com/shopify/ucp/embedded/checkout/Models.kt @@ -8,7 +8,7 @@ import kotlinx.serialization.encoding.* /** * Base checkout schema. Extensions compose onto this using allOf. */ -@Serializable +@Serializable(with = CheckoutSerializer::class) public data class Checkout ( public val attribution: Map? = null, @@ -73,7 +73,7 @@ public data class Checkout ( public val order: OrderConfirmation? = null, public val payment: Payment? = null, - public val signals: Signals? = null, + public val signals: JsonObject? = null, /** * Checkout state indicating the current phase and required action. See Checkout Status @@ -86,13 +86,15 @@ public data class Checkout ( */ public val totals: List, - public val ucp: UCPCheckoutResponseSchema + public val ucp: UCPCheckoutResponseSchema, + + public val additionalProperties: Map = emptyMap() ) /** * Representation of the buyer. */ -@Serializable +@Serializable(with = BuyerSerializer::class) public data class Buyer ( /** * Email of the buyer. @@ -115,7 +117,9 @@ public data class Buyer ( * E.164 standard. */ @SerialName("phone_number") - public val phoneNumber: String? = null + public val phoneNumber: String? = null, + + public val additionalProperties: Map = emptyMap() ) /** @@ -128,7 +132,7 @@ public data class Buyer ( * early, finer resolution as the session progresses. Higher-resolution data (shipping * address, billing address) supersedes context. */ -@Serializable +@Serializable(with = ContextSerializer::class) public data class Context ( /** * The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example "US". @@ -187,7 +191,9 @@ public data class Context ( * refinement—higher-resolution data (e.g., shipping address) supersedes this value. */ @SerialName("postal_code") - public val postalCode: String? = null + public val postalCode: String? = null, + + public val additionalProperties: Map = emptyMap() ) /** @@ -309,7 +315,7 @@ public data class CheckoutFulfillment ( /** * Inventory availability hint for a fulfillment method type. */ -@Serializable +@Serializable(with = FulfillmentAvailableMethodSerializer::class) public data class FulfillmentAvailableMethod ( /** * Human-readable availability info (e.g., 'Available for pickup at Downtown Store today'). @@ -331,7 +337,9 @@ public data class FulfillmentAvailableMethod ( /** * Fulfillment method type this availability applies to. */ - public val type: FulfillmentMethodType + public val type: FulfillmentMethodType, + + public val additionalProperties: Map = emptyMap() ) /** @@ -348,7 +356,7 @@ public enum class FulfillmentMethodType(public val value: String) { /** * A fulfillment method (shipping or pickup) with destinations and groups. */ -@Serializable +@Serializable(with = FulfillmentMethodSerializer::class) public data class FulfillmentMethod ( /** * Available destinations. For shipping: addresses. For pickup: retail locations. @@ -381,7 +389,9 @@ public data class FulfillmentMethod ( /** * Fulfillment method type. */ - public val type: FulfillmentMethodType + public val type: FulfillmentMethodType, + + public val additionalProperties: Map = emptyMap() ) /** @@ -548,7 +558,7 @@ public data class PostalAddress ( /** * A merchant-generated package/group of line items with fulfillment options. */ -@Serializable +@Serializable(with = FulfillmentGroupSerializer::class) public data class FulfillmentGroup ( /** * Group identifier for referencing merchant-generated groups in updates. @@ -570,13 +580,15 @@ public data class FulfillmentGroup ( * ID of the selected fulfillment option for this group. */ @SerialName("selected_option_id") - public val selectedOptionID: String? = null + public val selectedOptionID: String? = null, + + public val additionalProperties: Map = emptyMap() ) /** * A fulfillment option within a group (e.g., Standard Shipping $5, Express $15). */ -@Serializable +@Serializable(with = FulfillmentOptionSerializer::class) public data class FulfillmentOption ( /** * Carrier name (for shipping). @@ -613,7 +625,9 @@ public data class FulfillmentOption ( /** * Fulfillment option totals breakdown. */ - public val totals: List + public val totals: List, + + public val additionalProperties: Map = emptyMap() ) /** @@ -851,7 +865,7 @@ public data class Payment ( * The base definition for any payment instrument. It links the instrument to a specific * payment handler. */ -@Serializable +@Serializable(with = SelectedPaymentInstrumentSerializer::class) public data class SelectedPaymentInstrument ( /** * The billing address associated with this payment method. @@ -888,19 +902,23 @@ public data class SelectedPaymentInstrument ( /** * Whether this instrument is selected by the user. */ - public val selected: Boolean? = null + public val selected: Boolean? = null, + + public val additionalProperties: Map = emptyMap() ) /** * The base definition for any payment credential. Handlers define specific credential types. */ -@Serializable +@Serializable(with = PaymentCredentialSerializer::class) public data class PaymentCredential ( /** * The credential type discriminator. Specific schemas will constrain this to a constant * value. */ - public val type: String + public val type: String, + + public val additionalProperties: Map = emptyMap() ) /** @@ -910,20 +928,6 @@ public data class PaymentCredential ( * use reverse-domain naming to ensure provenance and prevent collisions when multiple * extensions contribute to the shared namespace. */ -@Serializable -public data class Signals ( - /** - * Client's IP address (IPv4 or IPv6). - */ - @SerialName("dev.ucp.buyer_ip") - public val devUcpBuyerIP: String? = null, - - /** - * Client's HTTP User-Agent header or equivalent. - */ - @SerialName("dev.ucp.user_agent") - public val devUcpUserAgent: String? = null -) /** * Checkout state indicating the current phase and required action. See Checkout Status @@ -2229,3 +2233,345 @@ public data class WindowOpenResult ( */ public val messages: List? = null ) + +public object CheckoutSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.Checkout") + override fun deserialize(decoder: Decoder): Checkout { + val input = decoder as? JsonDecoder + ?: throw SerializationException("Checkout can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("attribution", "buyer", "context", "continue_url", "currency", "discounts", "expires_at", "fulfillment", "id", "line_items", "links", "messages", "order", "payment", "signals", "status", "totals", "ucp") + return Checkout( + attribution = obj["attribution"]?.let { json.decodeFromJsonElement(serializer>(), it) }, + buyer = obj["buyer"]?.let { json.decodeFromJsonElement(serializer(), it) }, + context = obj["context"]?.let { json.decodeFromJsonElement(serializer(), it) }, + continueURL = obj["continue_url"]?.let { json.decodeFromJsonElement(serializer(), it) }, + currency = json.decodeFromJsonElement(serializer(), obj["currency"] ?: throw SerializationException("Missing currency for Checkout")), + discounts = obj["discounts"]?.let { json.decodeFromJsonElement(serializer(), it) }, + expiresAt = obj["expires_at"]?.let { json.decodeFromJsonElement(serializer(), it) }, + fulfillment = obj["fulfillment"]?.let { json.decodeFromJsonElement(serializer(), it) }, + id = json.decodeFromJsonElement(serializer(), obj["id"] ?: throw SerializationException("Missing id for Checkout")), + lineItems = json.decodeFromJsonElement(serializer>(), obj["line_items"] ?: throw SerializationException("Missing line_items for Checkout")), + links = json.decodeFromJsonElement(serializer>(), obj["links"] ?: throw SerializationException("Missing links for Checkout")), + messages = obj["messages"]?.let { json.decodeFromJsonElement(serializer>(), it) }, + order = obj["order"]?.let { json.decodeFromJsonElement(serializer(), it) }, + payment = obj["payment"]?.let { json.decodeFromJsonElement(serializer(), it) }, + signals = obj["signals"]?.let { json.decodeFromJsonElement(serializer(), it) }, + status = json.decodeFromJsonElement(serializer(), obj["status"] ?: throw SerializationException("Missing status for Checkout")), + totals = json.decodeFromJsonElement(serializer>(), obj["totals"] ?: throw SerializationException("Missing totals for Checkout")), + ucp = json.decodeFromJsonElement(serializer(), obj["ucp"] ?: throw SerializationException("Missing ucp for Checkout")), + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: Checkout) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("Checkout can only be serialized to JSON") + val json = output.json + val known = setOf("attribution", "buyer", "context", "continue_url", "currency", "discounts", "expires_at", "fulfillment", "id", "line_items", "links", "messages", "order", "payment", "signals", "status", "totals", "ucp") + val map = linkedMapOf() + value.attribution?.let { map["attribution"] = json.encodeToJsonElement(serializer>(), it) } + value.buyer?.let { map["buyer"] = json.encodeToJsonElement(serializer(), it) } + value.context?.let { map["context"] = json.encodeToJsonElement(serializer(), it) } + value.continueURL?.let { map["continue_url"] = json.encodeToJsonElement(serializer(), it) } + map["currency"] = json.encodeToJsonElement(serializer(), value.currency) + value.discounts?.let { map["discounts"] = json.encodeToJsonElement(serializer(), it) } + value.expiresAt?.let { map["expires_at"] = json.encodeToJsonElement(serializer(), it) } + value.fulfillment?.let { map["fulfillment"] = json.encodeToJsonElement(serializer(), it) } + map["id"] = json.encodeToJsonElement(serializer(), value.id) + map["line_items"] = json.encodeToJsonElement(serializer>(), value.lineItems) + map["links"] = json.encodeToJsonElement(serializer>(), value.links) + value.messages?.let { map["messages"] = json.encodeToJsonElement(serializer>(), it) } + value.order?.let { map["order"] = json.encodeToJsonElement(serializer(), it) } + value.payment?.let { map["payment"] = json.encodeToJsonElement(serializer(), it) } + value.signals?.let { map["signals"] = json.encodeToJsonElement(serializer(), it) } + map["status"] = json.encodeToJsonElement(serializer(), value.status) + map["totals"] = json.encodeToJsonElement(serializer>(), value.totals) + map["ucp"] = json.encodeToJsonElement(serializer(), value.ucp) + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object BuyerSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.Buyer") + override fun deserialize(decoder: Decoder): Buyer { + val input = decoder as? JsonDecoder + ?: throw SerializationException("Buyer can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("email", "first_name", "last_name", "phone_number") + return Buyer( + email = obj["email"]?.let { json.decodeFromJsonElement(serializer(), it) }, + firstName = obj["first_name"]?.let { json.decodeFromJsonElement(serializer(), it) }, + lastName = obj["last_name"]?.let { json.decodeFromJsonElement(serializer(), it) }, + phoneNumber = obj["phone_number"]?.let { json.decodeFromJsonElement(serializer(), it) }, + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: Buyer) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("Buyer can only be serialized to JSON") + val json = output.json + val known = setOf("email", "first_name", "last_name", "phone_number") + val map = linkedMapOf() + value.email?.let { map["email"] = json.encodeToJsonElement(serializer(), it) } + value.firstName?.let { map["first_name"] = json.encodeToJsonElement(serializer(), it) } + value.lastName?.let { map["last_name"] = json.encodeToJsonElement(serializer(), it) } + value.phoneNumber?.let { map["phone_number"] = json.encodeToJsonElement(serializer(), it) } + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object ContextSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.Context") + override fun deserialize(decoder: Decoder): Context { + val input = decoder as? JsonDecoder + ?: throw SerializationException("Context can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("address_country", "address_region", "currency", "eligibility", "intent", "language", "postal_code") + return Context( + addressCountry = obj["address_country"]?.let { json.decodeFromJsonElement(serializer(), it) }, + addressRegion = obj["address_region"]?.let { json.decodeFromJsonElement(serializer(), it) }, + currency = obj["currency"]?.let { json.decodeFromJsonElement(serializer(), it) }, + eligibility = obj["eligibility"]?.let { json.decodeFromJsonElement(serializer>(), it) }, + intent = obj["intent"]?.let { json.decodeFromJsonElement(serializer(), it) }, + language = obj["language"]?.let { json.decodeFromJsonElement(serializer(), it) }, + postalCode = obj["postal_code"]?.let { json.decodeFromJsonElement(serializer(), it) }, + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: Context) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("Context can only be serialized to JSON") + val json = output.json + val known = setOf("address_country", "address_region", "currency", "eligibility", "intent", "language", "postal_code") + val map = linkedMapOf() + value.addressCountry?.let { map["address_country"] = json.encodeToJsonElement(serializer(), it) } + value.addressRegion?.let { map["address_region"] = json.encodeToJsonElement(serializer(), it) } + value.currency?.let { map["currency"] = json.encodeToJsonElement(serializer(), it) } + value.eligibility?.let { map["eligibility"] = json.encodeToJsonElement(serializer>(), it) } + value.intent?.let { map["intent"] = json.encodeToJsonElement(serializer(), it) } + value.language?.let { map["language"] = json.encodeToJsonElement(serializer(), it) } + value.postalCode?.let { map["postal_code"] = json.encodeToJsonElement(serializer(), it) } + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object FulfillmentAvailableMethodSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.FulfillmentAvailableMethod") + override fun deserialize(decoder: Decoder): FulfillmentAvailableMethod { + val input = decoder as? JsonDecoder + ?: throw SerializationException("FulfillmentAvailableMethod can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("description", "fulfillable_on", "line_item_ids", "type") + return FulfillmentAvailableMethod( + description = obj["description"]?.let { json.decodeFromJsonElement(serializer(), it) }, + fulfillableOn = obj["fulfillable_on"]?.let { json.decodeFromJsonElement(serializer(), it) }, + lineItemIDS = json.decodeFromJsonElement(serializer>(), obj["line_item_ids"] ?: throw SerializationException("Missing line_item_ids for FulfillmentAvailableMethod")), + type = json.decodeFromJsonElement(serializer(), obj["type"] ?: throw SerializationException("Missing type for FulfillmentAvailableMethod")), + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: FulfillmentAvailableMethod) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("FulfillmentAvailableMethod can only be serialized to JSON") + val json = output.json + val known = setOf("description", "fulfillable_on", "line_item_ids", "type") + val map = linkedMapOf() + value.description?.let { map["description"] = json.encodeToJsonElement(serializer(), it) } + value.fulfillableOn?.let { map["fulfillable_on"] = json.encodeToJsonElement(serializer(), it) } + map["line_item_ids"] = json.encodeToJsonElement(serializer>(), value.lineItemIDS) + map["type"] = json.encodeToJsonElement(serializer(), value.type) + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object FulfillmentMethodSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.FulfillmentMethod") + override fun deserialize(decoder: Decoder): FulfillmentMethod { + val input = decoder as? JsonDecoder + ?: throw SerializationException("FulfillmentMethod can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("destinations", "groups", "id", "line_item_ids", "selected_destination_id", "type") + return FulfillmentMethod( + destinations = obj["destinations"]?.let { json.decodeFromJsonElement(serializer>(), it) }, + groups = obj["groups"]?.let { json.decodeFromJsonElement(serializer>(), it) }, + id = json.decodeFromJsonElement(serializer(), obj["id"] ?: throw SerializationException("Missing id for FulfillmentMethod")), + lineItemIDS = json.decodeFromJsonElement(serializer>(), obj["line_item_ids"] ?: throw SerializationException("Missing line_item_ids for FulfillmentMethod")), + selectedDestinationID = obj["selected_destination_id"]?.let { json.decodeFromJsonElement(serializer(), it) }, + type = json.decodeFromJsonElement(serializer(), obj["type"] ?: throw SerializationException("Missing type for FulfillmentMethod")), + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: FulfillmentMethod) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("FulfillmentMethod can only be serialized to JSON") + val json = output.json + val known = setOf("destinations", "groups", "id", "line_item_ids", "selected_destination_id", "type") + val map = linkedMapOf() + value.destinations?.let { map["destinations"] = json.encodeToJsonElement(serializer>(), it) } + value.groups?.let { map["groups"] = json.encodeToJsonElement(serializer>(), it) } + map["id"] = json.encodeToJsonElement(serializer(), value.id) + map["line_item_ids"] = json.encodeToJsonElement(serializer>(), value.lineItemIDS) + value.selectedDestinationID?.let { map["selected_destination_id"] = json.encodeToJsonElement(serializer(), it) } + map["type"] = json.encodeToJsonElement(serializer(), value.type) + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object FulfillmentGroupSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.FulfillmentGroup") + override fun deserialize(decoder: Decoder): FulfillmentGroup { + val input = decoder as? JsonDecoder + ?: throw SerializationException("FulfillmentGroup can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("id", "line_item_ids", "options", "selected_option_id") + return FulfillmentGroup( + id = json.decodeFromJsonElement(serializer(), obj["id"] ?: throw SerializationException("Missing id for FulfillmentGroup")), + lineItemIDS = json.decodeFromJsonElement(serializer>(), obj["line_item_ids"] ?: throw SerializationException("Missing line_item_ids for FulfillmentGroup")), + options = obj["options"]?.let { json.decodeFromJsonElement(serializer>(), it) }, + selectedOptionID = obj["selected_option_id"]?.let { json.decodeFromJsonElement(serializer(), it) }, + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: FulfillmentGroup) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("FulfillmentGroup can only be serialized to JSON") + val json = output.json + val known = setOf("id", "line_item_ids", "options", "selected_option_id") + val map = linkedMapOf() + map["id"] = json.encodeToJsonElement(serializer(), value.id) + map["line_item_ids"] = json.encodeToJsonElement(serializer>(), value.lineItemIDS) + value.options?.let { map["options"] = json.encodeToJsonElement(serializer>(), it) } + value.selectedOptionID?.let { map["selected_option_id"] = json.encodeToJsonElement(serializer(), it) } + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object FulfillmentOptionSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.FulfillmentOption") + override fun deserialize(decoder: Decoder): FulfillmentOption { + val input = decoder as? JsonDecoder + ?: throw SerializationException("FulfillmentOption can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("carrier", "description", "earliest_fulfillment_time", "id", "latest_fulfillment_time", "title", "totals") + return FulfillmentOption( + carrier = obj["carrier"]?.let { json.decodeFromJsonElement(serializer(), it) }, + description = obj["description"]?.let { json.decodeFromJsonElement(serializer(), it) }, + earliestFulfillmentTime = obj["earliest_fulfillment_time"]?.let { json.decodeFromJsonElement(serializer(), it) }, + id = json.decodeFromJsonElement(serializer(), obj["id"] ?: throw SerializationException("Missing id for FulfillmentOption")), + latestFulfillmentTime = obj["latest_fulfillment_time"]?.let { json.decodeFromJsonElement(serializer(), it) }, + title = json.decodeFromJsonElement(serializer(), obj["title"] ?: throw SerializationException("Missing title for FulfillmentOption")), + totals = json.decodeFromJsonElement(serializer>(), obj["totals"] ?: throw SerializationException("Missing totals for FulfillmentOption")), + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: FulfillmentOption) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("FulfillmentOption can only be serialized to JSON") + val json = output.json + val known = setOf("carrier", "description", "earliest_fulfillment_time", "id", "latest_fulfillment_time", "title", "totals") + val map = linkedMapOf() + value.carrier?.let { map["carrier"] = json.encodeToJsonElement(serializer(), it) } + value.description?.let { map["description"] = json.encodeToJsonElement(serializer(), it) } + value.earliestFulfillmentTime?.let { map["earliest_fulfillment_time"] = json.encodeToJsonElement(serializer(), it) } + map["id"] = json.encodeToJsonElement(serializer(), value.id) + value.latestFulfillmentTime?.let { map["latest_fulfillment_time"] = json.encodeToJsonElement(serializer(), it) } + map["title"] = json.encodeToJsonElement(serializer(), value.title) + map["totals"] = json.encodeToJsonElement(serializer>(), value.totals) + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object SelectedPaymentInstrumentSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.SelectedPaymentInstrument") + override fun deserialize(decoder: Decoder): SelectedPaymentInstrument { + val input = decoder as? JsonDecoder + ?: throw SerializationException("SelectedPaymentInstrument can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("billing_address", "credential", "display", "handler_id", "id", "type", "selected") + return SelectedPaymentInstrument( + billingAddress = obj["billing_address"]?.let { json.decodeFromJsonElement(serializer(), it) }, + credential = obj["credential"]?.let { json.decodeFromJsonElement(serializer(), it) }, + display = obj["display"]?.let { json.decodeFromJsonElement(serializer(), it) }, + handlerID = json.decodeFromJsonElement(serializer(), obj["handler_id"] ?: throw SerializationException("Missing handler_id for SelectedPaymentInstrument")), + id = json.decodeFromJsonElement(serializer(), obj["id"] ?: throw SerializationException("Missing id for SelectedPaymentInstrument")), + type = json.decodeFromJsonElement(serializer(), obj["type"] ?: throw SerializationException("Missing type for SelectedPaymentInstrument")), + selected = obj["selected"]?.let { json.decodeFromJsonElement(serializer(), it) }, + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: SelectedPaymentInstrument) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("SelectedPaymentInstrument can only be serialized to JSON") + val json = output.json + val known = setOf("billing_address", "credential", "display", "handler_id", "id", "type", "selected") + val map = linkedMapOf() + value.billingAddress?.let { map["billing_address"] = json.encodeToJsonElement(serializer(), it) } + value.credential?.let { map["credential"] = json.encodeToJsonElement(serializer(), it) } + value.display?.let { map["display"] = json.encodeToJsonElement(serializer(), it) } + map["handler_id"] = json.encodeToJsonElement(serializer(), value.handlerID) + map["id"] = json.encodeToJsonElement(serializer(), value.id) + map["type"] = json.encodeToJsonElement(serializer(), value.type) + value.selected?.let { map["selected"] = json.encodeToJsonElement(serializer(), it) } + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} +public object PaymentCredentialSerializer : KSerializer { + override val descriptor: SerialDescriptor = + buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.PaymentCredential") + override fun deserialize(decoder: Decoder): PaymentCredential { + val input = decoder as? JsonDecoder + ?: throw SerializationException("PaymentCredential can only be deserialized from JSON") + val obj = input.decodeJsonElement().jsonObject + val json = input.json + val known = setOf("type") + return PaymentCredential( + type = json.decodeFromJsonElement(serializer(), obj["type"] ?: throw SerializationException("Missing type for PaymentCredential")), + additionalProperties = obj.filterKeys { it !in known } + ) + } + override fun serialize(encoder: Encoder, value: PaymentCredential) { + val output = encoder as? JsonEncoder + ?: throw SerializationException("PaymentCredential can only be serialized to JSON") + val json = output.json + val known = setOf("type") + val map = linkedMapOf() + map["type"] = json.encodeToJsonElement(serializer(), value.type) + value.additionalProperties + .filterKeys { it !in known } + .forEach { (key, element) -> map[key] = element } + output.encodeJsonElement(JsonObject(map)) + } +} diff --git a/protocol/languages/kotlin/embedded-checkout-protocol/src/test/java/com/shopify/ucp/embedded/checkout/ExtensionPreservationTest.kt b/protocol/languages/kotlin/embedded-checkout-protocol/src/test/java/com/shopify/ucp/embedded/checkout/ExtensionPreservationTest.kt new file mode 100644 index 00000000..da85b9d6 --- /dev/null +++ b/protocol/languages/kotlin/embedded-checkout-protocol/src/test/java/com/shopify/ucp/embedded/checkout/ExtensionPreservationTest.kt @@ -0,0 +1,45 @@ +package com.shopify.ucp.embedded.checkout + +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.jsonObject +import kotlinx.serialization.json.jsonPrimitive +import org.assertj.core.api.Assertions.assertThat +import org.junit.Test + +class ExtensionPreservationTest { + + private val json = Json { ignoreUnknownKeys = true } + + @Test + fun `preserves unknown extension keys on Checkout`() { + val wire = """ + { + "id": "checkout-123", + "currency": "USD", + "line_items": [], + "links": [], + "status": "incomplete", + "totals": [], + "ucp": {"payment_handlers": {}, "version": "2026-04-08"}, + "signals": {"dev.ucp.buyer_ip": "203.0.113.7", "com.example.device_id": "abc-123"}, + "com.example.foo": "bar" + } + """.trimIndent() + + val checkout = json.decodeFromString(Checkout.serializer(), wire) + val reEncoded = json.parseToJsonElement(json.encodeToString(Checkout.serializer(), checkout)).jsonObject + + assertThat(reEncoded["com.example.foo"]?.jsonPrimitive?.content).isEqualTo("bar") + + val signals = reEncoded["signals"]?.jsonObject + assertThat(signals?.get("dev.ucp.buyer_ip")?.jsonPrimitive?.content).isEqualTo("203.0.113.7") + assertThat(signals?.get("com.example.device_id")?.jsonPrimitive?.content).isEqualTo("abc-123") + + val colliding = checkout.copy( + additionalProperties = checkout.additionalProperties + ("id" to JsonPrimitive("extension-id")), + ) + val collisionEncoded = json.parseToJsonElement(json.encodeToString(Checkout.serializer(), colliding)).jsonObject + assertThat(collisionEncoded["id"]?.jsonPrimitive?.content).isEqualTo("checkout-123") + } +} diff --git a/protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated/Models.swift b/protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated/Models.swift index 6295a3e4..b3718135 100644 --- a/protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated/Models.swift +++ b/protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated/Models.swift @@ -46,7 +46,7 @@ public struct Checkout: Codable, Sendable { /// Details about an order created for this checkout session. public let order: OrderConfirmation? public let payment: Payment? - public let signals: Signals? + public let signals: [String: JSONAny]? /// Checkout state indicating the current phase and required action. See Checkout Status /// lifecycle documentation for state transition details. public let status: CheckoutStatus @@ -64,7 +64,7 @@ public struct Checkout: Codable, Sendable { case links, messages, order, payment, signals, status, totals, ucp } - public init(attribution: [String: String]?, buyer: Buyer?, context: Context?, continueURL: String?, currency: String, discounts: CheckoutDiscounts?, expiresAt: Date?, fulfillment: CheckoutFulfillment?, id: String, lineItems: [LineItem], links: [Link], messages: [Message]?, order: OrderConfirmation?, payment: Payment?, signals: Signals?, status: CheckoutStatus, totals: [CheckoutTotal], ucp: UCPCheckoutResponseSchema) { + public init(attribution: [String: String]?, buyer: Buyer?, context: Context?, continueURL: String?, currency: String, discounts: CheckoutDiscounts?, expiresAt: Date?, fulfillment: CheckoutFulfillment?, id: String, lineItems: [LineItem], links: [Link], messages: [Message]?, order: OrderConfirmation?, payment: Payment?, signals: [String: JSONAny]?, status: CheckoutStatus, totals: [CheckoutTotal], ucp: UCPCheckoutResponseSchema) { self.attribution = attribution self.buyer = buyer self.context = context @@ -84,6 +84,64 @@ public struct Checkout: Codable, Sendable { self.totals = totals self.ucp = ucp } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["attribution", "buyer", "context", "continue_url", "currency", "discounts", "expires_at", "fulfillment", "id", "line_items", "links", "messages", "order", "payment", "signals", "status", "totals", "ucp"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.attribution = try container.decodeIfPresent([String: String].self, forKey: .attribution) + self.buyer = try container.decodeIfPresent(Buyer.self, forKey: .buyer) + self.context = try container.decodeIfPresent(Context.self, forKey: .context) + self.continueURL = try container.decodeIfPresent(String.self, forKey: .continueURL) + self.currency = try container.decode(String.self, forKey: .currency) + self.discounts = try container.decodeIfPresent(CheckoutDiscounts.self, forKey: .discounts) + self.expiresAt = try container.decodeIfPresent(Date.self, forKey: .expiresAt) + self.fulfillment = try container.decodeIfPresent(CheckoutFulfillment.self, forKey: .fulfillment) + self.id = try container.decode(String.self, forKey: .id) + self.lineItems = try container.decode([LineItem].self, forKey: .lineItems) + self.links = try container.decode([Link].self, forKey: .links) + self.messages = try container.decodeIfPresent([Message].self, forKey: .messages) + self.order = try container.decodeIfPresent(OrderConfirmation.self, forKey: .order) + self.payment = try container.decodeIfPresent(Payment.self, forKey: .payment) + self.signals = try container.decodeIfPresent([String: JSONAny].self, forKey: .signals) + self.status = try container.decode(CheckoutStatus.self, forKey: .status) + self.totals = try container.decode([CheckoutTotal].self, forKey: .totals) + self.ucp = try container.decode(UCPCheckoutResponseSchema.self, forKey: .ucp) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(attribution, forKey: .attribution) + try container.encodeIfPresent(buyer, forKey: .buyer) + try container.encodeIfPresent(context, forKey: .context) + try container.encodeIfPresent(continueURL, forKey: .continueURL) + try container.encode(currency, forKey: .currency) + try container.encodeIfPresent(discounts, forKey: .discounts) + try container.encodeIfPresent(expiresAt, forKey: .expiresAt) + try container.encodeIfPresent(fulfillment, forKey: .fulfillment) + try container.encode(id, forKey: .id) + try container.encode(lineItems, forKey: .lineItems) + try container.encode(links, forKey: .links) + try container.encodeIfPresent(messages, forKey: .messages) + try container.encodeIfPresent(order, forKey: .order) + try container.encodeIfPresent(payment, forKey: .payment) + try container.encodeIfPresent(signals, forKey: .signals) + try container.encode(status, forKey: .status) + try container.encode(totals, forKey: .totals) + try container.encode(ucp, forKey: .ucp) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: Checkout convenience initializers and mutators @@ -119,7 +177,7 @@ public extension Checkout { messages: [Message]?? = nil, order: OrderConfirmation?? = nil, payment: Payment?? = nil, - signals: Signals?? = nil, + signals: [String: JSONAny]?? = nil, status: CheckoutStatus? = nil, totals: [CheckoutTotal]? = nil, ucp: UCPCheckoutResponseSchema? = nil @@ -180,6 +238,36 @@ public struct Buyer: Codable, Sendable { self.lastName = lastName self.phoneNumber = phoneNumber } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["email", "first_name", "last_name", "phone_number"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.email = try container.decodeIfPresent(String.self, forKey: .email) + self.firstName = try container.decodeIfPresent(String.self, forKey: .firstName) + self.lastName = try container.decodeIfPresent(String.self, forKey: .lastName) + self.phoneNumber = try container.decodeIfPresent(String.self, forKey: .phoneNumber) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(email, forKey: .email) + try container.encodeIfPresent(firstName, forKey: .firstName) + try container.encodeIfPresent(lastName, forKey: .lastName) + try container.encodeIfPresent(phoneNumber, forKey: .phoneNumber) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: Buyer convenience initializers and mutators @@ -285,6 +373,42 @@ public struct Context: Codable, Sendable { self.language = language self.postalCode = postalCode } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["address_country", "address_region", "currency", "eligibility", "intent", "language", "postal_code"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.addressCountry = try container.decodeIfPresent(String.self, forKey: .addressCountry) + self.addressRegion = try container.decodeIfPresent(String.self, forKey: .addressRegion) + self.currency = try container.decodeIfPresent(String.self, forKey: .currency) + self.eligibility = try container.decodeIfPresent([String].self, forKey: .eligibility) + self.intent = try container.decodeIfPresent(String.self, forKey: .intent) + self.language = try container.decodeIfPresent(String.self, forKey: .language) + self.postalCode = try container.decodeIfPresent(String.self, forKey: .postalCode) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(addressCountry, forKey: .addressCountry) + try container.encodeIfPresent(addressRegion, forKey: .addressRegion) + try container.encodeIfPresent(currency, forKey: .currency) + try container.encodeIfPresent(eligibility, forKey: .eligibility) + try container.encodeIfPresent(intent, forKey: .intent) + try container.encodeIfPresent(language, forKey: .language) + try container.encodeIfPresent(postalCode, forKey: .postalCode) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: Context convenience initializers and mutators @@ -616,6 +740,36 @@ public struct FulfillmentAvailableMethod: Codable, Sendable { self.lineItemIDS = lineItemIDS self.type = type } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["description", "fulfillable_on", "line_item_ids", "type"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.description = try container.decodeIfPresent(String.self, forKey: .description) + self.fulfillableOn = try container.decodeIfPresent(String.self, forKey: .fulfillableOn) + self.lineItemIDS = try container.decode([String].self, forKey: .lineItemIDS) + self.type = try container.decode(FulfillmentMethodType.self, forKey: .type) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(fulfillableOn, forKey: .fulfillableOn) + try container.encode(lineItemIDS, forKey: .lineItemIDS) + try container.encode(type, forKey: .type) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: FulfillmentAvailableMethod convenience initializers and mutators @@ -699,6 +853,40 @@ public struct FulfillmentMethod: Codable, Sendable { self.selectedDestinationID = selectedDestinationID self.type = type } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["destinations", "groups", "id", "line_item_ids", "selected_destination_id", "type"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.destinations = try container.decodeIfPresent([FulfillmentDestination].self, forKey: .destinations) + self.groups = try container.decodeIfPresent([FulfillmentGroup].self, forKey: .groups) + self.id = try container.decode(String.self, forKey: .id) + self.lineItemIDS = try container.decode([String].self, forKey: .lineItemIDS) + self.selectedDestinationID = try container.decodeIfPresent(String.self, forKey: .selectedDestinationID) + self.type = try container.decode(FulfillmentMethodType.self, forKey: .type) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(destinations, forKey: .destinations) + try container.encodeIfPresent(groups, forKey: .groups) + try container.encode(id, forKey: .id) + try container.encode(lineItemIDS, forKey: .lineItemIDS) + try container.encodeIfPresent(selectedDestinationID, forKey: .selectedDestinationID) + try container.encode(type, forKey: .type) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: FulfillmentMethod convenience initializers and mutators @@ -1009,6 +1197,36 @@ public struct FulfillmentGroup: Codable, Sendable { self.options = options self.selectedOptionID = selectedOptionID } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["id", "line_item_ids", "options", "selected_option_id"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.id = try container.decode(String.self, forKey: .id) + self.lineItemIDS = try container.decode([String].self, forKey: .lineItemIDS) + self.options = try container.decodeIfPresent([FulfillmentOption].self, forKey: .options) + self.selectedOptionID = try container.decodeIfPresent(String.self, forKey: .selectedOptionID) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(id, forKey: .id) + try container.encode(lineItemIDS, forKey: .lineItemIDS) + try container.encodeIfPresent(options, forKey: .options) + try container.encodeIfPresent(selectedOptionID, forKey: .selectedOptionID) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: FulfillmentGroup convenience initializers and mutators @@ -1087,6 +1305,42 @@ public struct FulfillmentOption: Codable, Sendable { self.title = title self.totals = totals } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["carrier", "description", "earliest_fulfillment_time", "id", "latest_fulfillment_time", "title", "totals"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.carrier = try container.decodeIfPresent(String.self, forKey: .carrier) + self.description = try container.decodeIfPresent(String.self, forKey: .description) + self.earliestFulfillmentTime = try container.decodeIfPresent(Date.self, forKey: .earliestFulfillmentTime) + self.id = try container.decode(String.self, forKey: .id) + self.latestFulfillmentTime = try container.decodeIfPresent(Date.self, forKey: .latestFulfillmentTime) + self.title = try container.decode(String.self, forKey: .title) + self.totals = try container.decode([LineItemTotal].self, forKey: .totals) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(carrier, forKey: .carrier) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(earliestFulfillmentTime, forKey: .earliestFulfillmentTime) + try container.encode(id, forKey: .id) + try container.encodeIfPresent(latestFulfillmentTime, forKey: .latestFulfillmentTime) + try container.encode(title, forKey: .title) + try container.encode(totals, forKey: .totals) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: FulfillmentOption convenience initializers and mutators @@ -1678,6 +1932,42 @@ public struct SelectedPaymentInstrument: Codable, Sendable { self.type = type self.selected = selected } + + public var additionalProperties: [String: JSONAny] = [:] + + private static let knownAdditionalPropertyKeys: Set = ["billing_address", "credential", "display", "handler_id", "id", "type", "selected"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.billingAddress = try container.decodeIfPresent(PostalAddress.self, forKey: .billingAddress) + self.credential = try container.decodeIfPresent(PaymentCredential.self, forKey: .credential) + self.display = try container.decodeIfPresent([String: JSONAny].self, forKey: .display) + self.handlerID = try container.decode(String.self, forKey: .handlerID) + self.id = try container.decode(String.self, forKey: .id) + self.type = try container.decode(String.self, forKey: .type) + self.selected = try container.decodeIfPresent(Bool.self, forKey: .selected) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(billingAddress, forKey: .billingAddress) + try container.encodeIfPresent(credential, forKey: .credential) + try container.encodeIfPresent(display, forKey: .display) + try container.encode(handlerID, forKey: .handlerID) + try container.encode(id, forKey: .id) + try container.encode(type, forKey: .type) + try container.encodeIfPresent(selected, forKey: .selected) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: SelectedPaymentInstrument convenience initializers and mutators @@ -1737,6 +2027,34 @@ public struct PaymentCredential: Codable, Sendable { public init(type: String) { self.type = type } + + public var additionalProperties: [String: JSONAny] = [:] + + public enum CodingKeys: String, CodingKey { + case type + } + + private static let knownAdditionalPropertyKeys: Set = ["type"] + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + self.type = try container.decode(String.self, forKey: .type) + let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self) + var extras: [String: JSONAny] = [:] + for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) { + extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key) + } + self.additionalProperties = extras + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(type, forKey: .type) + var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self) + for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) { + try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!) + } + } } // MARK: PaymentCredential convenience initializers and mutators @@ -1779,60 +2097,7 @@ public extension PaymentCredential { /// observation or independently verifiable third-party attestations. All signal keys MUST /// use reverse-domain naming to ensure provenance and prevent collisions when multiple /// extensions contribute to the shared namespace. -// MARK: - Signals -public struct Signals: Codable, Sendable { - /// Client's IP address (IPv4 or IPv6). - public let devUcpBuyerIP: String? - /// Client's HTTP User-Agent header or equivalent. - public let devUcpUserAgent: String? - public enum CodingKeys: String, CodingKey { - case devUcpBuyerIP = "dev.ucp.buyer_ip" - case devUcpUserAgent = "dev.ucp.user_agent" - } - - public init(devUcpBuyerIP: String?, devUcpUserAgent: String?) { - self.devUcpBuyerIP = devUcpBuyerIP - self.devUcpUserAgent = devUcpUserAgent - } -} - -// MARK: Signals convenience initializers and mutators - -public extension Signals { - init(data: Data) throws { - self = try newJSONDecoder().decode(Signals.self, from: data) - } - - init(_ json: String, using encoding: String.Encoding = .utf8) throws { - guard let data = json.data(using: encoding) else { - throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) - } - try self.init(data: data) - } - - init(fromURL url: URL) throws { - try self.init(data: try Data(contentsOf: url)) - } - - func with( - devUcpBuyerIP: String?? = nil, - devUcpUserAgent: String?? = nil - ) -> Signals { - return Signals( - devUcpBuyerIP: devUcpBuyerIP ?? self.devUcpBuyerIP, - devUcpUserAgent: devUcpUserAgent ?? self.devUcpUserAgent - ) - } - - func jsonData() throws -> Data { - return try newJSONEncoder().encode(self) - } - - func jsonString(encoding: String.Encoding = .utf8) throws -> String? { - return String(data: try self.jsonData(), encoding: encoding) - } -} /// Checkout state indicating the current phase and required action. See Checkout Status /// lifecycle documentation for state transition details. diff --git a/protocol/languages/swift/Tests/EmbeddedCheckoutProtocolTests/ModelDecodingTests.swift b/protocol/languages/swift/Tests/EmbeddedCheckoutProtocolTests/ModelDecodingTests.swift index 51a5ca88..3ed00696 100644 --- a/protocol/languages/swift/Tests/EmbeddedCheckoutProtocolTests/ModelDecodingTests.swift +++ b/protocol/languages/swift/Tests/EmbeddedCheckoutProtocolTests/ModelDecodingTests.swift @@ -153,6 +153,36 @@ struct ModelDecodingTests { #expect(colorScheme == [.light, .dark]) #expect(config.delegate == ["window.open"]) } + + @Test func preservesUnknownExtensionKeysOnCheckout() throws { + let json = """ + { + "id": "checkout-123", + "currency": "USD", + "line_items": [], + "links": [], + "status": "incomplete", + "totals": [], + "ucp": {"payment_handlers": {}, "version": "2026-04-08"}, + "signals": {"dev.ucp.buyer_ip": "203.0.113.7", "com.example.device_id": "abc-123"}, + "com.example.foo": "bar" + } + """ + var checkout = try JSONDecoder().decode(Checkout.self, from: Data(json.utf8)) + let reEncoded = try JSONEncoder().encode(checkout) + let object = try #require(try JSONSerialization.jsonObject(with: reEncoded) as? [String: Any]) + + #expect(object["com.example.foo"] as? String == "bar") + + let signals = try #require(object["signals"] as? [String: Any]) + #expect(signals["dev.ucp.buyer_ip"] as? String == "203.0.113.7") + #expect(signals["com.example.device_id"] as? String == "abc-123") + + checkout.additionalProperties["id"] = try JSONDecoder().decode(JSONAny.self, from: Data("\"extension-id\"".utf8)) + let collisionEncoded = try JSONEncoder().encode(checkout) + let collisionObject = try #require(try JSONSerialization.jsonObject(with: collisionEncoded) as? [String: Any]) + #expect(collisionObject["id"] as? String == "checkout-123") + } } private func fixtureString(_ name: String) throws -> String { diff --git a/protocol/languages/typescript/src/generated/Models.d.ts b/protocol/languages/typescript/src/generated/Models.d.ts index 969e595e..90672cf1 100644 --- a/protocol/languages/typescript/src/generated/Models.d.ts +++ b/protocol/languages/typescript/src/generated/Models.d.ts @@ -51,7 +51,9 @@ export interface Checkout { */ order?: OrderConfirmation; payment?: Payment; - signals?: Signals; + signals?: { + [key: string]: any; + }; /** * Checkout state indicating the current phase and required action. See Checkout Status * lifecycle documentation for state transition details. @@ -715,17 +717,6 @@ export interface PaymentCredential { * use reverse-domain naming to ensure provenance and prevent collisions when multiple * extensions contribute to the shared namespace. */ -export interface Signals { - /** - * Client's IP address (IPv4 or IPv6). - */ - devUcpBuyerIp?: string; - /** - * Client's HTTP User-Agent header or equivalent. - */ - devUcpUserAgent?: string; - [property: string]: any; -} /** * Checkout state indicating the current phase and required action. See Checkout Status * lifecycle documentation for state transition details. diff --git a/protocol/languages/typescript/src/generated/Models.ts b/protocol/languages/typescript/src/generated/Models.ts index da7035db..42d46909 100644 --- a/protocol/languages/typescript/src/generated/Models.ts +++ b/protocol/languages/typescript/src/generated/Models.ts @@ -69,7 +69,7 @@ export interface Checkout { */ order?: OrderConfirmation; payment?: Payment; - signals?: Signals; + signals?: { [key: string]: any }; /** * Checkout state indicating the current phase and required action. See Checkout Status * lifecycle documentation for state transition details. @@ -758,17 +758,6 @@ export interface PaymentCredential { * use reverse-domain naming to ensure provenance and prevent collisions when multiple * extensions contribute to the shared namespace. */ -export interface Signals { - /** - * Client's IP address (IPv4 or IPv6). - */ - devUcpBuyerIp?: string; - /** - * Client's HTTP User-Agent header or equivalent. - */ - devUcpUserAgent?: string; - [property: string]: any; -} /** * Checkout state indicating the current phase and required action. See Checkout Status @@ -2132,7 +2121,7 @@ const typeMap: any = { { json: "messages", js: "messages", typ: u(undefined, a(r("Message"))) }, { json: "order", js: "order", typ: u(undefined, r("OrderConfirmation")) }, { json: "payment", js: "payment", typ: u(undefined, r("Payment")) }, - { json: "signals", js: "signals", typ: u(undefined, r("Signals")) }, + { json: "signals", js: "signals", typ: u(undefined, m("any")) }, { json: "status", js: "status", typ: r("CheckoutStatus") }, { json: "totals", js: "totals", typ: a(r("CheckoutTotal")) }, { json: "ucp", js: "ucp", typ: r("UcpCheckoutResponseSchema") }, @@ -2283,10 +2272,6 @@ const typeMap: any = { "PaymentCredential": o([ { json: "type", js: "type", typ: "" }, ], "any"), - "Signals": o([ - { json: "dev.ucp.buyer_ip", js: "devUcpBuyerIp", typ: u(undefined, "") }, - { json: "dev.ucp.user_agent", js: "devUcpUserAgent", typ: u(undefined, "") }, - ], "any"), "CheckoutTotal": o([ { json: "amount", js: "amount", typ: 0 }, { json: "display_text", js: "displayText", typ: u(undefined, "") }, diff --git a/protocol/languages/typescript/test/extension-preservation.test.ts b/protocol/languages/typescript/test/extension-preservation.test.ts new file mode 100644 index 00000000..94bbb270 --- /dev/null +++ b/protocol/languages/typescript/test/extension-preservation.test.ts @@ -0,0 +1,27 @@ +import {expect, test} from 'vitest'; + +import {Convert} from '../src/generated/Models'; + +test('preserves unknown top-level and nested extension keys through Convert round-trip', () => { + const wire = { + id: 'checkout-123', + currency: 'USD', + line_items: [], + links: [], + status: 'incomplete', + totals: [], + ucp: {payment_handlers: {}, version: '2026-04-08'}, + signals: { + 'dev.ucp.buyer_ip': '203.0.113.7', + 'com.example.device_id': 'abc-123', + }, + 'com.example.foo': 'bar', + }; + + const checkout = Convert.toCheckout(JSON.stringify(wire)); + const roundTripped = JSON.parse(Convert.checkoutToJson(checkout)); + + expect(roundTripped['com.example.foo']).toBe('bar'); + expect(roundTripped.signals['dev.ucp.buyer_ip']).toBe('203.0.113.7'); + expect(roundTripped.signals['com.example.device_id']).toBe('abc-123'); +}); diff --git a/protocol/scripts/generate_models.mjs b/protocol/scripts/generate_models.mjs index b79caa86..9c7da986 100755 --- a/protocol/scripts/generate_models.mjs +++ b/protocol/scripts/generate_models.mjs @@ -386,7 +386,246 @@ function commonSchemaSources(specDir) { ]; } -async function generateKotlin(specDir, output) { +async function listJsonFiles(dir) { + const entries = await fs.readdir(dir, {withFileTypes: true}); + const files = await Promise.all(entries.map(async (entry) => { + const entryPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + return listJsonFiles(entryPath); + } + return entry.isFile() && entry.name.endsWith(".json") ? [entryPath] : []; + })); + return files.flat(); +} + +function schemaTitleToTypeName(title) { + return title + .split(/[^A-Za-z0-9]+/g) + .filter(Boolean) + .map((part) => (/^[A-Z0-9]+$/.test(part) ? part : `${part.charAt(0).toUpperCase()}${part.slice(1)}`)) + .join(""); +} + +function jsonPointerGet(doc, pointer) { + if (pointer === "") { + return doc; + } + + return pointer + .split("/") + .filter(Boolean) + .reduce((node, rawSegment) => { + if (node == null) { + return undefined; + } + const segment = rawSegment.replaceAll("~1", "/").replaceAll("~0", "~"); + return node[segment]; + }, doc); +} + +async function collectModelCodegenInfo(specDir) { + const schemaDir = path.dirname(specDir); + const jsonFiles = await listJsonFiles(schemaDir); + const docs = new Map(); + for (const file of jsonFiles) { + docs.set(file, await readJson(file)); + } + + const resolveRef = (ref, baseFile) => { + const [relativePath = "", pointer = ""] = ref.split("#"); + const targetFile = relativePath === "" ? baseFile : path.resolve(path.dirname(baseFile), relativePath); + const targetDoc = docs.get(targetFile); + return targetDoc === undefined ? undefined : {file: targetFile, node: jsonPointerGet(targetDoc, pointer)}; + }; + + const isOpenObject = (node, file, seen = new Set()) => { + if (node == null || typeof node !== "object") { + return false; + } + + const ref = typeof node.$ref === "string" ? resolveRef(node.$ref, file) : undefined; + if (ref !== undefined) { + const key = `${ref.file}#${node.$ref.split("#")[1] ?? ""}`; + if (!seen.has(key)) { + seen.add(key); + if (isOpenObject(ref.node, ref.file, seen)) { + return true; + } + } + } + + if (Array.isArray(node.allOf) && node.allOf.some((item) => isOpenObject(item, file, seen))) { + return true; + } + + return node.type === "object" && node.additionalProperties !== undefined && node.additionalProperties !== false; + }; + + const isMapModel = (node) => + node?.type === "object" && + node.propertyNames !== undefined && + node.additionalProperties !== undefined && + node.additionalProperties !== false; + + const openModelNames = new Set(); + const mapModelNames = new Set(); + const visit = (node, file) => { + if (node == null || typeof node !== "object") { + return; + } + + if (typeof node.title === "string" && isOpenObject(node, file)) { + const modelName = schemaTitleToTypeName(node.title); + openModelNames.add(modelName); + if (isMapModel(node)) { + mapModelNames.add(modelName); + } + } + + for (const value of Object.values(node)) { + if (Array.isArray(value)) { + for (const item of value) { + visit(item, file); + } + } else { + visit(value, file); + } + } + }; + + for (const [file, doc] of docs) { + visit(doc, file); + } + + return {openModelNames, mapModelNames}; +} + +function parseKotlinFields(inner) { + const fields = []; + const fieldPattern = /(?: @SerialName\("([^"]+)"\)\n)? public val (\w+): ([^\n]+)/g; + let entry; + while ((entry = fieldPattern.exec(inner)) !== null) { + const [, serialName, name, tail] = entry; + let rest = tail.trim(); + if (rest.endsWith(",")) { + rest = rest.slice(0, -1).trim(); + } + const eq = rest.indexOf(" = "); + const type = eq === -1 ? rest : rest.slice(0, eq).trim(); + const optional = eq !== -1; + fields.push({ + name, + wire: serialName ?? name, + type, + baseType: type.endsWith("?") ? type.slice(0, -1) : type, + optional, + }); + } + return fields; +} + +function kotlinSerializerObject(name, fields) { + const knownList = fields.map((field) => `"${field.wire}"`).join(", "); + + const ctorArgs = fields + .map((field) => + field.optional + ? ` ${field.name} = obj["${field.wire}"]?.let { json.decodeFromJsonElement(serializer<${field.baseType}>(), it) },` + : ` ${field.name} = json.decodeFromJsonElement(serializer<${field.type}>(), obj["${field.wire}"] ?: throw SerializationException("Missing ${field.wire} for ${name}")),`, + ) + .join("\n"); + + const serLines = fields + .map((field) => + field.optional + ? ` value.${field.name}?.let { map["${field.wire}"] = json.encodeToJsonElement(serializer<${field.baseType}>(), it) }` + : ` map["${field.wire}"] = json.encodeToJsonElement(serializer<${field.type}>(), value.${field.name})`, + ) + .join("\n"); + + return [ + "", + `public object ${name}Serializer : KSerializer<${name}> {`, + " override val descriptor: SerialDescriptor =", + ` buildClassSerialDescriptor("com.shopify.ucp.embedded.checkout.${name}")`, + "", + ` override fun deserialize(decoder: Decoder): ${name} {`, + " val input = decoder as? JsonDecoder", + ` ?: throw SerializationException("${name} can only be deserialized from JSON")`, + " val obj = input.decodeJsonElement().jsonObject", + " val json = input.json", + ` val known = setOf(${knownList})`, + ` return ${name}(`, + ctorArgs, + " additionalProperties = obj.filterKeys { it !in known }", + " )", + " }", + "", + ` override fun serialize(encoder: Encoder, value: ${name}) {`, + " val output = encoder as? JsonEncoder", + ` ?: throw SerializationException("${name} can only be serialized to JSON")`, + " val json = output.json", + ` val known = setOf(${knownList})`, + " val map = linkedMapOf()", + serLines, + " value.additionalProperties", + " .filterKeys { it !in known }", + " .forEach { (key, element) -> map[key] = element }", + " output.encodeJsonElement(JsonObject(map))", + " }", + "}", + ] + .filter((line) => line !== "") + .join("\n"); +} + +function injectKotlinAdditionalProperties(source, openModelNames) { + const serializers = []; + const generatedModelNames = new Set([...source.matchAll(/^public data class (\w+) \(/gm)].map((entry) => entry[1])); + const missingOpenModels = new Set([...openModelNames].filter((name) => generatedModelNames.has(name))); + + const result = source.replace( + /^@Serializable\npublic data class (\w+) \(\n([\s\S]*?)\n\)$/gm, + (match, name, inner) => { + if (!openModelNames.has(name)) { + return match; + } + + missingOpenModels.delete(name); + const fields = parseKotlinFields(inner); + serializers.push(kotlinSerializerObject(name, fields)); + + const widenedInner = `${inner},\n\n public val additionalProperties: Map = emptyMap()`; + return `@Serializable(with = ${name}Serializer::class)\npublic data class ${name} (\n${widenedInner}\n)`; + }, + ); + + if (missingOpenModels.size > 0) { + throw new Error(`Kotlin additionalProperties injection missed open models:\n${[...missingOpenModels].sort().join("\n")}`); + } + + return `${result}\n${serializers.join("\n")}\n`; +} + +function removeKotlinMapModel(source, modelName) { + return source.replace( + new RegExp(`\\n@Serializable\\npublic data class ${modelName} \\(\\n[\\s\\S]*?\\n\\)\\n`, "m"), + "\n", + ); +} + +function useKotlinMapsForModels(source, mapModelNames) { + let result = source; + for (const modelName of mapModelNames) { + result = removeKotlinMapModel(result, modelName); + result = result + .replace(new RegExp(`\\b${modelName}\\?`, "g"), "JsonObject?") + .replace(new RegExp(`\\b${modelName}\\b`, "g"), "JsonObject"); + } + return result; +} + +async function generateKotlin(specDir, output, {openModelNames, mapModelNames}) { await fs.mkdir(path.dirname(output), {recursive: true}); await runQuicktype([ "--lang", @@ -413,20 +652,131 @@ async function generateKotlin(specDir, output) { .replace(/^ val /gm, " public val ") .replace(/\(val value: /g, "(public val value: "); - const withSerializer = result.replace( + const withMapModels = useKotlinMapsForModels(result, mapModelNames); + + const withSerializer = withMapModels.replace( /@Serializable(\s+public sealed class Extends\b)/, "@Serializable(with = ExtendsSerializer::class)$1", ); - if (withSerializer === result) { + if (withSerializer === withMapModels) { throw new Error("ExtendsSerializer injection failed; quicktype Extends output may have changed"); } - return withSerializer; + return injectKotlinAdditionalProperties(withSerializer, openModelNames); }); } -async function generateSwift(specDir, output) { +function injectSwiftAdditionalProperties(source, openModelNames) { + let injected = 0; + const generatedModelNames = new Set([...source.matchAll(/^public struct (\w+): Codable, Sendable \{$/gm)].map((entry) => entry[1])); + const missingOpenModels = new Set([...openModelNames].filter((name) => generatedModelNames.has(name))); + + const result = source.replace( + /^public struct (\w+): Codable, Sendable \{\n([\s\S]*?)\n\}$/gm, + (match, name, inner) => { + if (!openModelNames.has(name)) { + return match; + } + if (/\n public init\(from decoder:/.test(inner)) { + throw new Error(`Swift additionalProperties injection: struct ${name} already declares a custom decoder`); + } + + missingOpenModels.delete(name); + const props = [...inner.matchAll(/^ public let (\w+): (.+)$/gm)].map((entry) => { + const type = entry[2].trim(); + const optional = type.endsWith("?"); + return {name: entry[1], optional, baseType: optional ? type.slice(0, -1) : type}; + }); + + const hasCodingKeys = /^ public enum CodingKeys: String, CodingKey \{/m.test(inner); + + const lines = ["", "", " public var additionalProperties: [String: JSONAny] = [:]", ""]; + const knownWireKeys = props.map((prop) => { + const match = inner.match(new RegExp(`^ case ${prop.name} = "([^"]+)"$`, "m")); + return `"${match?.[1] ?? prop.name}"`; + }).join(", "); + + if (!hasCodingKeys) { + lines.push(" public enum CodingKeys: String, CodingKey {"); + if (props.length > 0) { + lines.push(` case ${props.map((prop) => prop.name).join(", ")}`); + } + lines.push(" }", ""); + } + + lines.push(` private static let knownAdditionalPropertyKeys: Set = [${knownWireKeys}]`, ""); + + lines.push(" public init(from decoder: Decoder) throws {"); + lines.push(" let container = try decoder.container(keyedBy: CodingKeys.self)"); + for (const prop of props) { + lines.push( + prop.optional + ? ` self.${prop.name} = try container.decodeIfPresent(${prop.baseType}.self, forKey: .${prop.name})` + : ` self.${prop.name} = try container.decode(${prop.baseType}.self, forKey: .${prop.name})`, + ); + } + lines.push(" let additionalContainer = try decoder.container(keyedBy: JSONCodingKey.self)"); + lines.push(" var extras: [String: JSONAny] = [:]"); + lines.push(" for key in additionalContainer.allKeys where !Self.knownAdditionalPropertyKeys.contains(key.stringValue) {"); + lines.push(" extras[key.stringValue] = try additionalContainer.decode(JSONAny.self, forKey: key)"); + lines.push(" }"); + lines.push(" self.additionalProperties = extras"); + lines.push(" }", ""); + + lines.push(" public func encode(to encoder: Encoder) throws {"); + lines.push(" var container = encoder.container(keyedBy: CodingKeys.self)"); + for (const prop of props) { + lines.push( + prop.optional + ? ` try container.encodeIfPresent(${prop.name}, forKey: .${prop.name})` + : ` try container.encode(${prop.name}, forKey: .${prop.name})`, + ); + } + lines.push(" var additionalContainer = encoder.container(keyedBy: JSONCodingKey.self)"); + lines.push(" for key in additionalProperties.keys.sorted() where !Self.knownAdditionalPropertyKeys.contains(key) {"); + lines.push(" try additionalContainer.encode(additionalProperties[key]!, forKey: JSONCodingKey(stringValue: key)!)"); + lines.push(" }"); + lines.push(" }"); + + injected += 1; + return `public struct ${name}: Codable, Sendable {\n${inner}${lines.join("\n")}\n}`; + }, + ); + + if (missingOpenModels.size > 0) { + throw new Error(`Swift additionalProperties injection missed open models:\n${[...missingOpenModels].sort().join("\n")}`); + } + + return result; +} + +function removeSwiftMapModel(source, modelName) { + return source + .replace( + new RegExp(`\\n// MARK: - ${modelName}\\n[\\s\\S]*?^public struct ${modelName}: Codable, Sendable \\{\\n[\\s\\S]*?^\\}\\n`, "m"), + "\n", + ) + .replace( + new RegExp(`\\n// MARK: ${modelName} convenience initializers and mutators\\n[\\s\\S]*?^\\}\\n`, "m"), + "\n", + ); +} + +function useSwiftMapsForModels(source, mapModelNames) { + let result = source; + for (const modelName of mapModelNames) { + result = removeSwiftMapModel(result, modelName); + result = result + .replace(new RegExp(`\\b${modelName}\\?\\?`, "g"), "[String: JSONAny]??") + .replace(new RegExp(`\\b${modelName}\\?`, "g"), "[String: JSONAny]?") + .replace(new RegExp(`\\b${modelName}\\.self`, "g"), "[String: JSONAny].self") + .replace(new RegExp(`\\b${modelName}\\b`, "g"), "[String: JSONAny]"); + } + return result; +} + +async function generateSwift(specDir, output, {openModelNames, mapModelNames}) { await fs.mkdir(path.dirname(output), {recursive: true}); await runQuicktype([ "--lang", @@ -459,13 +809,38 @@ async function generateSwift(specDir, output) { throw new Error(`Swift JSON helper normalization failed; quicktype helper output changed (sha256: ${generatedHelperHash})`); } - return `${source.slice(0, helperStart)}${SWIFT_JSON_HELPER_REPLACEMENT}`; + const stripped = `${source.slice(0, helperStart)}${SWIFT_JSON_HELPER_REPLACEMENT}`; + const withMapModels = useSwiftMapsForModels(stripped, mapModelNames); + return injectSwiftAdditionalProperties(withMapModels, openModelNames); }); await run("node", [path.join(PROTOCOL_DIR, "scripts", "generate_swift_catalog.mjs")]); } -async function generateTypescript(specDir, output) { +function removeTypescriptMapModel(source, modelName) { + return source + .replace( + new RegExp(`\\nexport interface ${modelName} \\{\\n[\\s\\S]*?^\\}\\n`, "m"), + "\n", + ) + .replace( + new RegExp(`\\n "${modelName}": o\\(\\[\\n[\\s\\S]*?\\n \\], "any"\\),`, "m"), + "", + ); +} + +function useTypescriptMapsForModels(source, mapModelNames) { + let result = source; + for (const modelName of mapModelNames) { + result = removeTypescriptMapModel(result, modelName); + result = result + .replace(new RegExp(`\\b${modelName}\\b`, "g"), "{ [key: string]: any }") + .replace(new RegExp(`r\\("\\{ \\[key: string\\]: any \\}"\\)`, "g"), 'm("any")'); + } + return result; +} + +async function generateTypescript(specDir, output, {mapModelNames}) { await fs.mkdir(path.dirname(output), {recursive: true}); await runQuicktype([ "--lang", @@ -482,7 +857,9 @@ async function generateTypescript(specDir, output) { output, ]); - await normalizeGeneratedFile(output, (source) => source.replace(/^type /gm, "export type ")); + await normalizeGeneratedFile(output, (source) => + useTypescriptMapsForModels(source.replace(/^type /gm, "export type "), mapModelNames), + ); await run("node", [path.join(PROTOCOL_DIR, "scripts", "generate_typescript_notifications.mjs")]); @@ -533,6 +910,8 @@ async function main() { } } + const modelCodegenInfo = await collectModelCodegenInfo(specDir); + switch (lang) { case "kotlin": { const target = output || path.join( @@ -551,20 +930,20 @@ async function main() { "checkout", "Models.kt", ); - await generateKotlin(specDir, target); + await generateKotlin(specDir, target, modelCodegenInfo); await run("node", [path.join(PROTOCOL_DIR, "scripts", "generate_kotlin_catalog.mjs")]); console.log(`Generated ${target}`); break; } case "swift": { const target = output || path.join(PROTOCOL_DIR, "languages", "swift", "Sources", "UniversalCommerceProtocol", "EmbeddedCheckoutProtocol", "Generated", "Models.swift"); - await generateSwift(specDir, target); + await generateSwift(specDir, target, modelCodegenInfo); console.log(`Generated ${target}`); break; } case "typescript": { const target = output || path.join(PROTOCOL_DIR, "languages", "typescript", "src", "generated", "Models.ts"); - const declarationOutput = await generateTypescript(specDir, target); + const declarationOutput = await generateTypescript(specDir, target, modelCodegenInfo); console.log(`Generated ${target}, TypeScript protocol notifications, and ${declarationOutput}`); break; }