This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /api/reports/v3/delete HTTP/1.1 | |
Authorization: OAuth xxxxxxxxxxx | |
Accept: application/xml | |
Host: secure.indicee.com | |
qname=iqn.2://indicee.com/1/0/report/b978aa53-...-8fea8eeb4a76 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /api/reports/create HTTP/1.1 | |
Authorization: OAuth xxxxxxxxxxx | |
Accept: application/xml | |
Host: secure.indicee.com | |
name=...&view=... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /api/reports/v3/list HTTP/1.1 | |
Authorization: OAuth xxxxxx | |
Accept: application/xml | |
Host: secure.indicee.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /api/reports/v3?window=0,0,1000,1000&qname=iqn.2%3A%2F%2Findicee.com%2F405%2F0%2Freport%2F38b1ac19-5d04-4bc4-823c-b8700d0a852a HTTP/1.1 | |
Authorization: OAuth xxxxxxxxxxx | |
Accept: application/xml | |
Host: secure.indicee.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public last5MinConversion = cachedCurrencyConversion (60 * 5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Obtain a converted currency value, using a cached for exchange rates | |
* The cached value of the exchange rate is used (if available) so long as it is no older than ageSeconds | |
* @arg ageSeconds the maximum age of the cached value of the exchange rate that will be used in the conversion | |
* @arg fromCurrency the originating currency ISO 4217 trigraph abbreviation in any case (e.g. EUR, cad, usd, Gbp) | |
* @arg toCurrency the target currency ISO 4217 trigraph abbrebiation in any case (e.g. Eur, CAD, Usd, GBP) | |
* @arg amount the amount to convert, denominated in the originating currency unit | |
* @return the equivalent amount, denominated in the target currency unit | |
*/ | |
cachedCurrencyConversion :: Double -> String -> String -> Double -> Double; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* An efficient tuple of exchange rate and time | |
*/ | |
data CachedConversion = | |
CachedConversion | |
rate :: !Double | |
time :: !Time | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Obtain the unit conversion between two currencies | |
*/ | |
unitExchangeRate :: String -> String -> Double; | |
unitExchangeRate fromCurrency toCurrency = | |
exchangeRateConversion fromCurrency toCurrency 1.0; |