Class ApprovalFlowApprovalBuilder
java.lang.Object
com.commercetools.api.models.approval_flow.ApprovalFlowApprovalBuilder
- All Implemented Interfaces:
Builder<ApprovalFlowApproval>
ApprovalFlowApprovalBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ApprovalFlowApproval approvalFlowApproval = ApprovalFlowApproval.builder()
.approver(approverBuilder -> approverBuilder)
.approvedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapprovedAt
(ZonedDateTime approvedAt) Date and time (UTC) the Approval Flow was approved.Associate who approved the Approval Flow.approver
(Function<AssociateBuilder, AssociateBuilder> builder) Associate who approved the Approval Flow.build()
builds ApprovalFlowApproval with checking for non-null required valuesbuilds ApprovalFlowApproval without checking for non-null required valuesDate and time (UTC) the Approval Flow was approved.Associate who approved the Approval Flow.static ApprovalFlowApprovalBuilder
of()
factory method for an instance of ApprovalFlowApprovalBuilderstatic ApprovalFlowApprovalBuilder
of
(ApprovalFlowApproval template) create builder for ApprovalFlowApproval instancewithApprover
(Function<AssociateBuilder, Associate> builder) Associate who approved the Approval Flow.
-
Constructor Details
-
ApprovalFlowApprovalBuilder
public ApprovalFlowApprovalBuilder()
-
-
Method Details
-
approver
Associate who approved the Approval Flow.
- Parameters:
builder
- function to build the approver value- Returns:
- Builder
-
withApprover
Associate who approved the Approval Flow.
- Parameters:
builder
- function to build the approver value- Returns:
- Builder
-
approver
Associate who approved the Approval Flow.
- Parameters:
approver
- value to be set- Returns:
- Builder
-
approvedAt
Date and time (UTC) the Approval Flow was approved.
- Parameters:
approvedAt
- value to be set- Returns:
- Builder
-
getApprover
Associate who approved the Approval Flow.
- Returns:
- approver
-
getApprovedAt
Date and time (UTC) the Approval Flow was approved.
- Returns:
- approvedAt
-
build
builds ApprovalFlowApproval with checking for non-null required values- Specified by:
build
in interfaceBuilder<ApprovalFlowApproval>
- Returns:
- ApprovalFlowApproval
-
buildUnchecked
builds ApprovalFlowApproval without checking for non-null required values- Returns:
- ApprovalFlowApproval
-
of
factory method for an instance of ApprovalFlowApprovalBuilder- Returns:
- builder
-
of
create builder for ApprovalFlowApproval instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-