public interface OfferAuditService
OfferAudit
s. An OfferAudit
is used to track usage of an offer and offer code
for a particular Order
and Customer
. This provides easy and fast tracking of verifying max uses on
particular Offer
s.Modifier and Type | Method and Description |
---|---|
Long |
countOfferCodeUses(Long offerCodeId)
Deprecated.
|
Long |
countOfferCodeUses(Order order,
Long offerCodeId)
Counts how many times the given offer code has been used in the system.
|
Long |
countUsesByAccount(Order order,
Long accountId,
Long offerId,
Long minimumDaysPerUsage)
Counts how many times the an offer has been used by an account
This method will take into account if the Offer has already been
applied to the Order so as not to prevent the Offer from applying
to new items added to the Order by a CRS.
|
Long |
countUsesByCustomer(Long customerId,
Long offerId)
Deprecated.
|
Long |
countUsesByCustomer(Order order,
Long customerId,
Long offerId)
Counts how many times the an offer has been used by a customer.
|
Long |
countUsesByCustomer(Order order,
Long customerId,
Long offerId,
Long minimumDaysPerUsage)
Counts how many times the an offer has been used by a customer (within the passed in number of days if provided).
|
OfferAudit |
create()
Creates a new offer audit
|
void |
delete(OfferAudit offerAudit) |
OfferAudit |
readAuditById(Long offerAuditId) |
List<OfferAudit> |
readOfferAuditsByOrderId(Long orderId)
Read all audits by order id
|
OfferAudit |
save(OfferAudit offerAudit)
Persists an audit record to the database
|
OfferAudit readAuditById(Long offerAuditId)
OfferAudit save(OfferAudit offerAudit)
void delete(OfferAudit offerAudit)
OfferAudit create()
Long countUsesByCustomer(Order order, Long customerId, Long offerId)
order
- customerId
- offerId
- Long countUsesByCustomer(Order order, Long customerId, Long offerId, Long minimumDaysPerUsage)
order
- customerId
- offerId
- Long countUsesByAccount(Order order, Long accountId, Long offerId, Long minimumDaysPerUsage)
order
- accountId
- offerId
- Long countUsesByCustomer(Long customerId, Long offerId)
countUsesByCustomer(Order, Long, Long)
customerId
- offerId
- Long countOfferCodeUses(Order order, Long offerCodeId)
order
- offerCodeId
- @Deprecated Long countOfferCodeUses(Long offerCodeId)
countOfferCodeUses(Order, Long)
offerCodeId
- List<OfferAudit> readOfferAuditsByOrderId(Long orderId)
orderId
- Copyright © 2022. All rights reserved.