Skip to content

Commit 5a8616c

Browse files
authored
Merge pull request #474 from Ecwid/ECWID-159524_pickup_precision_type
ECWID-159524 Add PickupPrecisionType to ShippingOption
2 parents d8fe1a4 + 7413c03 commit 5a8616c

9 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedShippingOption.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fun FetchedShippingOption.toUpdated(): UpdatedShippingOption {
2727
pickupInstruction = pickupInstruction,
2828
pickupInstructionTranslated = pickupInstructionTranslated,
2929
scheduledPickup = scheduledPickup,
30+
pickupPrecisionType = pickupPrecisionType,
3031
type = type,
3132
carrier = carrier,
3233
carrierSettings = carrierSettings?.toUpdate(),
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.ecwid.apiclient.v3.dto.order.enums
2+
3+
@Suppress("unused")
4+
enum class PickupPrecisionType {
5+
DATE_ONLY,
6+
DATE_AND_TIME,
7+
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ data class FetchedOrder(
342342
val estimatedTransitTime: String? = null,
343343
val isPickup: Boolean? = null,
344344
val pickupInstruction: String? = null,
345+
val pickupPrecisionType: PickupPrecisionType? = null,
345346
val fulfillmentType: FulfillmentType? = null,
346347
val locationId: String? = null,
347348
val localizedLabel: String? = null,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.ecwid.apiclient.v3.dto.profile.enums
2+
3+
@Suppress("unused")
4+
enum class PickupPrecisionType {
5+
DATE_ONLY,
6+
DATE_AND_TIME,
7+
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedShippingOption.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ data class UpdatedShippingOption(
2727
val pickupPreparationTimeHours: Int? = null,
2828
val pickupBusinessHours: String? = null,
2929
val scheduledPickup: Boolean? = null,
30+
val pickupPrecisionType: PickupPrecisionType? = null,
3031
val type: String? = null,
3132
val carrier: String? = null,
3233
val carrierMethods: List<CarrierMethod>? = null,

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedShippingOption.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ data class FetchedShippingOption(
2727
val pickupPreparationTimeHours: Int? = null,
2828
val pickupBusinessHours: String? = null,
2929
val scheduledPickup: Boolean? = null,
30+
val pickupPrecisionType: PickupPrecisionType? = null,
3031
val type: String? = null,
3132
val carrier: String? = null,
3233
val carrierMethods: List<CarrierMethod>? = null,

src/test/kotlin/com/ecwid/apiclient/v3/rule/NonUpdatablePropertyRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
227227
ReadOnly(FetchedOrder.ShippingOption::scheduled),
228228
ReadOnly(FetchedOrder.ShippingOption::scheduledTimePrecisionType),
229229
ReadOnly(FetchedOrder.ShippingOption::timeSlotLengthInMinutes),
230+
ReadOnly(FetchedOrder.ShippingOption::pickupPrecisionType),
230231
ReadOnly(FetchedOrder.HandlingFee::valueWithoutTax),
231232
ReadOnly(FetchedOrder.Surcharge::totalWithoutTax),
232233
Ignored(FetchedOrder::refundedAmount),

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
188188
AllowNullable(FetchedOrder.ShippingOption::scheduled),
189189
AllowNullable(FetchedOrder.ShippingOption::scheduledTimePrecisionType),
190190
AllowNullable(FetchedOrder.ShippingOption::timeSlotLengthInMinutes),
191+
AllowNullable(FetchedOrder.ShippingOption::pickupPrecisionType),
191192
AllowNullable(FetchedOrder.ShippingServiceInfo::carrier),
192193
AllowNullable(FetchedOrder.ShippingServiceInfo::carrierName),
193194
AllowNullable(FetchedOrder.ShippingServiceInfo::carrierServiceCode),

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedShippingoptionNullablePropertyRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ val fetchedShippingOptionNullablePropertyRules: List<NullablePropertyRule<*, *>>
2525
AllowNullable(FetchedShippingOption::pickupInstructionTranslated),
2626
AllowNullable(FetchedShippingOption::pickupBusinessHours),
2727
AllowNullable(FetchedShippingOption::pickupPreparationTimeHours),
28+
AllowNullable(FetchedShippingOption::pickupPrecisionType),
2829
AllowNullable(FetchedShippingOption::type),
2930
AllowNullable(FetchedShippingOption::carrier),
3031
AllowNullable(FetchedShippingOption::carrierSettings),

0 commit comments

Comments
 (0)