Elastic Path Commerce Development

Price classes and interfaces

Price classes and interfaces

The price domain objects are located in the com.elasticpath.domain.catalog package of the core library:

  • Price - contains the tiered prices for a product or SKU in a specific currency, including the list price, sale price, and computed price (after Promotion rule engine have been applied).
  • PriceTier - contains the price of an item when purchased in a given quantity.

The price list domain objects are located in the com.elasticpath.domain.pricing package of the core library, including:

  • BaseAmount - information about a price list item for a quantity (tier), including list price and sale price.
  • PriceListDescriptor - metadata about a price list (its name, its priority, the currency, etc.).
  • PriceListStack - the set of price lists assigned to the shopper.
  • ItemPricing - contains price information for a line item in an order.

Price related services are in the com.elasticpath.common.pricing.service package of the core library:

  • Managing pricing - main interface used to retrieve the "promoted" prices for products and SKUs.
  • Managing pricing - used to return the price list stack for a specific shopper. The building of the stack is delegated to a Customizing the price list stack lookup strategy.
  • Managing pricing, PriceListAssignmentHelperService - used when working with price lists in the Commerce Manager. These services use lightweight versions of the price list domain objects (DTOs) to reduce the overhead of working with the standard domain objects.

Additional price list services are in the com.elasticpath.service.pricing package of the core library:

  • PriceLookupService - contains methods that take products, SKUs, and price list stacks as parameters and return the appropriate prices.
  • PriceListDescriptorService - contains methods for persisting price list descriptor objects.