diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedShippingOption.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedShippingOption.kt index ca01dde8..a42333ca 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedShippingOption.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedShippingOption.kt @@ -27,6 +27,7 @@ fun FetchedShippingOption.toUpdated(): UpdatedShippingOption { pickupInstruction = pickupInstruction, pickupInstructionTranslated = pickupInstructionTranslated, scheduledPickup = scheduledPickup, + pickupPrecisionType = pickupPrecisionType, type = type, carrier = carrier, carrierSettings = carrierSettings?.toUpdate(), diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/PickupPrecisionType.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/PickupPrecisionType.kt new file mode 100644 index 00000000..3cba4ef5 --- /dev/null +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/enums/PickupPrecisionType.kt @@ -0,0 +1,7 @@ +package com.ecwid.apiclient.v3.dto.order.enums + +@Suppress("unused") +enum class PickupPrecisionType { + DATE_ONLY, + DATE_AND_TIME, +} 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 f2a3f794..bdd3abd0 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 @@ -342,6 +342,7 @@ data class FetchedOrder( val estimatedTransitTime: String? = null, val isPickup: Boolean? = null, val pickupInstruction: String? = null, + val pickupPrecisionType: PickupPrecisionType? = null, val fulfillmentType: FulfillmentType? = null, val locationId: String? = null, val localizedLabel: String? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/enums/PickupPrecisionType.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/enums/PickupPrecisionType.kt new file mode 100644 index 00000000..62e103d6 --- /dev/null +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/enums/PickupPrecisionType.kt @@ -0,0 +1,7 @@ +package com.ecwid.apiclient.v3.dto.profile.enums + +@Suppress("unused") +enum class PickupPrecisionType { + DATE_ONLY, + DATE_AND_TIME, +} diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedShippingOption.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedShippingOption.kt index 3ebd20ad..20b0e85a 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedShippingOption.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedShippingOption.kt @@ -27,6 +27,7 @@ data class UpdatedShippingOption( val pickupPreparationTimeHours: Int? = null, val pickupBusinessHours: String? = null, val scheduledPickup: Boolean? = null, + val pickupPrecisionType: PickupPrecisionType? = null, val type: String? = null, val carrier: String? = null, val carrierMethods: List? = null, diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedShippingOption.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedShippingOption.kt index caf93309..6ae60122 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedShippingOption.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedShippingOption.kt @@ -27,6 +27,7 @@ data class FetchedShippingOption( val pickupPreparationTimeHours: Int? = null, val pickupBusinessHours: String? = null, val scheduledPickup: Boolean? = null, + val pickupPrecisionType: PickupPrecisionType? = null, val type: String? = null, val carrier: String? = null, val carrierMethods: List? = null, 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 17d43c1a..3af00e22 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt @@ -227,6 +227,7 @@ val nonUpdatablePropertyRules: List> = listOf( ReadOnly(FetchedOrder.ShippingOption::scheduled), ReadOnly(FetchedOrder.ShippingOption::scheduledTimePrecisionType), ReadOnly(FetchedOrder.ShippingOption::timeSlotLengthInMinutes), + ReadOnly(FetchedOrder.ShippingOption::pickupPrecisionType), 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 4e9898e4..b146cc8a 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 @@ -188,6 +188,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder.ShippingOption::scheduled), AllowNullable(FetchedOrder.ShippingOption::scheduledTimePrecisionType), AllowNullable(FetchedOrder.ShippingOption::timeSlotLengthInMinutes), + AllowNullable(FetchedOrder.ShippingOption::pickupPrecisionType), AllowNullable(FetchedOrder.ShippingServiceInfo::carrier), AllowNullable(FetchedOrder.ShippingServiceInfo::carrierName), AllowNullable(FetchedOrder.ShippingServiceInfo::carrierServiceCode), diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedShippingoptionNullablePropertyRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedShippingoptionNullablePropertyRules.kt index d854f756..131eb2e9 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedShippingoptionNullablePropertyRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedShippingoptionNullablePropertyRules.kt @@ -25,6 +25,7 @@ val fetchedShippingOptionNullablePropertyRules: List> AllowNullable(FetchedShippingOption::pickupInstructionTranslated), AllowNullable(FetchedShippingOption::pickupBusinessHours), AllowNullable(FetchedShippingOption::pickupPreparationTimeHours), + AllowNullable(FetchedShippingOption::pickupPrecisionType), AllowNullable(FetchedShippingOption::type), AllowNullable(FetchedShippingOption::carrier), AllowNullable(FetchedShippingOption::carrierSettings),