Class Codes
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.Codes
- All Implemented Interfaces:
Serializable
DTO containing codes used to apply offers to orders. These can be shared offer codes or tracking
IDs for entities like Campaigns.
- Author:
- Nathan Moore (nathanmoore).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Returns the combined set ofsharedCodes
andtrackingIds
.Deprecated.since this is not used after 2.0.0Code strings added to the order that may be tied to an offer's shared codes and used to apply it.Tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids.int
hashCode()
void
setCodeUsedByTrackingId
(Map<String, String> codeUsedByTrackingId) Deprecated.since this is not used after 2.0.0void
setSharedCodes
(Set<String> sharedCodes) Code strings added to the order that may be tied to an offer's shared codes and used to apply it.void
setTrackingIds
(Set<String> trackingIds) Tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids.toString()
-
Constructor Details
-
Codes
public Codes()
-
-
Method Details
-
getAllCodes
Returns the combined set ofsharedCodes
andtrackingIds
. By default, the result is non-modifiable.- Returns:
- the combined set of
sharedCodes
andtrackingIds
.
-
getTrackingIds
Tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids. This works withcom.broadleafcommerce.promotion.campaign.domain.Campaign#id
and assumes that the customer already meets usage and date requirements for using any corresponding offer.- Returns:
- Tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids.
-
getCodeUsedByTrackingId
Deprecated.since this is not used after 2.0.0A map of codes used by tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids. This works withcom.broadleafcommerce.promotion.campaign.domain.Campaign#id
and assumes that the customer already meets usage and date requirements for using any corresponding offer.This map is solely for populating
Adjustment.getCodeUsed()
when a campaign code is used in PromotionServices versions prior to 2.0.0.- Returns:
- A map of codes by tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids.
-
setTrackingIds
Tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids. This works withcom.broadleafcommerce.promotion.campaign.domain.Campaign#id
and assumes that the customer already meets usage and date requirements for using any corresponding offer.- Parameters:
trackingIds
- Tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids.
-
setCodeUsedByTrackingId
Deprecated.since this is not used after 2.0.0A map of codes used by tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids. This works withcom.broadleafcommerce.promotion.campaign.domain.Campaign#id
and assumes that the customer already meets usage and date requirements for using any corresponding offer.This map is solely for populating
Adjustment.getCodeUsed()
when a campaign code is used in PromotionServices versions prior to 2.0.0.- Parameters:
codesByTrackingId
- A map of codes by tracking ids associated with external systems like the Campaigns Service that could be tied to an offer's campaign tracking ids.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-