public final class VariantReferenceReplacementUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<io.sphere.sdk.products.ProductVariantDraft> |
replaceVariantsReferenceIdsWithKeys(java.util.List<io.sphere.sdk.products.ProductVariant> productVariants)
Takes a list of Variants that are supposed to have their prices', assets' and attributes' references expanded in
order to be able to fetch the keys and replace the reference ids with the corresponding keys and then return a
new list of product variant drafts with their references containing keys instead of the ids.
|
@Nonnull
public static java.util.List<io.sphere.sdk.products.ProductVariantDraft> replaceVariantsReferenceIdsWithKeys(@Nonnull
java.util.List<io.sphere.sdk.products.ProductVariant> productVariants)
Note:If the references are not expanded for a product variant, the reference ids will not be replaced with keys and will still have their ids in place.
productVariants - the product variants to replace their reference ids with keys