Class CustomerLabelBuilder

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

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

     CustomerLabel customerLabel = CustomerLabel.builder()
             .firstName("{firstName}")
             .lastName("{lastName}")
             .customerNumber("{customerNumber}")
             .build()
 
  • Constructor Details

    • CustomerLabelBuilder

      public CustomerLabelBuilder()
  • Method Details

    • firstName

      public CustomerLabelBuilder firstName(String firstName)

      Given name (first name) of the Customer.

      Parameters:
      firstName - value to be set
      Returns:
      Builder
    • lastName

      public CustomerLabelBuilder lastName(String lastName)

      Family name (last name) of the Customer.

      Parameters:
      lastName - value to be set
      Returns:
      Builder
    • customerNumber

      public CustomerLabelBuilder customerNumber(String customerNumber)

      User-defined unique identifier of the Customer.

      Parameters:
      customerNumber - value to be set
      Returns:
      Builder
    • getFirstName

      public String getFirstName()

      Given name (first name) of the Customer.

      Returns:
      firstName
    • getLastName

      public String getLastName()

      Family name (last name) of the Customer.

      Returns:
      lastName
    • getCustomerNumber

      public String getCustomerNumber()

      User-defined unique identifier of the Customer.

      Returns:
      customerNumber
    • build

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

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

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

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