Class ReplicaCartDraftBuilder

java.lang.Object
com.commercetools.api.models.cart.ReplicaCartDraftBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ReplicaCartDraft>

public class ReplicaCartDraftBuilder extends Object implements io.vrap.rmf.base.client.Builder<ReplicaCartDraft>
ReplicaCartDraftBuilder
Example to create an instance using the builder pattern

     ReplicaCartDraft replicaCartDraft = ReplicaCartDraft.builder()
             .reference(referenceBuilder -> referenceBuilder)
             .build()
 
  • Constructor Details

  • Method Details

    • reference

      A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

      Parameters:
      reference - value to be set
      Returns:
      Builder
    • reference

      public ReplicaCartDraftBuilder reference(Function<ReferenceBuilder,io.vrap.rmf.base.client.Builder<? extends Reference>> builder)

      A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

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

      User-defined unique identifier for the Cart.

      Parameters:
      key - value to be set
      Returns:
      Builder
    • getReference

      A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

      Returns:
      reference
    • getKey

      User-defined unique identifier for the Cart.

      Returns:
      key
    • build

      builds ReplicaCartDraft with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ReplicaCartDraft>
      Returns:
      ReplicaCartDraft
    • buildUnchecked

      builds ReplicaCartDraft without checking for non-null required values
      Returns:
      ReplicaCartDraft
    • of

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

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