From 7baf85927bfbfb6a8d02100a2e48c785901ea204 Mon Sep 17 00:00:00 2001 From: zont Date: Thu, 15 Feb 2024 18:37:47 +0400 Subject: [PATCH 1/3] ECWID-134924 OE2: add scheduled fields to ecwid-java-api-client: added fields --- .../v3/dto/profile/result/FetchedStoreProfile.kt | 10 +++++++++- .../nullablepropertyrules/FetchedStoreProfileRules.kt | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 9ec89ccba..5cb03661f 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 @@ -283,9 +283,17 @@ data class FetchedStoreProfile( val pickupInstruction: String? = null, val scheduledPickup: Boolean? = null, val pickupPreparationTimeHours: Int? = null, - val pickupBusinessHours: String? = null + val pickupBusinessHours: String? = null, + val scheduled: Boolean? = null, + val scheduledTimePrecisionType: ScheduledTimePrecisionType? = null, ) + @Suppress("unused") + enum class ScheduledTimePrecisionType { + DATE, + DATE_AND_TIME_SLOT; + } + @Suppress("unused") enum class FulfilmentType { pickup, shipping, delivery 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 12b3ce887..c82f17278 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 @@ -317,6 +317,8 @@ val fetchedStoreProfileNullablePropertyRules: List> = IgnoreNullable(FetchedStoreProfile.ShippingOption::scheduledPickup), IgnoreNullable(FetchedStoreProfile.ShippingOption::shippingCostMarkup), IgnoreNullable(FetchedStoreProfile.ShippingOption::title), + AllowNullable(FetchedStoreProfile.ShippingOption::scheduled), + AllowNullable(FetchedStoreProfile.ShippingOption::scheduledTimePrecisionType), IgnoreNullable(FetchedStoreProfile.ShippingOrigin::city), IgnoreNullable(FetchedStoreProfile.ShippingOrigin::companyName), IgnoreNullable(FetchedStoreProfile.ShippingOrigin::countryCode), From ab2c57c02da743f60b78dcba057e6c3f76c12b95 Mon Sep 17 00:00:00 2001 From: zont Date: Thu, 15 Feb 2024 18:49:51 +0400 Subject: [PATCH 2/3] ECWID-134924 OE2: add scheduled fields to ecwid-java-api-client: removed unnecessary semicolon --- .../apiclient/v3/dto/profile/result/FetchedStoreProfile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5cb03661f..9d02e1b03 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 @@ -291,7 +291,7 @@ data class FetchedStoreProfile( @Suppress("unused") enum class ScheduledTimePrecisionType { DATE, - DATE_AND_TIME_SLOT; + DATE_AND_TIME_SLOT } @Suppress("unused") From 52c8b84542d1048ca9a10c458b957933174503ca Mon Sep 17 00:00:00 2001 From: Alexander Blake Date: Mon, 26 Feb 2024 09:56:45 +0400 Subject: [PATCH 3/3] =?UTF-8?q?ECWID-134924=20OE2:=20add=20scheduled=20fie?= =?UTF-8?q?lds=20to=20ecwid-java-api-client=20=E2=80=94=20added=20to=20Fet?= =?UTF-8?q?chedOrder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v3/dto/order/enums/ScheduledTimePrecisionType.kt | 7 +++++++ .../ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt | 2 ++ .../ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt | 2 ++ .../v3/rule/nullablepropertyrules/FetchedOrderRules.kt | 2 ++ 4 files changed, 13 insertions(+) create mode 100644 src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/ScheduledTimePrecisionType.kt diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/ScheduledTimePrecisionType.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/ScheduledTimePrecisionType.kt new file mode 100644 index 000000000..6608de3b1 --- /dev/null +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/ScheduledTimePrecisionType.kt @@ -0,0 +1,7 @@ +package com.ecwid.apiclient.v3.dto.order.enums + +@Suppress("unused") +enum class ScheduledTimePrecisionType { + DATE, + DATE_AND_TIME_SLOT, +} 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 cf448b420..ef256e6c7 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 @@ -329,6 +329,8 @@ data class FetchedOrder( val locationId: String? = null, val localizedLabel: String? = null, val isShippingLimit: Boolean? = null, + val scheduled: Boolean? = null, + val scheduledTimePrecisionType: ScheduledTimePrecisionType? = 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 9511cc9ce..3f4c3755c 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt @@ -216,6 +216,8 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedOrder.ShippingOption::shippingRateWithoutTax), ReadOnly(FetchedOrder.ShippingOption::localizedLabel), ReadOnly(FetchedOrder.ShippingOption::isShippingLimit), + ReadOnly(FetchedOrder.ShippingOption::scheduled), + ReadOnly(FetchedOrder.ShippingOption::scheduledTimePrecisionType), 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 3231e1181..54dd2c938 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 @@ -182,6 +182,8 @@ val fetchedOrderNullablePropertyRules: List> = listOf IgnoreNullable(FetchedOrder.ShippingOption::shippingRate), AllowNullable(FetchedOrder.ShippingOption::isShippingLimit), AllowNullable(FetchedOrder.ShippingOption::localizedLabel), + AllowNullable(FetchedOrder.ShippingOption::scheduled), + AllowNullable(FetchedOrder.ShippingOption::scheduledTimePrecisionType), AllowNullable(FetchedOrder.ShippingServiceInfo::carrier), AllowNullable(FetchedOrder.ShippingServiceInfo::carrierName), AllowNullable(FetchedOrder.ShippingServiceInfo::carrierServiceCode),