Class CustomerSigninBuilder

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

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

     CustomerSignin customerSignin = CustomerSignin.builder()
             .email("{email}")
             .password("{password}")
             .build()
 
  • Constructor Details

    • CustomerSigninBuilder

      public CustomerSigninBuilder()
  • Method Details

    • email

      public CustomerSigninBuilder email(String email)

      Email address of the Customer treated as case-insensitive.

      Parameters:
      email - value to be set
      Returns:
      Builder
    • password

      public CustomerSigninBuilder password(String password)

      Password of the Customer.

      Parameters:
      password - value to be set
      Returns:
      Builder
    • anonymousCartId

      @Deprecated public CustomerSigninBuilder anonymousCartId(@Nullable String anonymousCartId)
      Deprecated.

      Deprecated since it is now possible to identify an anonymous cart by using its id or external key.

      Parameters:
      anonymousCartId - value to be set
      Returns:
      Builder
    • anonymousCart

      Assigns the Customer to the specified Cart.

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

      Assigns the Customer to the specified Cart.

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

      public CustomerSigninBuilder anonymousCart(@Nullable CartResourceIdentifier anonymousCart)

      Assigns the Customer to the specified Cart.

      Parameters:
      anonymousCart - value to be set
      Returns:
      Builder
    • anonymousCartSignInMode

      public CustomerSigninBuilder anonymousCartSignInMode(@Nullable AnonymousCartSignInMode anonymousCartSignInMode)
      • Set to MergeWithExistingCustomerCart if LineItems of the anonymous Cart should be merged with the active Customer Cart that has been modified most recently.
      • Set to UseAsNewActiveCustomerCart if the anonymous Cart should be used as the new active Customer Cart and no LineItems are to be merged.
      Parameters:
      anonymousCartSignInMode - value to be set
      Returns:
      Builder
    • anonymousId

      public CustomerSigninBuilder anonymousId(@Nullable String anonymousId)

      Assigns the Customer to all Carts, Orders, ShoppingLists, and Payments with the same anonymousId.

      If anonymousCart is provided, this value must match the anonymousId of the anonymous Cart; otherwise, an InvalidOperation error is returned.

      Parameters:
      anonymousId - value to be set
      Returns:
      Builder
    • updateProductData

      public CustomerSigninBuilder updateProductData(@Nullable Boolean updateProductData)
      • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
      • If false, only the prices, discounts, and tax rates will be updated.
      Parameters:
      updateProductData - value to be set
      Returns:
      Builder
    • getEmail

      public String getEmail()

      Email address of the Customer treated as case-insensitive.

      Returns:
      email
    • getPassword

      public String getPassword()

      Password of the Customer.

      Returns:
      password
    • getAnonymousCartId

      @Deprecated @Nullable public String getAnonymousCartId()
      Deprecated.

      Deprecated since it is now possible to identify an anonymous cart by using its id or external key.

      Returns:
      anonymousCartId
    • getAnonymousCart

      @Nullable public CartResourceIdentifier getAnonymousCart()

      Assigns the Customer to the specified Cart.

      Returns:
      anonymousCart
    • getAnonymousCartSignInMode

      @Nullable public AnonymousCartSignInMode getAnonymousCartSignInMode()
      • Set to MergeWithExistingCustomerCart if LineItems of the anonymous Cart should be merged with the active Customer Cart that has been modified most recently.
      • Set to UseAsNewActiveCustomerCart if the anonymous Cart should be used as the new active Customer Cart and no LineItems are to be merged.
      Returns:
      anonymousCartSignInMode
    • getAnonymousId

      @Nullable public String getAnonymousId()

      Assigns the Customer to all Carts, Orders, ShoppingLists, and Payments with the same anonymousId.

      If anonymousCart is provided, this value must match the anonymousId of the anonymous Cart; otherwise, an InvalidOperation error is returned.

      Returns:
      anonymousId
    • getUpdateProductData

      @Nullable public Boolean getUpdateProductData()
      • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
      • If false, only the prices, discounts, and tax rates will be updated.
      Returns:
      updateProductData
    • build

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

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

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

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