Interface OrderEditDraft
- All Superinterfaces:
CustomizableDraft<OrderEditDraft>,Draft<OrderEditDraft>,WithKey
Example to create an instance using the builder pattern
OrderEditDraft orderEditDraft = OrderEditDraft.builder()
.resource(resourceBuilder -> resourceBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderEditDraftBuilderbuilder()builder factory method for OrderEditDraftstatic OrderEditDraftBuilderbuilder(OrderEditDraft template) create builder for OrderEditDraft instancecopyDeep()static OrderEditDraftdeepCopy(OrderEditDraft template) factory method to create a deep copy of OrderEditDraftUser-defined description regarding the Order Edit.@Valid CustomFieldsDraftCustom Fields for the Order Edit.Set totrueif you want to preview the edited Order first without persisting it (dry run).getKey()User-defined unique identifier for the Order Edit.@NotNull @Valid OrderReferenceReference to the Order updated with this edit.@Valid List<StagedOrderUpdateAction>Update actions to apply to the Order referenced inresource.static OrderEditDraftof()factory methodstatic OrderEditDraftof(OrderEditDraft template) factory method to create a shallow copy OrderEditDraftvoidsetComment(String comment) User-defined description regarding the Order Edit.voidsetCustom(CustomFieldsDraft custom) Custom Fields for the Order Edit.voidSet totrueif you want to preview the edited Order first without persisting it (dry run).voidUser-defined unique identifier for the Order Edit.voidsetResource(OrderReference resource) Reference to the Order updated with this edit.voidsetStagedActions(StagedOrderUpdateAction... stagedActions) Update actions to apply to the Order referenced inresource.voidsetStagedActions(List<StagedOrderUpdateAction> stagedActions) Update actions to apply to the Order referenced inresource.static com.fasterxml.jackson.core.type.TypeReference<OrderEditDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithOrderEditDraft(Function<OrderEditDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String getKey()User-defined unique identifier for the Order Edit.
-
getResource
Reference to the Order updated with this edit.
- Returns:
- resource
-
getStagedActions
Update actions to apply to the Order referenced in
resource. Cannot be updated if the edit has been applied.- Returns:
- stagedActions
-
getCustom
Custom Fields for the Order Edit.
- Specified by:
getCustomin interfaceCustomizableDraft<OrderEditDraft>- Returns:
- custom
-
getComment
String getComment()User-defined description regarding the Order Edit.
- Returns:
- comment
-
getDryRun
Boolean getDryRun()Set to
trueif you want to preview the edited Order first without persisting it (dry run). A dry run allows checking for potential errors when trying to apply thestagedActions.Order API Extensions, if any, are also called in dry runs.
- Returns:
- dryRun
-
setKey
User-defined unique identifier for the Order Edit.
- Parameters:
key- value to be set
-
setResource
Reference to the Order updated with this edit.
- Parameters:
resource- value to be set
-
setStagedActions
Update actions to apply to the Order referenced in
resource. Cannot be updated if the edit has been applied.- Parameters:
stagedActions- values to be set
-
setStagedActions
Update actions to apply to the Order referenced in
resource. Cannot be updated if the edit has been applied.- Parameters:
stagedActions- values to be set
-
setCustom
Custom Fields for the Order Edit.
- Specified by:
setCustomin interfaceCustomizableDraft<OrderEditDraft>- Parameters:
custom- value to be set
-
setComment
User-defined description regarding the Order Edit.
- Parameters:
comment- value to be set
-
setDryRun
Set to
trueif you want to preview the edited Order first without persisting it (dry run). A dry run allows checking for potential errors when trying to apply thestagedActions.Order API Extensions, if any, are also called in dry runs.
- Parameters:
dryRun- value to be set
-
of
factory method- Returns:
- instance of OrderEditDraft
-
of
factory method to create a shallow copy OrderEditDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
OrderEditDraft copyDeep() -
deepCopy
factory method to create a deep copy of OrderEditDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderEditDraft- Returns:
- builder
-
builder
create builder for OrderEditDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withOrderEditDraft
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-