Class InventorySyncOptionsBuilder

    • Method Detail

      • of

        public static InventorySyncOptionsBuilder of​(@Nonnull
                                                     com.commercetools.api.client.ProjectApiRoot ctpClient)
        Creates a new instance of InventorySyncOptionsBuilder given a ProjectApiRoot responsible for interaction with the target CTP project, with the default batch size (BATCH_SIZE_DEFAULT = 150).
        Parameters:
        ctpClient - ProjectApiRoot responsible for interaction with the target CTP project.
        Returns:
        new instance of InventorySyncOptionsBuilder
      • ensureChannels

        public InventorySyncOptionsBuilder ensureChannels​(boolean ensureChannels)
        Set option that indicates whether sync process should create a supply channel of given key when it doesn't exist in a target project yet. If set to true sync process would try to create new supply channel of given key, otherwise the sync process would log an error and fail to process the draft with the given supply channel key.

        This property is ENSURE_CHANNELS_DEFAULT by default.

        Parameters:
        ensureChannels - boolean that indicates whether sync process should create supply channel of given key when it doesn't exist in a target project yet
        Returns:
        this instance of InventorySyncOptionsBuilder
      • getThis

        protected InventorySyncOptionsBuilder getThis()
        Returns this instance of InventorySyncOptionsBuilder.

        Inherited doc:
        Returns this instance of T, which extends BaseSyncOptionsBuilder. The purpose of this method is to make sure that this is an instance of a class which extends BaseSyncOptionsBuilder in order to be used in the generic methods of the class. Otherwise, without this method, the methods above would need to cast this to T which could lead to a runtime error of the class was extended in a wrong way.

        Specified by:
        getThis in class BaseSyncOptionsBuilder<InventorySyncOptionsBuilder,​InventorySyncOptions,​com.commercetools.api.models.inventory.InventoryEntry,​com.commercetools.api.models.inventory.InventoryEntryDraft,​com.commercetools.api.models.inventory.InventoryEntryUpdateAction>
        Returns:
        an instance of the class that overrides this method.