Table of Contents

Class PriceInfo

Namespace
Dynamicweb.Ecommerce.Prices
Assembly
Dynamicweb.Ecommerce.dll
Gives to work with qualified prices.
[Serializable]
public class PriceInfo : IPriceReferenceInfo, IInformativePriceInfo, IPriceInfo, IPriceSourceInfo
Inheritance
PriceInfo
Implements
Inherited Members

Constructors

PriceInfo()

Initializes a new instance of the PriceInfo class.
[Obsolete("Use overload with currency instead.")]
public PriceInfo()

PriceInfo(Currency)

Initializes a new instance of the PriceInfo class.
public PriceInfo(Currency currency)

Parameters

currency Currency

Fields

_vatPercent

protected double _vatPercent

Field Value

double

Properties

Currency

Gets or sets the currency.
public virtual Currency Currency { get; set; }

Property Value

Currency

IsInformative

Gets or sets whether the price is informative.
public virtual bool IsInformative { get; set; }

Property Value

bool
True if the price is informative; otherwise false.

Price

Gets the price.
public virtual double Price { get; }

Property Value

double

PriceFormatted

Gets the formatted price.
public virtual string PriceFormatted { get; }

Property Value

string

PriceFormattedNoSymbol

Gets the formatted price without symbol.
public virtual string PriceFormattedNoSymbol { get; }

Property Value

string

PricePIP

Minimum fluctuation or smallest increment of price movement.
public virtual long PricePIP { get; }

Property Value

long

PriceReference

Gets or sets the price reference.
public virtual string PriceReference { get; set; }

Property Value

string

PriceSource

Gets or sets a value indicating what price provider generate price.
public PriceSource? PriceSource { get; set; }

Property Value

PriceSource?

PriceWithoutVAT

Gets or sets the price without VAT.
public virtual double PriceWithoutVAT { get; set; }

Property Value

double

PriceWithoutVATFormatted

Gets the price without VAT formatted.
public virtual string PriceWithoutVATFormatted { get; }

Property Value

string

PriceWithoutVATFormattedNoSymbol

Gets the price without VAT formatted no symbol.
public virtual string PriceWithoutVATFormattedNoSymbol { get; }

Property Value

string

PriceWithVAT

Gets or sets the price with VAT.
public virtual double PriceWithVAT { get; set; }

Property Value

double

PriceWithVATFormatted

Gets the price with formatted VAT.
public virtual string PriceWithVATFormatted { get; }

Property Value

string

PriceWithVATFormattedNoSymbol

Gets the price with formatted VAT without symbol.
public virtual string PriceWithVATFormattedNoSymbol { get; }

Property Value

string

ReverseChargeForVat

Gets or sets a value indicating whether this PriceInfo has reverse charge for VAT.
public bool ReverseChargeForVat { get; set; }

Property Value

bool
true if the price has reverse charge for VAT; otherwise, false.

VAT

Gets or sets the VAT.
public virtual double VAT { get; set; }

Property Value

double

VATFormatted

Gets the formatted VAT
public virtual string VATFormatted { get; }

Property Value

string

VATFormattedNoSymbol

Gets the formatted VAT without symbol.
public virtual string VATFormattedNoSymbol { get; }

Property Value

string

VATPercent

Gets or sets the VAT percent.
public virtual double VATPercent { get; set; }

Property Value

double

VATPercentFormatted

Gets the VAT percent as string with percent symbol.
public virtual string VATPercentFormatted { get; }

Property Value

string

Methods

Add(IPriceInfo)

Adds the specified price information.
public virtual PriceInfo Add(IPriceInfo info)

Parameters

info IPriceInfo
The price information.

Returns

PriceInfo
The PriceInfo.

Add(IPriceReferenceInfo)

Adds the specified price information from IPriceReferenceInfo.
public virtual PriceInfo Add(IPriceReferenceInfo info)

Parameters

info IPriceReferenceInfo
The price reference information.

Returns

PriceInfo
The PriceInfo.

Add(IWithPrice)

Adds the specified priceholder.
[Obsolete("Use overload without IWithPrice instead.")]
public virtual PriceInfo Add(IWithPrice priceHolder)

Parameters

priceHolder IWithPrice
The priceholder.

Returns

PriceInfo
The PriceInfo.

ConvertToPIP(double)

Gets the PIP.
[Obsolete("Use PriceHelper.ConvertToPIP(Currency, Double) instead.")]
public static long ConvertToPIP(double amount)

Parameters

amount double
The amount.

Returns

long
The PIP.

Divide(double)

Divides the specified factor.
public virtual PriceInfo Divide(double factor)

Parameters

factor double
The factor.

Returns

PriceInfo
The PriceInfo.

HasSamePrice(PriceInfo)

Determines that the prices are same.
public virtual bool HasSamePrice(PriceInfo priceInfo)

Parameters

priceInfo PriceInfo
The PriceInfo.

Returns

bool
true if prices are same, otherwise - false.

Multiply(double)

Multiplies the specified factor.
public virtual PriceInfo Multiply(double factor)

Parameters

factor double
The factor.

Returns

PriceInfo
The PriceInfo.

Multiply(double, int)

public virtual PriceInfo Multiply(double factor, int roundingDecimals)

Parameters

factor double
roundingDecimals int

Returns

PriceInfo

Substract(IPriceInfo)

Substracts the specified info.
public virtual PriceInfo Substract(IPriceInfo info)

Parameters

info IPriceInfo
The price info.

Returns

PriceInfo
The PriceInfo.

Substract(IPriceReferenceInfo)

Substracts the specified info from IPriceReferenceInfo.
public virtual PriceInfo Substract(IPriceReferenceInfo info)

Parameters

info IPriceReferenceInfo
The price reference info.

Returns

PriceInfo
The PriceInfo.

Substract(IWithPrice)

Substracts the specified priceholder.
[Obsolete("Use overload without IWithPrice instead.")]
public virtual PriceInfo Substract(IWithPrice priceHolder)

Parameters

priceHolder IWithPrice
The priceholder.

Returns

PriceInfo
The PriceInfo.

ToPrice(Currency)

Convert current price to price with new currency.
public PriceInfo ToPrice(Currency toCurrency)

Parameters

toCurrency Currency
New currency.

Returns

PriceInfo
Returns new PriceInfo class if succefull, otherwise Nothing.

ToString()

Returns a string that represents this instance.
public override string ToString()

Returns

string
A string that represents this instance.
To top