Class OrderPatchImportBuilder
java.lang.Object
com.commercetools.importapi.models.order_patches.OrderPatchImportBuilder
- All Implemented Interfaces:
Builder<OrderPatchImport>
OrderPatchImportBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderPatchImport orderPatchImport = OrderPatchImport.builder()
.orderNumber("{orderNumber}")
.fields(fieldsBuilder -> fieldsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderPatchImport with checking for non-null required valuesbuilds OrderPatchImport without checking for non-null required valuesfields
(OrderField fields) Each field referenced must be defined in an already existing order in the project or the import operation state is set tovalidationFailed
.fields
(Function<OrderFieldBuilder, OrderFieldBuilder> builder) Each field referenced must be defined in an already existing order in the project or the import operation state is set tovalidationFailed
.Each field referenced must be defined in an already existing order in the project or the import operation state is set tovalidationFailed
.Maps toOrder.orderNumber
, String that uniquely identifies an order, unique across a project.static OrderPatchImportBuilder
of()
factory method for an instance of OrderPatchImportBuilderstatic OrderPatchImportBuilder
of
(OrderPatchImport template) create builder for OrderPatchImport instanceorderNumber
(String orderNumber) Maps toOrder.orderNumber
, String that uniquely identifies an order, unique across a project.withFields
(Function<OrderFieldBuilder, OrderField> builder) Each field referenced must be defined in an already existing order in the project or the import operation state is set tovalidationFailed
.
-
Constructor Details
-
OrderPatchImportBuilder
public OrderPatchImportBuilder()
-
-
Method Details
-
orderNumber
Maps to
Order.orderNumber
, String that uniquely identifies an order, unique across a project.- Parameters:
orderNumber
- value to be set- Returns:
- Builder
-
fields
Each field referenced must be defined in an already existing order in the project or the import operation state is set to
validationFailed
.- Parameters:
builder
- function to build the fields value- Returns:
- Builder
-
withFields
Each field referenced must be defined in an already existing order in the project or the import operation state is set to
validationFailed
.- Parameters:
builder
- function to build the fields value- Returns:
- Builder
-
fields
Each field referenced must be defined in an already existing order in the project or the import operation state is set to
validationFailed
.- Parameters:
fields
- value to be set- Returns:
- Builder
-
getOrderNumber
Maps to
Order.orderNumber
, String that uniquely identifies an order, unique across a project.- Returns:
- orderNumber
-
getFields
Each field referenced must be defined in an already existing order in the project or the import operation state is set to
validationFailed
.- Returns:
- fields
-
build
builds OrderPatchImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderPatchImport>
- Returns:
- OrderPatchImport
-
buildUnchecked
builds OrderPatchImport without checking for non-null required values- Returns:
- OrderPatchImport
-
of
factory method for an instance of OrderPatchImportBuilder- Returns:
- builder
-
of
create builder for OrderPatchImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-