Class CustomerSignInResultBuilder

java.lang.Object
com.commercetools.api.models.customer.CustomerSignInResultBuilder
All Implemented Interfaces:
Builder<CustomerSignInResult>

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

     CustomerSignInResult customerSignInResult = CustomerSignInResult.builder()
             .customer(customerBuilder -> customerBuilder)
             .build()
 
  • Constructor Details

    • CustomerSignInResultBuilder

      public CustomerSignInResultBuilder()
  • Method Details

    • customer

      Customer signed up or signed in after authentication.

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

      Customer signed up or signed in after authentication.

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

      public CustomerSignInResultBuilder customer(Customer customer)

      Customer signed up or signed in after authentication.

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

      Cart associated with the Customer. If empty, the Customer does not have a Cart assigned.

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

      Cart associated with the Customer. If empty, the Customer does not have a Cart assigned.

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

      Cart associated with the Customer. If empty, the Customer does not have a Cart assigned.

      Parameters:
      cart - value to be set
      Returns:
      Builder
    • getCustomer

      public Customer getCustomer()

      Customer signed up or signed in after authentication.

      Returns:
      customer
    • getCart

      @Nullable public Cart getCart()

      Cart associated with the Customer. If empty, the Customer does not have a Cart assigned.

      Returns:
      cart
    • build

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

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

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

      create builder for CustomerSignInResult instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder