Skip to content

Commit 93aaf56

Browse files
committed
ECWID-163221 New Order Editor: Tax is automatically reset to a standard rate if a product was deleted from catalog
1 parent 2d65b48 commit 93aaf56

4 files changed

Lines changed: 5 additions & 1 deletion

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
@@ -175,6 +175,7 @@ fun FetchedOrder.OrderItem.toUpdated(): UpdatedOrder.OrderItem {
175175
discounts = discounts?.map(FetchedOrder.OrderItemDiscounts::toUpdated),
176176
externalReferenceId = externalReferenceId,
177177
isPreorder = isPreorder,
178+
taxClassCode = taxClassCode,
178179
)
179180
}
180181

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ data class UpdatedOrder(
180180
val discounts: List<OrderItemDiscounts>? = null,
181181
val externalReferenceId: String? = null,
182182
val isPreorder: Boolean? = null,
183+
var taxClassCode: String? = null,
183184
)
184185

185186
data class OrderItemSelectedOption(

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ data class FetchedOrder(
217217
val discounts: List<OrderItemDiscounts>? = null,
218218
val externalReferenceId: String? = null,
219219
val isPreorder: Boolean? = null,
220-
val attributes: List<OrderItemAttributeValue>? = null
220+
val attributes: List<OrderItemAttributeValue>? = null,
221+
val taxClassCode: String? = null
221222
)
222223

223224
data class RecurringChargeSettings(

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
@@ -99,6 +99,7 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
9999
IgnoreNullable(FetchedOrder.OrderItem::externalReferenceId),
100100
AllowNullable(FetchedOrder.OrderItem::isPreorder),
101101
AllowNullable(FetchedOrder.OrderItem::attributes),
102+
IgnoreNullable(FetchedOrder.OrderItem::taxClassCode),
102103
IgnoreNullable(FetchedOrder.OrderItemDiscounts::discountInfo),
103104
IgnoreNullable(FetchedOrder.OrderItemDiscounts::total),
104105
AllowNullable(FetchedOrder.OrderItemOptionFile::id),

0 commit comments

Comments
 (0)