public final class CartDiscountReferenceReplacementUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static io.sphere.sdk.cartdiscounts.queries.CartDiscountQuery |
buildCartDiscountQuery()
Builds a
CartDiscountQuery for fetching cart discounts from a source CTP project with all the needed
references expanded for the sync:
Custom Type
|
static java.util.List<io.sphere.sdk.cartdiscounts.CartDiscountDraft> |
replaceCartDiscountsReferenceIdsWithKeys(java.util.List<io.sphere.sdk.cartdiscounts.CartDiscount> cartDiscounts)
Takes a list of CartDiscounts that are supposed to have their custom type references expanded in order to be able
to fetch the keys and replace the resource identifier ids with the corresponding keys and then return a new list
of cartDiscountDrafts with their resource identifiers containing keys instead of the ids.
|
@Nonnull
public static java.util.List<io.sphere.sdk.cartdiscounts.CartDiscountDraft> replaceCartDiscountsReferenceIdsWithKeys(@Nonnull
java.util.List<io.sphere.sdk.cartdiscounts.CartDiscount> cartDiscounts)
cartDiscounts - the cartDiscounts to replace their resource identifier ids with keyspublic static io.sphere.sdk.cartdiscounts.queries.CartDiscountQuery buildCartDiscountQuery()
CartDiscountQuery for fetching cart discounts from a source CTP project with all the needed
references expanded for the sync:
Note: Please only use this util if you desire to sync all the aforementioned references from a source commercetools project. Otherwise, it is more efficient to build the query without expansions, if they are not needed, to avoid unnecessarily bigger payloads fetched from the source project.