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/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..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 @@ -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/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), 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),