Interface ProductDiscountValueRelativeDraft
- All Superinterfaces:
io.vrap.rmf.base.client.Draft<ProductDiscountValueRelativeDraft>
,ProductDiscountValueDraft
- All Known Implementing Classes:
ProductDiscountValueRelativeDraftImpl
public interface ProductDiscountValueRelativeDraft
extends ProductDiscountValueDraft, io.vrap.rmf.base.client.Draft<ProductDiscountValueRelativeDraft>
Discounts the Product Price by a percentage, defined by the permyriad
field.
Example to create an instance using the builder pattern
ProductDiscountValueRelativeDraft productDiscountValueRelativeDraft = ProductDiscountValueRelativeDraft.builder()
.permyriad(0.3)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductDiscountValueRelativeDraftbuilder
(ProductDiscountValueRelativeDraft template) create builder for ProductDiscountValueRelativeDraft instancedeepCopy
(ProductDiscountValueRelativeDraft template) factory method to create a deep copy of ProductDiscountValueRelativeDraft@NotNull Long
Fraction (per ten thousand) the price is reduced by.of()
factory methodof
(ProductDiscountValueRelativeDraft template) factory method to create a shallow copy ProductDiscountValueRelativeDraftvoid
setPermyriad
(Long permyriad) Fraction (per ten thousand) the price is reduced by.static com.fasterxml.jackson.core.type.TypeReference<ProductDiscountValueRelativeDraft>
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
-
RELATIVE
discriminator value for ProductDiscountValueRelativeDraft- See Also:
-
-
Method Details
-
getPermyriad
Fraction (per ten thousand) the price is reduced by. For example,
1000
will result in a 10% price reduction.- Returns:
- permyriad
-
setPermyriad
Fraction (per ten thousand) the price is reduced by. For example,
1000
will result in a 10% price reduction.- Parameters:
permyriad
- value to be set
-
of
factory method- Returns:
- instance of ProductDiscountValueRelativeDraft
-
of
factory method to create a shallow copy ProductDiscountValueRelativeDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductDiscountValueRelativeDraft deepCopy(@Nullable ProductDiscountValueRelativeDraft template) factory method to create a deep copy of ProductDiscountValueRelativeDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductDiscountValueRelativeDraft- Returns:
- builder
-
builder
create builder for ProductDiscountValueRelativeDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductDiscountValueRelativeDraft
default <T> T withProductDiscountValueRelativeDraft(Function<ProductDiscountValueRelativeDraft, 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<ProductDiscountValueRelativeDraft> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-