CWS Wrapper Library  5.1.0
Public Member Functions | Static Public Member Functions | Properties | List of all members
CWSWrapper.Money Class Reference

Representation of monetary amounts with a currency code (ECLCurrencyCode - ISO 4217) and a value in minor units.

More...

Public Member Functions

 Money ()
 Constructor for defining monetary amounts. More...
 
 Money (CurrencyCode cc, string amount)
 Constructor for defining monetary amounts. More...
 
 Money (CurrencyCode cc, long amount)
 Constructor for defining monetary amounts. More...
 
long getAmountInMinorUnits ()
 Get the monetary amount in minor units. More...
 

Static Public Member Functions

static CurrencyCode CurrencyCodefromString (string text)
 Returns the corresponding CurrencyCode of the given string. If the string can not be parsed into a valid CurrencyCode, the UNKNOWN CurrnecyCode is returned. More...
 

Properties

long value [get, set]
 Monetary Amount More...
 
string currencyCode [get, set]
 Currency Code More...
 

Detailed Description

Representation of monetary amounts with a currency code (ECLCurrencyCode - ISO 4217) and a value in minor units.

Constructor & Destructor Documentation

◆ Money() [1/3]

CWSWrapper.Money.Money ( )
inline

Constructor for defining monetary amounts.

◆ Money() [2/3]

CWSWrapper.Money.Money ( CurrencyCode  cc,
string  amount 
)
inline

Constructor for defining monetary amounts.

Parameters
ccCurrency code as an instance of CurrencyCode.
amountAmount in minor units.

◆ Money() [3/3]

CWSWrapper.Money.Money ( CurrencyCode  cc,
long  amount 
)
inline

Constructor for defining monetary amounts.

Parameters
ccCurrency code as an instance of CurrencyCode.
amountAmount in minor units.

Member Function Documentation

◆ CurrencyCodefromString()

static CurrencyCode CWSWrapper.Money.CurrencyCodefromString ( string  text)
inlinestatic

Returns the corresponding CurrencyCode of the given string. If the string can not be parsed into a valid CurrencyCode, the UNKNOWN CurrnecyCode is returned.

Parameters
textThe string to be parsed.
Returns
The appropriate currency code for the string.

◆ getAmountInMinorUnits()

long CWSWrapper.Money.getAmountInMinorUnits ( )
inline

Get the monetary amount in minor units.

Returns
Amount in minor units.

Property Documentation

◆ currencyCode

string CWSWrapper.Money.currencyCode
getset

Currency Code

The currency code associated with the monetary amount.

◆ value

long CWSWrapper.Money.value
getset

Monetary Amount

Amount in minor units.


The documentation for this class was generated from the following file: