Table of Contents

Interface IPriceCalculationRequest

Namespace
CMS.Commerce
Assembly
CMS.Commerce.dll

Represents the contract for a price calculation request, encapsulating all information necessary to perform order price calculations. This interface is not intended for custom implementation. Use PriceCalculationRequest or PriceCalculationRequestBase<TCalculationRequestItem, TCalculationRequestAddress> for extensibility.

public interface IPriceCalculationRequest
Extension Methods

Properties

BillingAddress

The billing address associated with the calculation request.

AddressDto BillingAddress { get; init; }

Property Value

AddressDto

CalculationDate

Date and time when discounts and taxes are to be valid. For most price calculations, the value is equal to the current time. When calculating prices for existing orders, the values is equal to the date and time when the order was created.

DateTime CalculationDate { get; }

Property Value

DateTime

CustomerId

Identifier for the customer placing the order. May be used for customer-specific pricing, discounts, or loyalty tracking.

int? CustomerId { get; init; }

Property Value

int?

Remarks

null if the customer is not known or not provided.

LanguageName

Language name. Used to fetch localized ProductData from the underlying product store.

string LanguageName { get; init; }

Property Value

string

Remarks

The language name is used for product data localization during product data retrieval via IProductDataRetriever<TProductIdentifier, TProductData>.

PaymentMethodId

Identifier for the selected payment method. Can affect transaction fees or eligibility for certain promotions.

int? PaymentMethodId { get; init; }

Property Value

int?

Remarks

null if the payment method is not known or not provided.

ShippingAddress

The shipping address to which the products will be delivered.

AddressDto ShippingAddress { get; init; }

Property Value

AddressDto

ShippingMethodId

Identifier for the chosen shipping method. Used to calculate delivery costs and estimated delivery times.

int? ShippingMethodId { get; init; }

Property Value

int?

Remarks

null if the shipping method is not known or not provided.

Methods

AddNewItem(ProductIdentifier, decimal)

Internal "setter" for the ProductIdentifier to enable to use contravariance "out" in the IPriceCalculationRequestItem<TProductIdentifier> interface to support inherited subclasses of ProductIdentifier in the IPriceCalculationRequestItem<TProductIdentifier> interface.

void AddNewItem(ProductIdentifier productIdentifier, decimal quantity)

Parameters

productIdentifier ProductIdentifier
quantity decimal