Skip to content

Commit 3a834f3

Browse files
Merge pull request #415 from Ecwid/ECWID-137762
ECWID-137762 X+E: Omni Loyalty - add auto-cancelation of loyalty on h…
2 parents 8ead405 + 1bdc8f2 commit 3a834f3

4 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,5 +337,6 @@ fun FetchedOrder.LoyaltyRedemption.toUpdated(): UpdatedOrder.LoyaltyRedemption {
337337
return UpdatedOrder.LoyaltyRedemption(
338338
id = this.id,
339339
amount = this.amount,
340+
cancelled = this.cancelled,
340341
)
341342
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ data class UpdatedOrder(
358358
val orderDetailsDisplaySection: String? = null,
359359
val orderBy: String? = null
360360
)
361+
361362
data class Loyalty(
362363
val earned: Double? = null,
363364
val redemption: LoyaltyRedemption? = null,
@@ -367,6 +368,7 @@ data class UpdatedOrder(
367368
data class LoyaltyRedemption(
368369
val id: String? = null,
369370
val amount: Double? = null,
371+
val cancelled: Boolean? = null,
370372
)
371373

372374
companion object {

src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,5 +522,6 @@ data class FetchedOrder(
522522
data class LoyaltyRedemption(
523523
val id: String? = null,
524524
val amount: Double? = null,
525+
val cancelled: Boolean? = null,
525526
)
526527
}

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,5 +319,6 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
319319
AllowNullable(FetchedOrder.Loyalty::redemption),
320320
AllowNullable(FetchedOrder.LoyaltyRedemption::id),
321321
AllowNullable(FetchedOrder.LoyaltyRedemption::amount),
322+
AllowNullable(FetchedOrder.LoyaltyRedemption::cancelled),
322323
AllowNullable(FetchedOrder::customerFiscalCode),
323324
)

0 commit comments

Comments
 (0)