Package com.commercetools.api.models.me
Class MyCartRemoveDiscountCodeActionBuilder
java.lang.Object
com.commercetools.api.models.me.MyCartRemoveDiscountCodeActionBuilder
- All Implemented Interfaces:
Builder<MyCartRemoveDiscountCodeAction>
public class MyCartRemoveDiscountCodeActionBuilder
extends Object
implements Builder<MyCartRemoveDiscountCodeAction>
MyCartRemoveDiscountCodeActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MyCartRemoveDiscountCodeAction myCartRemoveDiscountCodeAction = MyCartRemoveDiscountCodeAction.builder()
.discountCode(discountCodeBuilder -> discountCodeBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MyCartRemoveDiscountCodeAction with checking for non-null required valuesbuilds MyCartRemoveDiscountCodeAction without checking for non-null required valuesdiscountCode
(DiscountCodeReference discountCode) Discount Code to remove from the Cart.Discount Code to remove from the Cart.Discount Code to remove from the Cart.of()
factory method for an instance of MyCartRemoveDiscountCodeActionBuilderof
(MyCartRemoveDiscountCodeAction template) create builder for MyCartRemoveDiscountCodeAction instanceDiscount Code to remove from the Cart.
-
Constructor Details
-
MyCartRemoveDiscountCodeActionBuilder
public MyCartRemoveDiscountCodeActionBuilder()
-
-
Method Details
-
discountCode
public MyCartRemoveDiscountCodeActionBuilder discountCode(Function<DiscountCodeReferenceBuilder, DiscountCodeReferenceBuilder> builder) Discount Code to remove from the Cart.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
withDiscountCode
public MyCartRemoveDiscountCodeActionBuilder withDiscountCode(Function<DiscountCodeReferenceBuilder, DiscountCodeReference> builder) Discount Code to remove from the Cart.
- Parameters:
builder
- function to build the discountCode value- Returns:
- Builder
-
discountCode
Discount Code to remove from the Cart.
- Parameters:
discountCode
- value to be set- Returns:
- Builder
-
getDiscountCode
Discount Code to remove from the Cart.
- Returns:
- discountCode
-
build
builds MyCartRemoveDiscountCodeAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCartRemoveDiscountCodeAction>
- Returns:
- MyCartRemoveDiscountCodeAction
-
buildUnchecked
builds MyCartRemoveDiscountCodeAction without checking for non-null required values- Returns:
- MyCartRemoveDiscountCodeAction
-
of
factory method for an instance of MyCartRemoveDiscountCodeActionBuilder- Returns:
- builder
-
of
create builder for MyCartRemoveDiscountCodeAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-