Interface StoreDraft

All Superinterfaces:
CustomizableDraft<StoreDraft>, Draft<StoreDraft>, WithKey

public interface StoreDraft extends CustomizableDraft<StoreDraft>, WithKey, Draft<StoreDraft>
StoreDraft
Example to create an instance using the builder pattern

     StoreDraft storeDraft = StoreDraft.builder()
             .key("{key}")
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique and immutable identifier for the Store. Keys can only contain alphanumeric characters, underscores, and hyphens.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getName

      @Valid @Valid LocalizedString getName()

      Name of the Store.

      Returns:
      name
    • getLanguages

      List<String> getLanguages()

      Languages defined in Project. Only languages defined in the Project can be used.

      Returns:
      languages
    • getCountries

      @Valid @Valid List<StoreCountry> getCountries()

      Countries defined for the Store.

      Returns:
      countries
    • getDistributionChannels

      @Valid @Valid List<ChannelResourceIdentifier> getDistributionChannels()

      ResourceIdentifier of a Channel with ProductDistribution ChannelRoleEnum.

      Returns:
      distributionChannels
    • getSupplyChannels

      @Valid @Valid List<ChannelResourceIdentifier> getSupplyChannels()

      ResourceIdentifier of a Channel with InventorySupply ChannelRoleEnum.

      Returns:
      supplyChannels
    • getProductSelections

      @Valid @Valid List<ProductSelectionSettingDraft> getProductSelections()

      Controls availability of Products for this Store via active/inactive Product Selections:

      • Leave empty if all Products in the Project should be available in this Store.
      • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
      • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
      • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
      Returns:
      productSelections
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom fields for the Store.

      Specified by:
      getCustom in interface CustomizableDraft<StoreDraft>
      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique and immutable identifier for the Store. Keys can only contain alphanumeric characters, underscores, and hyphens.

      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the Store.

      Parameters:
      name - value to be set
    • setLanguages

      void setLanguages(String... languages)

      Languages defined in Project. Only languages defined in the Project can be used.

      Parameters:
      languages - values to be set
    • setLanguages

      void setLanguages(List<String> languages)

      Languages defined in Project. Only languages defined in the Project can be used.

      Parameters:
      languages - values to be set
    • setCountries

      void setCountries(StoreCountry... countries)

      Countries defined for the Store.

      Parameters:
      countries - values to be set
    • setCountries

      void setCountries(List<StoreCountry> countries)

      Countries defined for the Store.

      Parameters:
      countries - values to be set
    • setDistributionChannels

      void setDistributionChannels(ChannelResourceIdentifier... distributionChannels)

      ResourceIdentifier of a Channel with ProductDistribution ChannelRoleEnum.

      Parameters:
      distributionChannels - values to be set
    • setDistributionChannels

      void setDistributionChannels(List<ChannelResourceIdentifier> distributionChannels)

      ResourceIdentifier of a Channel with ProductDistribution ChannelRoleEnum.

      Parameters:
      distributionChannels - values to be set
    • setSupplyChannels

      void setSupplyChannels(ChannelResourceIdentifier... supplyChannels)

      ResourceIdentifier of a Channel with InventorySupply ChannelRoleEnum.

      Parameters:
      supplyChannels - values to be set
    • setSupplyChannels

      void setSupplyChannels(List<ChannelResourceIdentifier> supplyChannels)

      ResourceIdentifier of a Channel with InventorySupply ChannelRoleEnum.

      Parameters:
      supplyChannels - values to be set
    • setProductSelections

      void setProductSelections(ProductSelectionSettingDraft... productSelections)

      Controls availability of Products for this Store via active/inactive Product Selections:

      • Leave empty if all Products in the Project should be available in this Store.
      • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
      • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
      • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
      Parameters:
      productSelections - values to be set
    • setProductSelections

      void setProductSelections(List<ProductSelectionSettingDraft> productSelections)

      Controls availability of Products for this Store via active/inactive Product Selections:

      • Leave empty if all Products in the Project should be available in this Store.
      • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
      • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
      • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
      Parameters:
      productSelections - values to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom fields for the Store.

      Specified by:
      setCustom in interface CustomizableDraft<StoreDraft>
      Parameters:
      custom - value to be set
    • of

      static StoreDraft of()
      factory method
      Returns:
      instance of StoreDraft
    • of

      static StoreDraft of(StoreDraft template)
      factory method to create a shallow copy StoreDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static StoreDraft deepCopy(@Nullable StoreDraft template)
      factory method to create a deep copy of StoreDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static StoreDraftBuilder builder()
      builder factory method for StoreDraft
      Returns:
      builder
    • builder

      static StoreDraftBuilder builder(StoreDraft template)
      create builder for StoreDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStoreDraft

      default <T> T withStoreDraft(Function<StoreDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<StoreDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference