Interface ReplicaCartDraft

All Superinterfaces:
Draft<ReplicaCartDraft>, WithKey

public interface ReplicaCartDraft extends WithKey, Draft<ReplicaCartDraft>

Used for replicating an existing Cart or Order.


Example to create an instance using the builder pattern

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

    • getReference

      @NotNull @Valid @NotNull @Valid Reference 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

      String getKey()

      User-defined unique identifier for the Cart.

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

      void setReference(Reference 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
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Cart.

      Parameters:
      key - value to be set
    • of

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

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

      factory method to create a deep copy of ReplicaCartDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ReplicaCartDraftBuilder builder()
      builder factory method for ReplicaCartDraft
      Returns:
      builder
    • builder

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

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

      @Deprecated default void setReference(Object reference)
      Deprecated.
    • typeReference

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