Class DiscountCodeImpl
- All Implemented Interfaces:
BaseResource,Customizable<DiscountCode>,DiscountCode,DiscountCodeMixin,DomainResource<DiscountCode>,Identifiable<DiscountCode>,Referencable<DiscountCode>,ResourceIdentifiable<DiscountCode>,Versioned<DiscountCode>,io.vrap.rmf.base.client.ModelBase
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyDeep()booleanUsed and managed by the API and must not be used in customer logic.Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.DiscountCode can only be applied to Carts that match this predicate.getCode()User-defined unique identifier of the DiscountCode added to the Cart to apply the related CartDiscounts.Date and time (UTC) the DiscountCode was initially created.IDs and references that created the DiscountCode.Custom Fields of the DiscountCode.Description of the DiscountCode.Groups to which the DiscountCode belongs to.getId()Unique identifier of the DiscountCode.Indicates if the DiscountCode is active and can be applied to the Cart.getKey()User-defined unique identifier of the DiscountCode.Date and time (UTC) the DiscountCode was last updated.IDs and references that last modified the DiscountCode.Number of times the DiscountCode can be applied.Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported).getName()Name of the DiscountCode.References to all resources addressed in thecartPredicateby their IDs.Date and time (UTC) from which the DiscountCode is effective.Date and time (UTC) until which the DiscountCode is effective.Current version of the DiscountCode.inthashCode()voidsetApplicationVersion(Long applicationVersion) Used and managed by the API and must not be used in customer logic.voidsetCartDiscounts(CartDiscountReference... cartDiscounts) Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.voidsetCartDiscounts(List<CartDiscountReference> cartDiscounts) Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.voidsetCartPredicate(String cartPredicate) DiscountCode can only be applied to Carts that match this predicate.voidUser-defined unique identifier of the DiscountCode added to the Cart to apply the related CartDiscounts.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the DiscountCode was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the DiscountCode.voidsetCustom(CustomFields custom) Custom Fields of the DiscountCode.voidsetDescription(LocalizedString description) Description of the DiscountCode.voidGroups to which the DiscountCode belongs to.voidGroups to which the DiscountCode belongs to.voidUnique identifier of the DiscountCode.voidsetIsActive(Boolean isActive) Indicates if the DiscountCode is active and can be applied to the Cart.voidUser-defined unique identifier of the DiscountCode.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the DiscountCode was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the DiscountCode.voidsetMaxApplications(Long maxApplications) Number of times the DiscountCode can be applied.voidsetMaxApplicationsPerCustomer(Long maxApplicationsPerCustomer) Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported).voidsetName(LocalizedString name) Name of the DiscountCode.voidsetReferences(Reference... references) References to all resources addressed in thecartPredicateby their IDs.voidsetReferences(List<Reference> references) References to all resources addressed in thecartPredicateby their IDs.voidsetValidFrom(ZonedDateTime validFrom) Date and time (UTC) from which the DiscountCode is effective.voidsetValidUntil(ZonedDateTime validUntil) Date and time (UTC) until which the DiscountCode is effective.voidsetVersion(Long version) Current version of the DiscountCode.toString()Methods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.discount_code.DiscountCode
withDiscountCodeMethods inherited from interface com.commercetools.api.models.discount_code.DiscountCodeMixin
toReference, toResourceIdentifierMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
DiscountCodeImpl
public DiscountCodeImpl()create empty instance
-
-
Method Details
-
getId
Unique identifier of the DiscountCode.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDiscountCode- Specified by:
getIdin interfaceDomainResource<DiscountCode>- Specified by:
getIdin interfaceIdentifiable<DiscountCode>- Specified by:
getIdin interfaceVersioned<DiscountCode>- Returns:
- id
-
getVersion
Current version of the DiscountCode.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDiscountCode- Specified by:
getVersionin interfaceDomainResource<DiscountCode>- Specified by:
getVersionin interfaceVersioned<DiscountCode>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the DiscountCode was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Specified by:
getCreatedAtin interfaceDiscountCode- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the DiscountCode was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Specified by:
getLastModifiedAtin interfaceDiscountCode- Returns:
- lastModifiedAt
-
getKey
User-defined unique identifier of the DiscountCode.
- Specified by:
getKeyin interfaceDiscountCode- Returns:
- key
-
getLastModifiedBy
IDs and references that last modified the DiscountCode.
- Specified by:
getLastModifiedByin interfaceDiscountCode- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the DiscountCode.
- Specified by:
getCreatedByin interfaceDiscountCode- Returns:
- createdBy
-
getName
Name of the DiscountCode.
- Specified by:
getNamein interfaceDiscountCode- Returns:
- name
-
getDescription
Description of the DiscountCode.
- Specified by:
getDescriptionin interfaceDiscountCode- Returns:
- description
-
getCode
User-defined unique identifier of the DiscountCode added to the Cart to apply the related CartDiscounts.
- Specified by:
getCodein interfaceDiscountCode- Returns:
- code
-
getCartDiscounts
Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.
- Specified by:
getCartDiscountsin interfaceDiscountCode- Returns:
- cartDiscounts
-
getCartPredicate
DiscountCode can only be applied to Carts that match this predicate.
- Specified by:
getCartPredicatein interfaceDiscountCode- Returns:
- cartPredicate
-
getIsActive
Indicates if the DiscountCode is active and can be applied to the Cart.
- Specified by:
getIsActivein interfaceDiscountCode- Returns:
- isActive
-
getReferences
References to all resources addressed in the
cartPredicateby their IDs. This value is generated by the platform.- Specified by:
getReferencesin interfaceDiscountCode- Returns:
- references
-
getMaxApplications
Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count. This field does not limit discount applications for Orders created from a Recurring Order.
- Specified by:
getMaxApplicationsin interfaceDiscountCode- Returns:
- maxApplications
-
getMaxApplicationsPerCustomer
Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count. This field does not limit discount applications for Orders created from a Recurring Order.
- Specified by:
getMaxApplicationsPerCustomerin interfaceDiscountCode- Returns:
- maxApplicationsPerCustomer
-
getCustom
Custom Fields of the DiscountCode.
- Specified by:
getCustomin interfaceCustomizable<DiscountCode>- Specified by:
getCustomin interfaceDiscountCode- Returns:
- custom
-
getGroups
Groups to which the DiscountCode belongs to.
- Specified by:
getGroupsin interfaceDiscountCode- Returns:
- groups
-
getValidFrom
Date and time (UTC) from which the DiscountCode is effective.
- Specified by:
getValidFromin interfaceDiscountCode- Returns:
- validFrom
-
getValidUntil
Date and time (UTC) until which the DiscountCode is effective.
- Specified by:
getValidUntilin interfaceDiscountCode- Returns:
- validUntil
-
getApplicationVersion
Used and managed by the API and must not be used in customer logic. The value can change at any time due to internal and external factors.
- Specified by:
getApplicationVersionin interfaceDiscountCode- Returns:
- applicationVersion
-
setId
Description copied from interface:DiscountCodeUnique identifier of the DiscountCode.
- Specified by:
setIdin interfaceBaseResource- Specified by:
setIdin interfaceDiscountCode- Parameters:
id- value to be set
-
setVersion
Description copied from interface:DiscountCodeCurrent version of the DiscountCode.
- Specified by:
setVersionin interfaceBaseResource- Specified by:
setVersionin interfaceDiscountCode- Parameters:
version- value to be set
-
setCreatedAt
Description copied from interface:DiscountCodeDate and time (UTC) the DiscountCode was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Specified by:
setCreatedAtin interfaceDiscountCode- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Description copied from interface:DiscountCodeDate and time (UTC) the DiscountCode was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Specified by:
setLastModifiedAtin interfaceDiscountCode- Parameters:
lastModifiedAt- value to be set
-
setKey
Description copied from interface:DiscountCodeUser-defined unique identifier of the DiscountCode.
- Specified by:
setKeyin interfaceDiscountCode- Parameters:
key- value to be set
-
setLastModifiedBy
Description copied from interface:DiscountCodeIDs and references that last modified the DiscountCode.
- Specified by:
setLastModifiedByin interfaceDiscountCode- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
Description copied from interface:DiscountCodeIDs and references that created the DiscountCode.
- Specified by:
setCreatedByin interfaceDiscountCode- Parameters:
createdBy- value to be set
-
setName
Description copied from interface:DiscountCodeName of the DiscountCode.
- Specified by:
setNamein interfaceDiscountCode- Parameters:
name- value to be set
-
setDescription
Description copied from interface:DiscountCodeDescription of the DiscountCode.
- Specified by:
setDescriptionin interfaceDiscountCode- Parameters:
description- value to be set
-
setCode
Description copied from interface:DiscountCodeUser-defined unique identifier of the DiscountCode added to the Cart to apply the related CartDiscounts.
- Specified by:
setCodein interfaceDiscountCode- Parameters:
code- value to be set
-
setCartDiscounts
Description copied from interface:DiscountCodeReference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.
- Specified by:
setCartDiscountsin interfaceDiscountCode- Parameters:
cartDiscounts- values to be set
-
setCartDiscounts
Description copied from interface:DiscountCodeReference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.
- Specified by:
setCartDiscountsin interfaceDiscountCode- Parameters:
cartDiscounts- values to be set
-
setCartPredicate
Description copied from interface:DiscountCodeDiscountCode can only be applied to Carts that match this predicate.
- Specified by:
setCartPredicatein interfaceDiscountCode- Parameters:
cartPredicate- value to be set
-
setIsActive
Description copied from interface:DiscountCodeIndicates if the DiscountCode is active and can be applied to the Cart.
- Specified by:
setIsActivein interfaceDiscountCode- Parameters:
isActive- value to be set
-
setReferences
Description copied from interface:DiscountCodeReferences to all resources addressed in the
cartPredicateby their IDs. This value is generated by the platform.- Specified by:
setReferencesin interfaceDiscountCode- Parameters:
references- values to be set
-
setReferences
Description copied from interface:DiscountCodeReferences to all resources addressed in the
cartPredicateby their IDs. This value is generated by the platform.- Specified by:
setReferencesin interfaceDiscountCode- Parameters:
references- values to be set
-
setMaxApplications
Description copied from interface:DiscountCodeNumber of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count. This field does not limit discount applications for Orders created from a Recurring Order.
- Specified by:
setMaxApplicationsin interfaceDiscountCode- Parameters:
maxApplications- value to be set
-
setMaxApplicationsPerCustomer
Description copied from interface:DiscountCodeNumber of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count. This field does not limit discount applications for Orders created from a Recurring Order.
- Specified by:
setMaxApplicationsPerCustomerin interfaceDiscountCode- Parameters:
maxApplicationsPerCustomer- value to be set
-
setCustom
Description copied from interface:DiscountCodeCustom Fields of the DiscountCode.
- Specified by:
setCustomin interfaceCustomizable<DiscountCode>- Specified by:
setCustomin interfaceDiscountCode- Parameters:
custom- value to be set
-
setGroups
Description copied from interface:DiscountCodeGroups to which the DiscountCode belongs to.
- Specified by:
setGroupsin interfaceDiscountCode- Parameters:
groups- values to be set
-
setGroups
Description copied from interface:DiscountCodeGroups to which the DiscountCode belongs to.
- Specified by:
setGroupsin interfaceDiscountCode- Parameters:
groups- values to be set
-
setValidFrom
Description copied from interface:DiscountCodeDate and time (UTC) from which the DiscountCode is effective.
- Specified by:
setValidFromin interfaceDiscountCode- Parameters:
validFrom- value to be set
-
setValidUntil
Description copied from interface:DiscountCodeDate and time (UTC) until which the DiscountCode is effective.
- Specified by:
setValidUntilin interfaceDiscountCode- Parameters:
validUntil- value to be set
-
setApplicationVersion
Description copied from interface:DiscountCodeUsed and managed by the API and must not be used in customer logic. The value can change at any time due to internal and external factors.
- Specified by:
setApplicationVersionin interfaceDiscountCode- Parameters:
applicationVersion- value to be set
-
equals
-
hashCode
public int hashCode() -
toString
-
copyDeep
- Specified by:
copyDeepin interfaceBaseResource- Specified by:
copyDeepin interfaceDiscountCode
-