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<TPriceCalculationRequestItem, TAddressDto> 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 promotions and taxes are to be valid.

DateTime CalculationDate { get; }

Property Value

DateTime

Remarks

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.

CustomerId

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

int CustomerId { get; init; }

Property Value

int

Remarks

null if the customer is not known or not provided.

LanguageName

Language name.

string LanguageName { get; init; }

Property Value

string

Remarks

Used to fetch localized ProductData from the underlying product store. The language name is used for product data localization during product data retrieval via IProductDataRetriever<TProductIdentifier, TProductData>.

Mode

Mode of price calculation that should be used.

PriceCalculationMode Mode { get; init; }

Property Value

PriceCalculationMode

Remarks

Describes which calculation steps should be used for price calculation. Allows to process just steps calculating prices for product catalog, shopping cart or checkut prices. Other modes can be defined which requires extending IPriceCalculationStepsProvider<TPriceCalculationRequest, TPriceCalculationResult>.Get(TPriceCalculationRequest) method.

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.