ColonesExchangeRate 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package ColonesExchangeRate --version 1.0.2                
NuGet\Install-Package ColonesExchangeRate -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ColonesExchangeRate" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ColonesExchangeRate --version 1.0.2                
#r "nuget: ColonesExchangeRate, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ColonesExchangeRate as a Cake Addin
#addin nuget:?package=ColonesExchangeRate&version=1.0.2

// Install ColonesExchangeRate as a Cake Tool
#tool nuget:?package=ColonesExchangeRate&version=1.0.2                

Colones Exchange Rate NuGet & npm Packages

This repository contains a NuGet & npm packages to provide currency conversion from Colones (Costa Rica - CRC ₡) to Dollars (United States - USD $) and Euros (European Union - EUR €). It consumes the API from Ministerio de Hacienda de Costa Rica (The API is in Spanish).

ColonesExchangeRate - CI/CD

alternate text is missing from this package README image

Installation

You can install the ColonesExchangeRate package from NuGet.org, npmjs.com or GitHub Packages.

NuGet Package

To install ColonesExchangeRate using NuGet, run the following command in the Package Manager Console:

Install-Package ColonesExchangeRate

Usage

To use ColonesExchangeRate, first create an instance of the CurrencyConverter class:

var converter = new CurrencyConverter();

Then, you can use the following methods to perform currency conversion:

decimal dolaresAColones = await converter.DollarsToColones(amount);
decimal colonesADolares = await converter.ColonesToDollars(amount);
decimal dolaresAEuros = await converter.DollarsToEuros(amount);
decimal eurosADolares = await converter.EurosToDollars(amount);
decimal colonesAEuros = await converter.ColonesToEuros(amount);
decimal eurosAColones = await converter.EurosToColones(amount);
// true or false to get the date as part of the exchange rate information.
(DateTime? date, decimal sale, decimal purchase) dollarExchangeRate = await converter.GetDollarExchangeRate(true); 
(DateTime? date, decimal dollars, decimal colones) euroExchangeRate = await converter.GetEuroExchangeRate(true);

The result will look similar to this: Console Result

Note: Replace amount with the amount of currency you want to convert.

The GetDollarExchangeRate and GetEuroExchangeRate methods return a tuple with three values: the date of the exchange rate, the sale rate, and the purchase rate.

npm Package

To install ColonesExchangeRate using npm, run the following command in the Package Manager Console:

npm install @dsanchezcr/colones-exchange-rate

Usage

To use ColonesExchangeRate, first import the CurrencyConverter class:

import { CurrencyConverter } from '@dsanchezcr/colones-exchange-rate';

Then, you can use the following methods to perform currency conversion:

const converter = new CurrencyConverter();
const dolaresAColones = await converter.DollarsToColones(amount);
const colonesADolares = await converter.ColonesToDollars(amount);
const dolaresAEuros = await converter.DollarsToEuros(amount);
const eurosADolares = await converter.EurosToDollars(amount);
const colonesAEuros = await converter.ColonesToEuros(amount);
const eurosAColones = await converter.EurosToColones(amount);
// true or false to get the date as part of the exchange rate information.
const dollarExchangeRate = await converter.GetDollarExchangeRate(true);
const euroExchangeRate = await converter.GetEuroExchangeRate(true);

Note: Replace amount with the amount of currency you want to convert.

The GetDollarExchangeRate and GetEuroExchangeRate methods return a tuple with three values: the date of the exchange rate, the sale rate, and the purchase rate.

Contributing

Contributions are welcome! To contribute to ColonesExchangeRate, fork the repository and create a pull request with your changes.

License

ColonesExchangeRate is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.2 269 11/24/2023
2.0.1 138 11/20/2023
2.0.0 131 11/19/2023
1.0.2 142 11/18/2023
1.0.1 210 11/12/2023
1.0.0 164 11/6/2023