diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt index 934ed9dd..76af5e35 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt @@ -337,5 +337,6 @@ fun FetchedOrder.LoyaltyRedemption.toUpdated(): UpdatedOrder.LoyaltyRedemption { return UpdatedOrder.LoyaltyRedemption( id = this.id, amount = this.amount, + cancelled = this.cancelled, ) } diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt index 4b8d25b3..cdca867a 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt @@ -358,6 +358,7 @@ data class UpdatedOrder( val orderDetailsDisplaySection: String? = null, val orderBy: String? = null ) + data class Loyalty( val earned: Double? = null, val redemption: LoyaltyRedemption? = null, @@ -367,6 +368,7 @@ data class UpdatedOrder( data class LoyaltyRedemption( val id: String? = null, val amount: Double? = null, + val cancelled: Boolean? = null, ) companion object { diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt index 54fdf51c..906f7397 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt @@ -522,5 +522,6 @@ data class FetchedOrder( data class LoyaltyRedemption( val id: String? = null, val amount: Double? = null, + val cancelled: Boolean? = null, ) } diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt index 09b8cf21..b50d999c 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt @@ -319,5 +319,6 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder.Loyalty::redemption), AllowNullable(FetchedOrder.LoyaltyRedemption::id), AllowNullable(FetchedOrder.LoyaltyRedemption::amount), + AllowNullable(FetchedOrder.LoyaltyRedemption::cancelled), AllowNullable(FetchedOrder::customerFiscalCode), )