Interface DiscountCodeResourceIdentifier
- All Superinterfaces:
Identifiable<DiscountCode>
,ResourceIdentifier
,WithKey
public interface DiscountCodeResourceIdentifier
extends ResourceIdentifier, Identifiable<DiscountCode>
ResourceIdentifier to a DiscountCode. Either id
or key
is required. If both are set, an InvalidJsonInput error is returned.
Example to create an instance using the builder pattern
DiscountCodeResourceIdentifier discountCodeResourceIdentifier = DiscountCodeResourceIdentifier.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for DiscountCodeResourceIdentifier -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for DiscountCodeResourceIdentifierbuilder
(DiscountCodeResourceIdentifier template) create builder for DiscountCodeResourceIdentifier instancedeepCopy
(DiscountCodeResourceIdentifier template) factory method to create a deep copy of DiscountCodeResourceIdentifiergetId()
Unique identifier of the referenced DiscountCode.getKey()
User-defined unique identifier of the referenced DiscountCode.of()
factory methodof
(DiscountCodeResourceIdentifier template) factory method to create a shallow copy DiscountCodeResourceIdentifiervoid
Unique identifier of the referenced DiscountCode.void
User-defined unique identifier of the referenced DiscountCode.static com.fasterxml.jackson.core.type.TypeReference<DiscountCodeResourceIdentifier>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.common.ResourceIdentifier
getTypeId, withResourceIdentifier
-
Field Details
-
DISCOUNT_CODE
discriminator value for DiscountCodeResourceIdentifier- See Also:
-
-
Method Details
-
getId
String getId()Unique identifier of the referenced DiscountCode. Required if
key
is absent.- Specified by:
getId
in interfaceIdentifiable<DiscountCode>
- Specified by:
getId
in interfaceResourceIdentifier
- Returns:
- id
-
getKey
String getKey()User-defined unique identifier of the referenced DiscountCode. Required if
id
is absent.- Specified by:
getKey
in interfaceResourceIdentifier
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
setId
Unique identifier of the referenced DiscountCode. Required if
key
is absent.- Specified by:
setId
in interfaceResourceIdentifier
- Parameters:
id
- value to be set
-
setKey
User-defined unique identifier of the referenced DiscountCode. Required if
id
is absent.- Specified by:
setKey
in interfaceResourceIdentifier
- Parameters:
key
- value to be set
-
of
factory method- Returns:
- instance of DiscountCodeResourceIdentifier
-
of
factory method to create a shallow copy DiscountCodeResourceIdentifier- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static DiscountCodeResourceIdentifier deepCopy(@Nullable DiscountCodeResourceIdentifier template) factory method to create a deep copy of DiscountCodeResourceIdentifier- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountCodeResourceIdentifier- Returns:
- builder
-
builder
create builder for DiscountCodeResourceIdentifier instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountCodeResourceIdentifier
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<DiscountCodeResourceIdentifier> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-