Class DiscountCodeInfoBuilder
- All Implemented Interfaces:
Builder<DiscountCodeInfo>
Example to create an instance using the builder pattern
DiscountCodeInfo discountCodeInfo = DiscountCodeInfo.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds DiscountCodeInfo with checking for non-null required valuesbuilds DiscountCodeInfo without checking for non-null required valuesdiscountCode(DiscountCodeKeyReference discountCode) References a DiscountCode by key.References a DiscountCode by key.References a DiscountCode by key.getState()Maps toDiscountCodeInfo.statestatic DiscountCodeInfoBuilderof()factory method for an instance of DiscountCodeInfoBuilderstatic DiscountCodeInfoBuilderof(DiscountCodeInfo template) create builder for DiscountCodeInfo instancestate(DiscountCodeState state) Maps toDiscountCodeInfo.stateReferences a DiscountCode by key.
-
Constructor Details
-
DiscountCodeInfoBuilder
public DiscountCodeInfoBuilder()
-
-
Method Details
-
discountCode
public DiscountCodeInfoBuilder discountCode(Function<DiscountCodeKeyReferenceBuilder, DiscountCodeKeyReferenceBuilder> builder) References a DiscountCode by key. If the referenced DiscountCode does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced DiscountCode is created.- Parameters:
builder- function to build the discountCode value- Returns:
- Builder
-
withDiscountCode
public DiscountCodeInfoBuilder withDiscountCode(Function<DiscountCodeKeyReferenceBuilder, DiscountCodeKeyReference> builder) References a DiscountCode by key. If the referenced DiscountCode does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced DiscountCode is created.- Parameters:
builder- function to build the discountCode value- Returns:
- Builder
-
discountCode
References a DiscountCode by key. If the referenced DiscountCode does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced DiscountCode is created.- Parameters:
discountCode- value to be set- Returns:
- Builder
-
state
Maps to
DiscountCodeInfo.state- Parameters:
state- value to be set- Returns:
- Builder
-
getDiscountCode
References a DiscountCode by key. If the referenced DiscountCode does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced DiscountCode is created.- Returns:
- discountCode
-
getState
Maps to
DiscountCodeInfo.state- Returns:
- state
-
build
builds DiscountCodeInfo with checking for non-null required values- Specified by:
buildin interfaceBuilder<DiscountCodeInfo>- Returns:
- DiscountCodeInfo
-
buildUnchecked
builds DiscountCodeInfo without checking for non-null required values- Returns:
- DiscountCodeInfo
-
of
factory method for an instance of DiscountCodeInfoBuilder- Returns:
- builder
-
of
create builder for DiscountCodeInfo instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-