From afea8a4dc8fe17f988e4da7e3b452c26dadcf994 Mon Sep 17 00:00:00 2001 From: Shatey Date: Fri, 14 Mar 2025 18:01:26 +0400 Subject: [PATCH 1/2] ECWID-159628 Template market: add timezoneOffsetInMinutes to apigate --- .../com/ecwid/apiclient/v3/converter/FetchedStoreProfile.kt | 1 + .../apiclient/v3/dto/profile/request/UpdatedStoreProfile.kt | 1 + .../ecwid/apiclient/v3/dto/profile/result/FetchedStoreProfile.kt | 1 + .../kotlin/com/ecwid/apiclient/v3/entity/StoreProfileTest.kt | 1 + .../v3/rule/nullablepropertyrules/FetchedStoreProfileRules.kt | 1 + 5 files changed, 5 insertions(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedStoreProfile.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedStoreProfile.kt index 2e049e4bc..d84ddfc35 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedStoreProfile.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedStoreProfile.kt @@ -204,6 +204,7 @@ fun FetchedStoreProfile.FormatsAndUnits.toUpdated(): UpdatedStoreProfile.Formats dateFormat = dateFormat, timeFormat = timeFormat, timezone = timezone, + timezoneOffsetInMinutes = timezoneOffsetInMinutes, dimensionsUnit = dimensionsUnit?.toUpdated(), volumeUnit = volumeUnit.toUpdated(), orderNumberPrefix = orderNumberPrefix, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedStoreProfile.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedStoreProfile.kt index 222bbfe29..243673dd3 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedStoreProfile.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedStoreProfile.kt @@ -180,6 +180,7 @@ data class UpdatedStoreProfile( val dateFormat: String? = null, val timeFormat: String? = null, val timezone: String? = null, + val timezoneOffsetInMinutes: Int? = null, val dimensionsUnit: DimensionUnit? = null, val volumeUnit: VolumeUnit? = null, val orderNumberPrefix: String? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedStoreProfile.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedStoreProfile.kt index d2251d1a3..1c4dd2d0b 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedStoreProfile.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedStoreProfile.kt @@ -214,6 +214,7 @@ data class FetchedStoreProfile( val dateFormat: String? = null, val timeFormat: String? = null, val timezone: String? = null, + val timezoneOffsetInMinutes: Int? = null, val dimensionsUnit: DimensionUnit? = null, val volumeUnit: VolumeUnit = VolumeUnit.ML, val orderNumberPrefix: String? = null, diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/entity/StoreProfileTest.kt b/src/test/kotlin/com/ecwid/apiclient/v3/entity/StoreProfileTest.kt index 75977c6dd..0f17a9b1b 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/entity/StoreProfileTest.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/entity/StoreProfileTest.kt @@ -105,6 +105,7 @@ class StoreProfileTest : BaseEntityTest() { dateFormat = "yyyy/MM/dd", timeFormat = "HH:mm:ss", timezone = "timezone", + timezoneOffsetInMinutes = 1234567, dimensionsUnit = UpdatedStoreProfile.DimensionUnit.MM, volumeUnit = UpdatedStoreProfile.VolumeUnit.L, orderNumberPrefix = "orderNumberPrefix", diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedStoreProfileRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedStoreProfileRules.kt index b7b5987e5..434501e77 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedStoreProfileRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedStoreProfileRules.kt @@ -193,6 +193,7 @@ val fetchedStoreProfileNullablePropertyRules: List> = IgnoreNullable(FetchedStoreProfile.FormatsAndUnits::orderNumberSuffix), IgnoreNullable(FetchedStoreProfile.FormatsAndUnits::timeFormat), IgnoreNullable(FetchedStoreProfile.FormatsAndUnits::timezone), + AllowNullable(FetchedStoreProfile.FormatsAndUnits::timezoneOffsetInMinutes), IgnoreNullable(FetchedStoreProfile.FormatsAndUnits::weightDecimalSeparator), IgnoreNullable(FetchedStoreProfile.FormatsAndUnits::weightGroupSeparator), IgnoreNullable(FetchedStoreProfile.FormatsAndUnits::weightPrecision), From 2d072ce992658538113b1764a799383947156aaf Mon Sep 17 00:00:00 2001 From: Shatey Date: Mon, 17 Mar 2025 17:14:52 +0400 Subject: [PATCH 2/2] ECWID-159628 Template market: add timezoneOffsetInMinutes to apigate . merge master --- .../com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt | 1 + .../com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt | 1 + .../apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt | 1 + 3 files changed, 3 insertions(+) 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 65f7bd4d6..f2a3f7949 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 @@ -348,6 +348,7 @@ data class FetchedOrder( val isShippingLimit: Boolean? = null, val scheduled: Boolean? = null, val scheduledTimePrecisionType: ScheduledTimePrecisionType? = null, + val timeSlotLengthInMinutes: Int? = null, ) data class HandlingFee( diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt index ff0e84f99..17d43c1ad 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt @@ -226,6 +226,7 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedOrder.ShippingOption::isShippingLimit), ReadOnly(FetchedOrder.ShippingOption::scheduled), ReadOnly(FetchedOrder.ShippingOption::scheduledTimePrecisionType), + ReadOnly(FetchedOrder.ShippingOption::timeSlotLengthInMinutes), ReadOnly(FetchedOrder.HandlingFee::valueWithoutTax), ReadOnly(FetchedOrder.Surcharge::totalWithoutTax), Ignored(FetchedOrder::refundedAmount), 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 5dbde3a33..4e9898e42 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 @@ -187,6 +187,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder.ShippingOption::localizedLabel), AllowNullable(FetchedOrder.ShippingOption::scheduled), AllowNullable(FetchedOrder.ShippingOption::scheduledTimePrecisionType), + AllowNullable(FetchedOrder.ShippingOption::timeSlotLengthInMinutes), AllowNullable(FetchedOrder.ShippingServiceInfo::carrier), AllowNullable(FetchedOrder.ShippingServiceInfo::carrierName), AllowNullable(FetchedOrder.ShippingServiceInfo::carrierServiceCode),