Class OfferRef
java.lang.Object
com.broadleafcommerce.order.common.domain.OfferRef
- All Implemented Interfaces:
Serializable
A reference to some external offer. Offers can be associated to carts, orders, fulfillment, or
their items. This reference could come from Broadleaf's Offer Microservice or some other source
entirely.
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Dynamic attributes that are a part of the offer.A label for this offer typically used by the storefront.A description of what benefits the offer provides to a customer.getId()
The ID of the offer.getName()
The name of the offer.Determines how an offer's discount amount is distributed across the offer's related order item types.int
hashCode()
void
setAttributes
(Map<String, Object> attributes) Dynamic attributes that are a part of the offer.void
setCartLabel
(String cartLabel) A label for this offer typically used by the storefront.void
setDescription
(String description) A description of what benefits the offer provides to a customer.void
The ID of the offer.void
The name of the offer.void
setProrationType
(String prorationType) Determines how an offer's discount amount is distributed across the offer's related order item types.toString()
-
Constructor Details
-
OfferRef
public OfferRef()
-
-
Method Details
-
getId
The ID of the offer.- Returns:
- The ID of the offer.
-
getName
The name of the offer. Often used to indicate to a customer what offers are applied to their cart.- Returns:
- The name of the offer.
-
getDescription
A description of what benefits the offer provides to a customer.- Returns:
- A description of benefits what the offer provides to a customer.
-
getCartLabel
A label for this offer typically used by the storefront.- Returns:
- A label for this offer typically used by the storefront.
-
getProrationType
Determines how an offer's discount amount is distributed across the offer's related order item types. This can either be set to prorate across target items or target and qualifier items.This property is used downstream in `OrderOperationServices` or other custom services to calculate the proper refund amounts when factoring in offer discounts.
- Returns:
- The type of order items that this discount is prorated across.
- See Also:
-
getAttributes
Dynamic attributes that are a part of the offer.- Returns:
- dynamic attributes that are a part of the offer
-
setId
The ID of the offer.- Parameters:
id
- The ID of the offer.
-
setName
The name of the offer. Often used to indicate to a customer what offers are applied to their cart.- Parameters:
name
- The name of the offer.
-
setDescription
A description of what benefits the offer provides to a customer.- Parameters:
description
- A description of what benefits the offer provides to a customer.
-
setCartLabel
A label for this offer typically used by the storefront.- Parameters:
cartLabel
- A label for this offer typically used by the storefront.
-
setProrationType
Determines how an offer's discount amount is distributed across the offer's related order item types. This can either be set to prorate across target items or target and qualifier items.This property is used downstream in `OrderOperationServices` or other custom services to calculate the proper refund amounts when factoring in offer discounts.
- Parameters:
prorationType
- The type of order items that this discount is prorated across.- See Also:
-
setAttributes
Dynamic attributes that are a part of the offer.- Parameters:
attributes
- dynamic attributes that are a part of the offer
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-