Class StoreReferenceBuilder

java.lang.Object
com.commercetools.api.models.store.StoreReferenceBuilder
All Implemented Interfaces:
Builder<StoreReference>

public class StoreReferenceBuilder extends Object implements Builder<StoreReference>
StoreReferenceBuilder
Example to create an instance using the builder pattern

     StoreReference storeReference = StoreReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • StoreReferenceBuilder

      public StoreReferenceBuilder()
  • Method Details

    • id

      public StoreReferenceBuilder id(String id)

      Unique ID of the referenced Store.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • obj

      Contains the representation of the expanded Store. Only present in responses to requests with Reference Expansion for Stores.

      Parameters:
      builder - function to build the obj value
      Returns:
      Builder
    • withObj

      public StoreReferenceBuilder withObj(Function<StoreBuilder,Store> builder)

      Contains the representation of the expanded Store. Only present in responses to requests with Reference Expansion for Stores.

      Parameters:
      builder - function to build the obj value
      Returns:
      Builder
    • obj

      Contains the representation of the expanded Store. Only present in responses to requests with Reference Expansion for Stores.

      Parameters:
      obj - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      Unique ID of the referenced Store.

      Returns:
      id
    • getObj

      @Nullable public Store getObj()

      Contains the representation of the expanded Store. Only present in responses to requests with Reference Expansion for Stores.

      Returns:
      obj
    • build

      public StoreReference build()
      builds StoreReference with checking for non-null required values
      Specified by:
      build in interface Builder<StoreReference>
      Returns:
      StoreReference
    • buildUnchecked

      public StoreReference buildUnchecked()
      builds StoreReference without checking for non-null required values
      Returns:
      StoreReference
    • of

      public static StoreReferenceBuilder of()
      factory method for an instance of StoreReferenceBuilder
      Returns:
      builder
    • of

      public static StoreReferenceBuilder of(StoreReference template)
      create builder for StoreReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder