Class QuoteLabelBuilder

java.lang.Object
com.commercetools.history.models.label.QuoteLabelBuilder
All Implemented Interfaces:
Builder<QuoteLabel>

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

     QuoteLabel quoteLabel = QuoteLabel.builder()
             .key("{key}")
             .customer(customerBuilder -> customerBuilder)
             .stagedQuote(stagedQuoteBuilder -> stagedQuoteBuilder)
             .quoteRequest(quoteRequestBuilder -> quoteRequestBuilder)
             .build()
 
  • Constructor Details

    • QuoteLabelBuilder

      public QuoteLabelBuilder()
  • Method Details

    • key

      public QuoteLabelBuilder key(String key)

      User-defined unique identifier of the Quote.

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

      The Buyer who requested the Quote.

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

      public QuoteLabelBuilder withCustomer(Function<ReferenceBuilder,Reference> builder)

      The Buyer who requested the Quote.

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

      public QuoteLabelBuilder customer(Reference customer)

      The Buyer who requested the Quote.

      Parameters:
      customer - value to be set
      Returns:
      Builder
    • stagedQuote

      Staged Quote related to the Quote.

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

      public QuoteLabelBuilder withStagedQuote(Function<ReferenceBuilder,Reference> builder)

      Staged Quote related to the Quote.

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

      public QuoteLabelBuilder stagedQuote(Reference stagedQuote)

      Staged Quote related to the Quote.

      Parameters:
      stagedQuote - value to be set
      Returns:
      Builder
    • quoteRequest

      Quote Request related to the Quote.

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

      public QuoteLabelBuilder withQuoteRequest(Function<ReferenceBuilder,Reference> builder)

      Quote Request related to the Quote.

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

      public QuoteLabelBuilder quoteRequest(Reference quoteRequest)

      Quote Request related to the Quote.

      Parameters:
      quoteRequest - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()

      User-defined unique identifier of the Quote.

      Returns:
      key
    • getCustomer

      public Reference getCustomer()

      The Buyer who requested the Quote.

      Returns:
      customer
    • getStagedQuote

      public Reference getStagedQuote()

      Staged Quote related to the Quote.

      Returns:
      stagedQuote
    • getQuoteRequest

      public Reference getQuoteRequest()

      Quote Request related to the Quote.

      Returns:
      quoteRequest
    • build

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

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

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

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