public final class InventorySyncOptionsBuilder extends BaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>
InventorySyncOptions.batchSize, beforeCreateCallback, beforeUpdateCallback, cacheSize, ctpClient, errorCallback, warningCallback| Modifier and Type | Method and Description |
|---|---|
InventorySyncOptions |
build()
Returns new instance of
InventorySyncOptions, enriched with all attributes provided to
this builder. |
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.
|
protected InventorySyncOptionsBuilder |
getThis()
Returns
this instance of InventorySyncOptionsBuilder. |
static InventorySyncOptionsBuilder |
of(io.sphere.sdk.client.SphereClient ctpClient)
Creates a new instance of
InventorySyncOptionsBuilder given a SphereClient
responsible for interaction with the target CTP project, with the default batch size (BATCH_SIZE_DEFAULT = 150). |
batchSize, beforeCreateCallback, beforeUpdateCallback, cacheSize, errorCallback, warningCallbackpublic static InventorySyncOptionsBuilder of(@Nonnull io.sphere.sdk.client.SphereClient ctpClient)
InventorySyncOptionsBuilder given a SphereClient
responsible for interaction with the target CTP project, with the default batch size (BATCH_SIZE_DEFAULT = 150).ctpClient - SphereClient responsible for interaction with the target CTP project.InventorySyncOptionsBuilderpublic InventorySyncOptionsBuilder ensureChannels(boolean ensureChannels)
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.
ensureChannels - boolean that indicates whether sync process should create supply channel
of given key when it doesn't exist in a target project yetthis instance of InventorySyncOptionsBuilderpublic InventorySyncOptions build()
InventorySyncOptions, enriched with all attributes provided to
this builder.build in class BaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>InventorySyncOptionsprotected InventorySyncOptionsBuilder getThis()
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.
getThis in class BaseSyncOptionsBuilder<InventorySyncOptionsBuilder,InventorySyncOptions,io.sphere.sdk.inventory.InventoryEntry,io.sphere.sdk.inventory.InventoryEntryDraft,io.sphere.sdk.inventory.InventoryEntry>