From 6123d818fbec746770d11ffcdeb65eaf9c492142 Mon Sep 17 00:00:00 2001 From: Matthew Abbott Date: Thu, 17 Oct 2024 22:28:41 +0100 Subject: [PATCH] fix: Do not convert price to int, it's already an int. Callers must set the right value, don't convert. --- libs/SailthruSDK/Api/Purchases/Purchase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/SailthruSDK/Api/Purchases/Purchase.cs b/libs/SailthruSDK/Api/Purchases/Purchase.cs index b548954..5301918 100644 --- a/libs/SailthruSDK/Api/Purchases/Purchase.cs +++ b/libs/SailthruSDK/Api/Purchases/Purchase.cs @@ -187,7 +187,7 @@ public override void Write(Utf8JsonWriter writer, UpsertPurchaseRequest value, J writer.WriteStringProperty("id", item.Id, options); writer.WriteStringProperty("title", item.Title, options); - writer.WriteNumberProperty("price", (int)(item.Price * 100), options); + writer.WriteNumberProperty("price", item.Price, options); writer.WriteNumberProperty("qty", item.Quantity, options); writer.WriteStringProperty("url", item.Url, options);