OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.CurrencyConversionSession
Implementsosid.OsidSession
Description

This session defines methods to convert currency.

MethodgetSourceCurrencyType
Description

Gets the source currency type used in this session.

Returnosid.type.Typethe source currency
CompliancemandatoryThis method must be implemented.
MethodgetTargetCurrencyType
Description

Gets the target currency type used in this session.

Returnosid.type.Typethe target currency
CompliancemandatoryThis method must be implemented.
MethodcanConvertCurrency
Description

Tests if this user can perform currency conversions. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if conversion methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodconvertCurrency
Description

Converts currency.

Parametersosid.financials.CurrencysourceCurrencyAmountthe currency amount to convert
Returnosid.financials.Currencyresulting currency units
ErrorsINVALID_ARGUMENT sourceCurrencyAmount.getCurrencyType() != getSourcecurrencyType()
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodconvertCurrencies
Description

Converts currencies.

Parametersosid.financials.Currency[]sourceCurrencyAmountsthe currency amounts to convert
Returnosid.financials.Currency[]resulting currency units
ErrorsINVALID_ARGUMENT sourceCurrencyAmount.getCurrencyType() != getSourcecurrencyType()
NULL_ARGUMENT sourceCurrencyAmounts is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.