Class CustomerCreatedMessagePayloadBuilder
java.lang.Object
com.commercetools.api.models.message.CustomerCreatedMessagePayloadBuilder
- All Implemented Interfaces:
Builder<CustomerCreatedMessagePayload>
public class CustomerCreatedMessagePayloadBuilder
extends Object
implements Builder<CustomerCreatedMessagePayload>
CustomerCreatedMessagePayloadBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerCreatedMessagePayload customerCreatedMessagePayload = CustomerCreatedMessagePayload.builder()
.customer(customerBuilder -> customerBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomerCreatedMessagePayload with checking for non-null required valuesbuilds CustomerCreatedMessagePayload without checking for non-null required valuesCustomer that was created.customer
(Function<CustomerBuilder, CustomerBuilder> builder) Customer that was created.Customer that was created.of()
factory method for an instance of CustomerCreatedMessagePayloadBuilderof
(CustomerCreatedMessagePayload template) create builder for CustomerCreatedMessagePayload instancewithCustomer
(Function<CustomerBuilder, Customer> builder) Customer that was created.
-
Constructor Details
-
CustomerCreatedMessagePayloadBuilder
public CustomerCreatedMessagePayloadBuilder()
-
-
Method Details
-
customer
public CustomerCreatedMessagePayloadBuilder customer(Function<CustomerBuilder, CustomerBuilder> builder) Customer that was created.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public CustomerCreatedMessagePayloadBuilder withCustomer(Function<CustomerBuilder, Customer> builder) Customer that was created.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
Customer that was created.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
getCustomer
Customer that was created.
- Returns:
- customer
-
build
builds CustomerCreatedMessagePayload with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerCreatedMessagePayload>
- Returns:
- CustomerCreatedMessagePayload
-
buildUnchecked
builds CustomerCreatedMessagePayload without checking for non-null required values- Returns:
- CustomerCreatedMessagePayload
-
of
factory method for an instance of CustomerCreatedMessagePayloadBuilder- Returns:
- builder
-
of
create builder for CustomerCreatedMessagePayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-