Skip to content

Commit

Permalink
ECWID-123615 Shipping labels: add availability status in the order in…
Browse files Browse the repository at this point in the history
… the Public API v3 - changed shippingLabelAvailableForPurchase to non nullable
  • Loading branch information
warlock-ecwid committed Jul 25, 2023
1 parent 8816b5b commit dd3e898
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ data class FetchedOrder(
val disableAllCustomerNotifications: Boolean? = null,
val externalOrderData: ExternalOrderData? = null,
val paymentReference: String? = null,
val shippingLabelAvailableForPurchase: Boolean? = null,
val shippingLabelAvailableForPurchase: Boolean = false,

) : ApiFetchedDTO {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.ecwid.apiclient.v3.rule
import com.ecwid.apiclient.v3.dto.common.ApiUpdatedDTO
import com.ecwid.apiclient.v3.dto.coupon.request.UpdatedCoupon
import com.ecwid.apiclient.v3.dto.customergroup.request.UpdatedCustomerGroup
import com.ecwid.apiclient.v3.dto.order.result.FetchedOrder
import com.ecwid.apiclient.v3.dto.product.request.UpdatedProduct
import com.ecwid.apiclient.v3.dto.profile.request.UpdatedStoreProfile
import com.ecwid.apiclient.v3.dto.storage.request.UpdatedStorageData
Expand Down Expand Up @@ -53,6 +54,8 @@ val nonnullPropertyRules: List<NonnullPropertyRule<*, *>> = listOf(
AllowNonnull(UpdatedStoreProfile.ProductFiltersSettings::filterSections),
AllowNonnull(UpdatedVariation.RecurringChargeSettings::recurringInterval),
AllowNonnull(UpdatedVariation.RecurringChargeSettings::recurringIntervalCount),

AllowNonnull(FetchedOrder::shippingLabelAvailableForPurchase),
)

sealed class NonnullPropertyRule<T, R>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,4 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
AllowNullable(FetchedOrder.OrderItemAttributeValue::value),
AllowNullable(FetchedOrder.OrderItemAttributeValue::valueTranslated),
AllowNullable(FetchedOrder::paymentReference),
AllowNullable(FetchedOrder::shippingLabelAvailableForPurchase),
)

0 comments on commit dd3e898

Please sign in to comment.