|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.commerce.pricing.PricingServices
public class PricingServices
Exposes pricing functionality for use in web services. There are three exposed methods: calculateOrderPrice - takes an orderId and a locale and returns an OrderPrice object corresponding to the order. calculateOrderPriceSummary - takes an orderId and a locale and returns an OrderPriceSummary object corresponding to the order. calculateItemPriceSummary - takes a sku Id, product Id, quantity profile Id, and locale and returns an ItemPriceSummary object corresponding to the given information. There are several private helper methods in this class that convert standard pricing objects (PricingAdjustment, OrderPriceInfo, etc.) into objects created specifically for webservices (PriceAdjustment, ShippingPriceSubtotal, etc.) that do not contain complex types. We need to do this because webservices does not support complex types at this time.
PricingTools
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
INVALID_PRODUCT_ID
|
static java.lang.String |
INVALID_PROFILE_ID
|
static java.lang.String |
INVALID_SKU_ID
|
static java.lang.String |
NULL_SKU_AND_PRODUCT
|
Constructor Summary | |
---|---|
PricingServices()
Constructs an instanceof PricingServices |
Method Summary | |
---|---|
ItemPriceSummary |
calculateItemPriceSummary(java.lang.String pSkuId,
java.lang.String pProductId,
long pQuantity,
java.lang.String pProfileId,
java.lang.String pLocale)
This method takes an sku Id, product Id, quantity, profile Id, and a locale, and prices the item based on the information given. |
OrderPrice |
calculateOrderPrice(java.lang.String pOrderId,
java.lang.String pLocale)
This method takes an order Id and a locale, prices the order, creates and returns an OrderPrice object based on the information in the priced order. |
OrderPriceSummary |
calculateOrderPriceSummary(java.lang.String pOrderId,
java.lang.String pLocale)
This method takes an order Id and a locale, prices the order, creates and returns an OrderPriceSummary object based on the information in the priced order. |
PricingTools |
getPricingTools()
the PricingTools object which performs the pricing operations |
void |
setPricingTools(PricingTools pPricingTools)
the PricingTools object that performs the pricing operations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String NULL_SKU_AND_PRODUCT
public static final java.lang.String INVALID_SKU_ID
public static final java.lang.String INVALID_PRODUCT_ID
public static final java.lang.String INVALID_PROFILE_ID
Constructor Detail |
---|
public PricingServices()
Method Detail |
---|
public void setPricingTools(PricingTools pPricingTools)
pPricingTools
- new value to setpublic PricingTools getPricingTools()
public OrderPrice calculateOrderPrice(java.lang.String pOrderId, java.lang.String pLocale) throws PricingException
pOrderId
- the Id of the order to be pricedpLocale
- String representing the locale to be considered
when pricing
PricingException
- if bad information is passed in, or
there are errors in the pricing of the orderpublic OrderPriceSummary calculateOrderPriceSummary(java.lang.String pOrderId, java.lang.String pLocale) throws PricingException
pOrderId
- the Id of the order to be pricedpLocale
- String representing the locale to be considered
when pricing
PricingException
- if bad information is passed in, or
there are errors in the pricing of the orderpublic ItemPriceSummary calculateItemPriceSummary(java.lang.String pSkuId, java.lang.String pProductId, long pQuantity, java.lang.String pProfileId, java.lang.String pLocale) throws PricingException
pSkuId
- the sku Id of the item to be pricedpProductId
- the product Id of the item to be pricedpQuantity
- the quantity of the item to be considered when pricingpProfileId
- the id of the profile to be considered when pricingpLocale
- String representing the locale to be considered when
pricing
PricingException
- if bad information is passed in, or
there are errors in the pricing of the item
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |