Class CustomerSigninBuilder
- All Implemented Interfaces:
Builder<CustomerSignin>
Example to create an instance using the builder pattern
CustomerSignin customerSignin = CustomerSignin.builder()
.email("{email}")
.password("{password}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionanonymousCart
(CartResourceIdentifier anonymousCart) Identifies a Cart that will be assigned to the Customer.Identifies a Cart that will be assigned to the Customer.anonymousCartId
(String anonymousCartId) Deprecated.anonymousCartSignInMode
(AnonymousCartSignInMode anonymousCartSignInMode) Set toMergeWithExistingCustomerCart
if LineItems of the anonymous Cart should be merged with the active Customer Cart that has been modified most recently. Set toUseAsNewActiveCustomerCart
if the anonymous Cart should be used as the new active Customer Cart and no LineItems are to be merged.anonymousId
(String anonymousId) If bothanonymousCart
andanonymousId
are provided, theanonymousId
on the CustomerSignin must match that of the anonymous Cart.build()
builds CustomerSignin with checking for non-null required valuesbuilds CustomerSignin without checking for non-null required valuesEmail address of the Customer treated as case-insensitive.Identifies a Cart that will be assigned to the Customer.Deprecated.Set toMergeWithExistingCustomerCart
if LineItems of the anonymous Cart should be merged with the active Customer Cart that has been modified most recently. Set toUseAsNewActiveCustomerCart
if the anonymous Cart should be used as the new active Customer Cart and no LineItems are to be merged.If bothanonymousCart
andanonymousId
are provided, theanonymousId
on the CustomerSignin must match that of the anonymous Cart.getEmail()
Email address of the Customer treated as case-insensitive.Password of the Customer.Iftrue
, the LineItem Product data (name
,variant
, andproductType
) of the returned Cart will be updated. Iffalse
, only the prices, discounts, and tax rates will be updated.static CustomerSigninBuilder
of()
factory method for an instance of CustomerSigninBuilderstatic CustomerSigninBuilder
of
(CustomerSignin template) create builder for CustomerSignin instancePassword of the Customer.updateProductData
(Boolean updateProductData) Iftrue
, the LineItem Product data (name
,variant
, andproductType
) of the returned Cart will be updated. Iffalse
, only the prices, discounts, and tax rates will be updated.Identifies a Cart that will be assigned to the Customer.
-
Constructor Details
-
CustomerSigninBuilder
public CustomerSigninBuilder()
-
-
Method Details
-
email
Email address of the Customer treated as case-insensitive.
- Parameters:
email
- value to be set- Returns:
- Builder
-
password
Password of the Customer.
- Parameters:
password
- value to be set- Returns:
- Builder
-
anonymousCartId
Deprecated.Deprecated since it is now possible to identify an anonymous cart by using its
id
or externalkey
.- Parameters:
anonymousCartId
- value to be set- Returns:
- Builder
-
anonymousCart
public CustomerSigninBuilder anonymousCart(Function<CartResourceIdentifierBuilder, CartResourceIdentifierBuilder> builder) Identifies a Cart that will be assigned to the Customer.
- Parameters:
builder
- function to build the anonymousCart value- Returns:
- Builder
-
withAnonymousCart
public CustomerSigninBuilder withAnonymousCart(Function<CartResourceIdentifierBuilder, CartResourceIdentifier> builder) Identifies a Cart that will be assigned to the Customer.
- Parameters:
builder
- function to build the anonymousCart value- Returns:
- Builder
-
anonymousCart
Identifies a Cart that will be assigned to the Customer.
- 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
- Set to
-
anonymousId
If both
anonymousCart
andanonymousId
are provided, theanonymousId
on the CustomerSignin must match that of the anonymous Cart. Otherwise a 400 Bad RequestInvalid Operation
error is returned with the message: "Cart with the ID cart-id does not have the expected anonymousId.".- Parameters:
anonymousId
- value to be set- Returns:
- Builder
-
updateProductData
- If
true
, the LineItem Product data (name
,variant
, andproductType
) 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
- If
-
getEmail
Email address of the Customer treated as case-insensitive.
- Returns:
-
getPassword
Password of the Customer.
- Returns:
- password
-
getAnonymousCartId
Deprecated.Deprecated since it is now possible to identify an anonymous cart by using its
id
or externalkey
.- Returns:
- anonymousCartId
-
getAnonymousCart
Identifies a Cart that will be assigned to the Customer.
- Returns:
- anonymousCart
-
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
- Set to
-
getAnonymousId
If both
anonymousCart
andanonymousId
are provided, theanonymousId
on the CustomerSignin must match that of the anonymous Cart. Otherwise a 400 Bad RequestInvalid Operation
error is returned with the message: "Cart with the ID cart-id does not have the expected anonymousId.".- Returns:
- anonymousId
-
getUpdateProductData
- If
true
, the LineItem Product data (name
,variant
, andproductType
) of the returned Cart will be updated. - If
false
, only the prices, discounts, and tax rates will be updated.
- Returns:
- updateProductData
- If
-
build
builds CustomerSignin with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerSignin>
- Returns:
- CustomerSignin
-
buildUnchecked
builds CustomerSignin without checking for non-null required values- Returns:
- CustomerSignin
-
of
factory method for an instance of CustomerSigninBuilder- Returns:
- builder
-
of
create builder for CustomerSignin instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-