Skip to content

Commit ee030ab

Browse files
authored
Merge pull request #377 from Ecwid/ECWID-134924
ECWID-134924 OE2: add scheduled fields to ecwid-java-api-client: adde…
2 parents 399e9d4 + 52c8b84 commit ee030ab

6 files changed

Lines changed: 24 additions & 1 deletion

File tree

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 ScheduledTimePrecisionType {
5+
DATE,
6+
DATE_AND_TIME_SLOT,
7+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ data class FetchedOrder(
329329
val locationId: String? = null,
330330
val localizedLabel: String? = null,
331331
val isShippingLimit: Boolean? = null,
332+
val scheduled: Boolean? = null,
333+
val scheduledTimePrecisionType: ScheduledTimePrecisionType? = null,
332334
)
333335

334336
data class HandlingFee(

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,17 @@ data class FetchedStoreProfile(
283283
val pickupInstruction: String? = null,
284284
val scheduledPickup: Boolean? = null,
285285
val pickupPreparationTimeHours: Int? = null,
286-
val pickupBusinessHours: String? = null
286+
val pickupBusinessHours: String? = null,
287+
val scheduled: Boolean? = null,
288+
val scheduledTimePrecisionType: ScheduledTimePrecisionType? = null,
287289
)
288290

291+
@Suppress("unused")
292+
enum class ScheduledTimePrecisionType {
293+
DATE,
294+
DATE_AND_TIME_SLOT
295+
}
296+
289297
@Suppress("unused")
290298
enum class FulfilmentType {
291299
pickup, shipping, delivery

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
216216
ReadOnly(FetchedOrder.ShippingOption::shippingRateWithoutTax),
217217
ReadOnly(FetchedOrder.ShippingOption::localizedLabel),
218218
ReadOnly(FetchedOrder.ShippingOption::isShippingLimit),
219+
ReadOnly(FetchedOrder.ShippingOption::scheduled),
220+
ReadOnly(FetchedOrder.ShippingOption::scheduledTimePrecisionType),
219221
ReadOnly(FetchedOrder.HandlingFee::valueWithoutTax),
220222
ReadOnly(FetchedOrder.Surcharge::totalWithoutTax),
221223
Ignored(FetchedOrder::refundedAmount),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
182182
IgnoreNullable(FetchedOrder.ShippingOption::shippingRate),
183183
AllowNullable(FetchedOrder.ShippingOption::isShippingLimit),
184184
AllowNullable(FetchedOrder.ShippingOption::localizedLabel),
185+
AllowNullable(FetchedOrder.ShippingOption::scheduled),
186+
AllowNullable(FetchedOrder.ShippingOption::scheduledTimePrecisionType),
185187
AllowNullable(FetchedOrder.ShippingServiceInfo::carrier),
186188
AllowNullable(FetchedOrder.ShippingServiceInfo::carrierName),
187189
AllowNullable(FetchedOrder.ShippingServiceInfo::carrierServiceCode),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ val fetchedStoreProfileNullablePropertyRules: List<NullablePropertyRule<*, *>> =
317317
IgnoreNullable(FetchedStoreProfile.ShippingOption::scheduledPickup),
318318
IgnoreNullable(FetchedStoreProfile.ShippingOption::shippingCostMarkup),
319319
IgnoreNullable(FetchedStoreProfile.ShippingOption::title),
320+
AllowNullable(FetchedStoreProfile.ShippingOption::scheduled),
321+
AllowNullable(FetchedStoreProfile.ShippingOption::scheduledTimePrecisionType),
320322
IgnoreNullable(FetchedStoreProfile.ShippingOrigin::city),
321323
IgnoreNullable(FetchedStoreProfile.ShippingOrigin::companyName),
322324
IgnoreNullable(FetchedStoreProfile.ShippingOrigin::countryCode),

0 commit comments

Comments
 (0)