From 150a3010f5b451917219a7bfbde966872d6d4469 Mon Sep 17 00:00:00 2001 From: Alexander Blake Date: Mon, 26 Feb 2024 11:28:24 +0400 Subject: [PATCH] ECWID-134924 OE2: add shippingMethodId field --- src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt | 1 + .../com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt | 1 + .../com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt | 1 + .../apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt | 1 + 4 files changed, 4 insertions(+) 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 e86d6b106..37832bdf0 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt @@ -232,6 +232,7 @@ fun FetchedOrder.PersonInfo.toUpdated(): UpdatedOrder.PersonInfo { fun FetchedOrder.ShippingOption.toUpdated(): UpdatedOrder.ShippingOption { return UpdatedOrder.ShippingOption( + shippingMethodId = shippingMethodId, shippingCarrierName = shippingCarrierName, shippingMethodName = shippingMethodName, shippingRate = shippingRate, 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 549b6ca18..a98b3cb7a 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 @@ -294,6 +294,7 @@ data class UpdatedOrder( ) data class ShippingOption( + val shippingMethodId: String? = null, val shippingCarrierName: String? = null, val shippingMethodName: String? = null, val shippingRate: Double? = null, 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 ef256e6c7..b63b25b87 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 @@ -318,6 +318,7 @@ data class FetchedOrder( ) data class ShippingOption( + val shippingMethodId: String? = null, val shippingCarrierName: String? = null, val shippingMethodName: String? = null, val shippingRate: Double? = 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 54dd2c938..85d0b9b7d 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 @@ -178,6 +178,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder.ShippingOption::locationId), IgnoreNullable(FetchedOrder.ShippingOption::pickupInstruction), IgnoreNullable(FetchedOrder.ShippingOption::shippingCarrierName), + AllowNullable(FetchedOrder.ShippingOption::shippingMethodId), IgnoreNullable(FetchedOrder.ShippingOption::shippingMethodName), IgnoreNullable(FetchedOrder.ShippingOption::shippingRate), AllowNullable(FetchedOrder.ShippingOption::isShippingLimit),