Class CustomerReferenceBuilder
java.lang.Object
com.commercetools.api.models.customer.CustomerReferenceBuilder
- All Implemented Interfaces:
Builder<CustomerReference>
CustomerReferenceBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerReference customerReference = CustomerReference.builder()
.id("{id}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CustomerReference with checking for non-null required valuesbuilds CustomerReference without checking for non-null required valuesgetId()Unique identifier of the referenced Customer.getObj()Contains the representation of the expanded Customer.Unique identifier of the referenced Customer.Contains the representation of the expanded Customer.obj(Function<CustomerBuilder, CustomerBuilder> builder) Contains the representation of the expanded Customer.static CustomerReferenceBuilderof()factory method for an instance of CustomerReferenceBuilderstatic CustomerReferenceBuilderof(CustomerReference template) create builder for CustomerReference instancewithObj(Function<CustomerBuilder, Customer> builder) Contains the representation of the expanded Customer.
-
Constructor Details
-
CustomerReferenceBuilder
public CustomerReferenceBuilder()
-
-
Method Details
-
id
Unique identifier of the referenced Customer.
- Parameters:
id- value to be set- Returns:
- Builder
-
obj
Contains the representation of the expanded Customer. Only present in responses to requests with Reference Expansion for Customers.
- Parameters:
builder- function to build the obj value- Returns:
- Builder
-
withObj
Contains the representation of the expanded Customer. Only present in responses to requests with Reference Expansion for Customers.
- Parameters:
builder- function to build the obj value- Returns:
- Builder
-
obj
Contains the representation of the expanded Customer. Only present in responses to requests with Reference Expansion for Customers.
- Parameters:
obj- value to be set- Returns:
- Builder
-
getId
Unique identifier of the referenced Customer.
- Returns:
- id
-
getObj
Contains the representation of the expanded Customer. Only present in responses to requests with Reference Expansion for Customers.
- Returns:
- obj
-
build
builds CustomerReference with checking for non-null required values- Specified by:
buildin interfaceBuilder<CustomerReference>- Returns:
- CustomerReference
-
buildUnchecked
builds CustomerReference without checking for non-null required values- Returns:
- CustomerReference
-
of
factory method for an instance of CustomerReferenceBuilder- Returns:
- builder
-
of
create builder for CustomerReference instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-