Skip to content

Commit

Permalink
ECWID-126236. Added totalBeforeGiftCardRedemption to FetchedOrder con…
Browse files Browse the repository at this point in the history
…verter
  • Loading branch information
kitty-ecwid committed Sep 13, 2023
1 parent 39d3fb1 commit fb989e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ fun FetchedOrder.toUpdated(): UpdatedOrder {
total = total,
subtotal = subtotal,

totalBeforeGiftCardRedemption = totalBeforeGiftCardRedemption,

tax = tax,
customerTaxExempt = customerTaxExempt,
customerTaxId = customerTaxId,
Expand Down
4 changes: 3 additions & 1 deletion src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fun generateTestOrder(): UpdatedOrder {
val externalOrderId = "Order #" + randomAlphanumeric(8)
val externalFulfillment = randomBoolean()
val refererId = "Referer " + randomAlphanumeric(8)
val totalPrice = randomPrice()
return UpdatedOrder(
email = randomEmail(),
ipAddress = randomIp(),
Expand Down Expand Up @@ -49,7 +50,8 @@ fun generateTestOrder(): UpdatedOrder {
customerGroup = "Group " + randomAlphanumeric(8),
acceptMarketing = randomBoolean(),

total = randomPrice(),
total = totalPrice,
totalBeforeGiftCardRedemption = totalPrice,
subtotal = randomPrice(),

tax = randomPrice(),
Expand Down

0 comments on commit fb989e6

Please sign in to comment.