Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

Amount

API reference for Amount in Vendr, the eCommerce solution for Umbraco v8+

Amount

A Vendr amount object

public class Amount : ValueObjectBase, IAmount

Inheritance

Namespace

Constructors

Amount (1 of 2)

Instantiates a new Amount instance

public Amount(decimal value, Guid currencyId)

Parameters

Parameter Description
value
The value of the amount
currencyId
The ID of the Currency of the price

Amount (2 of 2)

Instantiates a new Amount instance

public Amount(decimal value, CurrencyReadOnly currency)

Parameters

Parameter Description
value
The value of the amount
currency
The Currency of the price

Properties

CultureName

Gets the Culture Name of the Currency of the amount

public string CultureName { get; }

CurrencyId

Gets the ID of the Currency of the amount

public Guid CurrencyId { get; }

Value

Gets the value of the amount

public decimal Value { get; }

Methods

OfSameCurrency

Create a new Amount of the same Currency as an existing amount

public static Amount OfSameCurrency(Amount existingAmount, decimal value)

Parameters

Parameter Description
existingAmount
The existing Amount instance
value
The value of the new amount

Returns

A new Amount instance


ZeroValue

Instantiates a new Amount instance with a zero value

public static Amount ZeroValue(Guid currencyId)

Parameters

Parameter Description
currencyId
The ID of the Currency of the amount

Returns

A zero value Amount instance


DeepClone

public override object DeepClone()

Operators

Amount Implicit

public static implicit operator decimal(Amount amount)

Edit this page on GitHub

Site + logo design © 2025 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.