/// <summary> /// Callback which is invoked when a shipping method is selected for the current /// checkout. /// </summary> /// <param name="serializedMessage"> /// A <see cref="ShippingMethod"> object represented as a JSON string /// containing the selected shipping method. /// </param> public void OnUpdateShippingLine(string serializedMessage) { var message = NativeMessage.CreateFromJSON(serializedMessage); var contentDictionary = (Dictionary <string, object>)Json.Deserialize(message.Content); var shippingMethod = ShippingMethod.CreateFromJson(contentDictionary); UpdateShippingLine(shippingMethod, message); }