Class MyQuoteRequestDraftBuilder

java.lang.Object
com.commercetools.api.models.me.MyQuoteRequestDraftBuilder
All Implemented Interfaces:
Builder<MyQuoteRequestDraft>

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

     MyQuoteRequestDraft myQuoteRequestDraft = MyQuoteRequestDraft.builder()
             .cartId("{cartId}")
             .cartVersion(0.3)
             .build()
 
  • Constructor Details

    • MyQuoteRequestDraftBuilder

      public MyQuoteRequestDraftBuilder()
  • Method Details

    • cartId

      public MyQuoteRequestDraftBuilder cartId(String cartId)

      id of the Cart from which the Quote Request is created. Carts with Discount Codes and Carts with Multiple ShippingMode are not supported. The Cart must have a shippingAddress defined, otherwise an InvalidOperation error is returned when creating a Quote Request.

      Parameters:
      cartId - value to be set
      Returns:
      Builder
    • cartVersion

      public MyQuoteRequestDraftBuilder cartVersion(Long cartVersion)

      Current version of the Cart.

      Parameters:
      cartVersion - value to be set
      Returns:
      Builder
    • comment

      public MyQuoteRequestDraftBuilder comment(@Nullable String comment)

      Message from the Buyer included in the Quote Request.

      Parameters:
      comment - value to be set
      Returns:
      Builder
    • getCartId

      public String getCartId()

      id of the Cart from which the Quote Request is created. Carts with Discount Codes and Carts with Multiple ShippingMode are not supported. The Cart must have a shippingAddress defined, otherwise an InvalidOperation error is returned when creating a Quote Request.

      Returns:
      cartId
    • getCartVersion

      public Long getCartVersion()

      Current version of the Cart.

      Returns:
      cartVersion
    • getComment

      @Nullable public String getComment()

      Message from the Buyer included in the Quote Request.

      Returns:
      comment
    • build

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

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

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

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