Interface ProductDiscountValueExternalDraft
- All Superinterfaces:
Draft<ProductDiscountValueExternalDraft>
,ProductDiscountValueDraft
public interface ProductDiscountValueExternalDraft
extends ProductDiscountValueDraft, Draft<ProductDiscountValueExternalDraft>
Discounts the Product Price by allowing the client to explicitly set a discounted value. Use this when setting discounts using an external service.
Example to create an instance using the builder pattern
ProductDiscountValueExternalDraft productDiscountValueExternalDraft = ProductDiscountValueExternalDraft.builder()
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductDiscountValueExternalDraftbuilder
(ProductDiscountValueExternalDraft template) create builder for ProductDiscountValueExternalDraft instancedeepCopy
(ProductDiscountValueExternalDraft template) factory method to create a deep copy of ProductDiscountValueExternalDraftof()
factory methodof
(ProductDiscountValueExternalDraft template) factory method to create a shallow copy ProductDiscountValueExternalDraftstatic com.fasterxml.jackson.core.type.TypeReference<ProductDiscountValueExternalDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product_discount.ProductDiscountValueDraft
getType, withProductDiscountValueDraft
-
Field Details
-
EXTERNAL
discriminator value for ProductDiscountValueExternalDraft- See Also:
-
-
Method Details
-
of
factory method- Returns:
- instance of ProductDiscountValueExternalDraft
-
of
factory method to create a shallow copy ProductDiscountValueExternalDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductDiscountValueExternalDraft deepCopy(@Nullable ProductDiscountValueExternalDraft template) factory method to create a deep copy of ProductDiscountValueExternalDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductDiscountValueExternalDraft- Returns:
- builder
-
builder
create builder for ProductDiscountValueExternalDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductDiscountValueExternalDraft
default <T> T withProductDiscountValueExternalDraft(Function<ProductDiscountValueExternalDraft, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ProductDiscountValueExternalDraft> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-