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 OrderEditDraftBuilder
builder()
builder factory method for OrderEditDraftstatic OrderEditDraftBuilder
builder
(OrderEditDraft template) create builder for OrderEditDraft instancestatic OrderEditDraft
deepCopy
(OrderEditDraft template) factory method to create a deep copy of OrderEditDraftUser-defined description regarding the Order Edit.@Valid CustomFieldsDraft
Custom Fields for the Order Edit.Set totrue
if you want to peview the edited Order first without persisting it (dry run).getKey()
User-defined unique identifier for the Order Edit.@NotNull @Valid OrderReference
Reference to the Order updated with this edit.@Valid List<StagedOrderUpdateAction>
Update actions to apply to the Order referenced inresource
.static OrderEditDraft
of()
factory methodstatic OrderEditDraft
of
(OrderEditDraft template) factory method to create a shallow copy OrderEditDraftvoid
setComment
(String comment) User-defined description regarding the Order Edit.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Order Edit.void
Set totrue
if you want to peview the edited Order first without persisting it (dry run).void
User-defined unique identifier for the Order Edit.void
setResource
(OrderReference resource) Reference to the Order updated with this edit.void
setStagedActions
(StagedOrderUpdateAction... stagedActions) Update actions to apply to the Order referenced inresource
.void
setStagedActions
(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> T
withOrderEditDraft
(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:
getCustom
in interfaceCustomizableDraft<OrderEditDraft>
- Returns:
- custom
-
getComment
String getComment()User-defined description regarding the Order Edit.
- Returns:
- comment
-
getDryRun
Boolean getDryRun()Set to
true
if you want to peview 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:
setCustom
in 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
true
if you want to peview 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
-
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
-