Pricing Baseprice Callback Interface Parameters
Batch Price Request Interface
Below is the interface used by the BasePrice callback.
/// <summary> /// Cart Price Request by Batch Object /// </summary> public interface IBatchPriceRequest : ICartBaseRequest { /// <summary> /// Unique batch ID /// </summary> public string BatchId { get; } /// <summary> /// Batch name /// </summary> public string Name { get; } /// <summary> /// List of lines present in this batch to be priced /// </summary> public List<IProductLineItemModel> GetLineItems(); /// <summary> /// List of related lines or parent bundle lines present in this batch to be priced /// </summary> public List<IProductLineItemModel> GetReferenceLines(); /// <summary> /// Cart context. /// </summary> public ICartContext GetCartContext(); /// <summary> /// Set error details for all lines in this batch. This also updates pricing status to error /// </summary> /// <param name="errorDetails"></param> public void SetErrorDetails(string errorDetails, string lineItemId = null); /// <summary> /// Set error details for all lines in this batch. This also updates pricing status to error /// </summary> /// <param name="ex"></param> public void SetErrorDetails(Exception ex, string lineItemId = null); /// <summary> /// List the product lines that have thrown no errors so far during processing. /// Errors could be due to validation checks, invalid data setup or failure of dependent systems as well /// </summary> /// <returns></returns> public IEnumerable<IProductLineItemModel> GetValidProductLineItems(); /// <summary> /// Gets the product line object using line number. /// Option Line can use it to get RootBundleLine LineItemModel. /// </summary> /// <param name="lineNumber">Line number</param> /// <returns></returns> public IProductLineItemModel GetRootParentBundleLine(int lineNumber); /// <summary> /// Gets the product line object using parent bundler number. /// Option Line can use it to get ParentBundleLine LineItemModel. /// </summary> /// <param name="parentBundleNumber">Parent bundle number</param> /// <returns></returns> public IProductLineItemModel GetParentBundleLine(int parentBundleNumber); /// <summary> /// Get Realted Line Items /// </summary> /// <returns></returns> public IEnumerable<ILineItemModel> GetRelatedLineItems(); }
Method |
Data Type |
Description |
---|---|---|
BatchId |
String |
Provides the unique batch ID. |
Name |
String |
Provides the batch name. |
GetLineItems(); |
List<IProductLineItemModel> |
Provides the details of lines to be priced in the batch. |
GetReferenceLines() |
List<IProductLineItemModel> |
Cart Price Request by Batch object provides the details of parent lineitems. |
GetCartContext() |
ICartContext |
Provides the context of the cart. |
SetErrorDetails(string errorDetails, string lineItemId = null); |
Void |
Sets error details for all lines in this batch and updates the pricing status to error. |
SetErrorDetails(Exception ex, string lineItemId = null) |
Void |
Set error details for all lines in this batch and update the pricing status to error. |
GetValidProductLineItems(); |
IEnumerable<IProductLineItemModel> |
Provides all the line items which are not marked as error or valid lineitems in pricing. |
GetRootParentBundleLine(int lineNumber); |
IProductLineItemModel |
Gets the root parent bundle for option lines. |
GetParentBundleLine(int parentBundleNumber) |
IProductLineItemModel |
Gets the parent bundle line for options. |
GetRelatedLineItems() |
IEnumerable<ILineItemModel> |
Provides the related line items |