Frontend | Backend | Api

Money (Api)

Money objects are immutable. Arithmetic methods return a new instance with the result, handle rounding and ensure currencies match.

Property Description Returns
currency Get the currency Currency
currencyCode Get the currency code string
value Get the value string
equal Is the given money object equal? bool
greaterThan Compares the current Money object with the given Money object. Will return true if the current Money object is greater than the given Money object. bool
greaterThanOrEqual Compares the current Money object with the given Money object. Will return true if the current Money object is greater than or equal to the given Money object. bool
lessThan Compares the current Money object with the given Money object. Will return true if the current Money object is less than the given Money object. bool
lessThanOrEqual Compares the current Money object with the given Money object. Will return true if the current Money object is less than or equal to the given Money object. bool
zero Is the money object zero? bool
positive Is the money object positive? (ie Greater than zero) bool
negative Is the money object negative? (ie Less than zero) bool