The ClaimableManager
component (/atg/commerce/claimable/ClaimableManager
) provides higher level access to the repository and is the mechanism that most applications use to interact with the claimable item functionality. It provides the ability to claim items, initialize them, and then perform functions that are specific to one type of claimable item, thus combining several smaller functions from the ClaimableTools
package.
An example of how the ClaimableManager
component can layer together several pieces of functionality from the ClaimableTools
package is as follows: when a user claims an item by entering a code for a gift certificate, the ClaimableManager
component attempts to claim the item through the ClaimableTools
package. Then it attempts to adjust the status of the item to a claimed status, also through the ClaimableTools
package.
Other examples of functions that the ClaimableManager
component provides are as follows:
createClaimableGiftCertificate
—Creates a gift certificate in the system.debitClaimableGiftCertificate
—Debits a specific amount from the gift certificate.creditClaimableGiftCertificate
—Credits a specific amount to a gift certificate.
The ClaimableManager
also handles coupon functionality. For example, if you are using Core Commerce’s multisite feature, the ClaimableManager
can check the user’s site against the list of sites for which the coupon is valid before allowing it to be claimed.