Class PricingApplicationService
java.lang.Object
com.example.orderplatform.pricing.application.PricingApplicationService
- All Implemented Interfaces:
PricingService
@Service
@Transactional(readOnly=true)
public class PricingApplicationService
extends Object
implements PricingService
Application service that reads the active catalog and calculates quote totals for order placement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionquoteFor(List<PricingRequest> requests) Quotes the requested products using active catalog entries.
-
Constructor Details
-
PricingApplicationService
-
-
Method Details
-
quoteFor
Quotes the requested products using active catalog entries.- Specified by:
quoteForin interfacePricingService- Parameters:
requests- product and quantity requests- Returns:
- priced quote with one line per request
- Throws:
BusinessRuleViolationException- when the request is empty, has an invalid quantity or mixes currenciesResourceNotFoundException- when a product code is not active in the catalog
-