Skip to content

Commit

Permalink
Add missing currencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Dec 29, 2020
1 parent e0fdca4 commit dfab115
Show file tree
Hide file tree
Showing 32 changed files with 276 additions and 18 deletions.
7 changes: 5 additions & 2 deletions src/Nager.Country.Export/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Json.Serialization;
Expand All @@ -23,7 +24,7 @@ static void Main(string[] args)
Converters =
{
new JsonStringEnumConverterWithAttributeSupport(null, true, true, true, true)
},
},
WriteIndented = true
};

Expand All @@ -34,6 +35,8 @@ static void Main(string[] args)
var jsonData = JsonSerializer.SerializeToUtf8Bytes(country, jsonSerializerOptions);
File.WriteAllBytesAsync($"{exportDirectory}/{country.Alpha2Code}.json", jsonData).GetAwaiter().GetResult();
}

Console.WriteLine("Json export done");
}
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/ElSalvadorInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class ElSalvadorInfo : ICountryInfo
Alpha2Code.HN,
};

public ICurrency[] Currencies => new ICurrency[] { "SVC", new UsdCurrency() };
public ICurrency[] Currencies => new ICurrency[] { new SvcCurrency(), new UsdCurrency() };
public string[] CallingCodes => new [] { "503" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/GuineaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class GuineaInfo : ICountryInfo
Alpha2Code.SL,
};

public ICurrency[] Currencies => new [] { "GNF" };
public ICurrency[] Currencies => new [] { new GnfCurrency() };
public string[] CallingCodes => new [] { "224" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/GuyanaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class GuyanaInfo : ICountryInfo
Alpha2Code.VE,
};

public ICurrency[] Currencies => new [] { "GYD" };
public ICurrency[] Currencies => new [] { new GydCurrency() };
public string[] CallingCodes => new [] { "592" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/LesothoInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class LesothoInfo : ICountryInfo
Alpha2Code.ZA,
};

public ICurrency[] Currencies => new ICurrency[] { "LSL", new ZarCurrency() };
public ICurrency[] Currencies => new ICurrency[] { new LslCurrency(), new ZarCurrency() };
public string[] CallingCodes => new [] { "266" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/MalawiInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class MalawiInfo : ICountryInfo
Alpha2Code.ZM,
};

public ICurrency[] Currencies => new [] { "MWK" };
public ICurrency[] Currencies => new [] { new MwkCurrency() };
public string[] CallingCodes => new [] { "265" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/MauritiusInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class MauritiusInfo : ICountryInfo
{
};

public ICurrency[] Currencies => new [] { "MUR" };
public ICurrency[] Currencies => new [] { new MurCurrency() };
public string[] CallingCodes => new [] { "230" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/NamibiaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class NamibiaInfo : ICountryInfo
Alpha2Code.ZM,
};

public ICurrency[] Currencies => new ICurrency[] { "NAD", new ZarCurrency() };
public ICurrency[] Currencies => new ICurrency[] { new NadCurrency(), new ZarCurrency() };
public string[] CallingCodes => new [] { "264" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/PapuaNewGuineaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class PapuaNewGuineaInfo : ICountryInfo
Alpha2Code.ID,
};

public ICurrency[] Currencies => new [] { "PGK" };
public ICurrency[] Currencies => new [] { new PgkCurrency() };
public string[] CallingCodes => new [] { "675" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/SaintHelenaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SaintHelenaInfo : ICountryInfo
Alpha2Code.PE,
};

public ICurrency[] Currencies => new ICurrency[] { "SHP", new GbpCurrency() };
public ICurrency[] Currencies => new ICurrency[] { new ShpCurrency(), new GbpCurrency() };
public string[] CallingCodes => new[] { "290", "247" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/SaoTomeAndPrincipeInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class SaoTomeAndPrincipeInfo : ICountryInfo
{
};

public ICurrency[] Currencies => new [] { "STD" };
public ICurrency[] Currencies => new [] {new StdCurrency() };
public string[] CallingCodes => new [] { "239" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/SierraLeoneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class SierraLeoneInfo : ICountryInfo
Alpha2Code.LR,
};

public ICurrency[] Currencies => new [] { "SLL" };
public ICurrency[] Currencies => new [] { new SllCurrency() };
public string[] CallingCodes => new [] { "232" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/SolomonIslandsInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class SolomonIslandsInfo : ICountryInfo
{
};

public ICurrency[] Currencies => new [] { "SBD" };
public ICurrency[] Currencies => new [] { new SbdCurrency() };
public string[] CallingCodes => new [] { "677" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/TanzaniaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class TanzaniaInfo : ICountryInfo
Alpha2Code.ZM,
};

public ICurrency[] Currencies => new [] { "TZS" };
public ICurrency[] Currencies => new [] { new TzsCurrency() };
public string[] CallingCodes => new [] { "255" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/TongaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class TongaInfo : ICountryInfo
{
};

public ICurrency[] Currencies => new [] { "TOP" };
public ICurrency[] Currencies => new [] { new TopCurrency() };
public string[] CallingCodes => new [] { "676" };
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/CountryInfos/UgandaInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class UgandaInfo : ICountryInfo
Alpha2Code.TZ,
};

public ICurrency[] Currencies => new [] { "UGX" };
public ICurrency[] Currencies => new [] { new UgxCurrency() };
public string[] CallingCodes => new [] { "256" };
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/GnfCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class GnfCurrency : ICurrency
{
public string Symbol => "FG";

public string Singular => null;

public string Plural => null;

public string IsoCode => "GNF";

public string NumericCode => "324";

public string Name => "Guinean franc";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/GydCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class GydCurrency : ICurrency
{
public string Symbol => "$";

public string Singular => "dollar";

public string Plural => "dollar";

public string IsoCode => "GYD";

public string NumericCode => "328";

public string Name => "Guyanese dollar";
}
}
2 changes: 1 addition & 1 deletion src/Nager.Country/Currencies/LrdCurrency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class LrdCurrency : ICurrency

public string NumericCode => "430";

public string Name => " Liberian dollar";
public string Name => "Liberian dollar";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/LslCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class LslCurrency : ICurrency
{
public string Symbol => "L";

public string Singular => "Loti";

public string Plural => "Maloti";

public string IsoCode => "LSL";

public string NumericCode => "426";

public string Name => "Lesotho loti";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/MurCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class MurCurrency : ICurrency
{
public string Symbol => "";

public string Singular => null;

public string Plural => null;

public string IsoCode => "MUR";

public string NumericCode => "480";

public string Name => "Mauritian rupee";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/MwkCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class MwkCurrency : ICurrency
{
public string Symbol => "K";

public string Singular => "kwacha";

public string Plural => "kwacha";

public string IsoCode => "MWK";

public string NumericCode => "454";

public string Name => "Malawian kwacha";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/NadCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class NadCurrency : ICurrency
{
public string Symbol => "$";

public string Singular => null;

public string Plural => null;

public string IsoCode => "NAD";

public string NumericCode => "516";

public string Name => "Namibian dollar";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/PgkCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class PgkCurrency : ICurrency
{
public string Symbol => "K";

public string Singular => "kina";

public string Plural => "kina";

public string IsoCode => "PGK";

public string NumericCode => "598";

public string Name => "Papua New Guinean kina";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/SbdCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class SbdCurrency : ICurrency
{
public string Symbol => "$";

public string Singular => null;

public string Plural => null;

public string IsoCode => "SBD";

public string NumericCode => "090";

public string Name => "Solomon Islands dollar";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/ShpCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class ShpCurrency : ICurrency
{
public string Symbol => "£";

public string Singular => null;

public string Plural => null;

public string IsoCode => "SHP";

public string NumericCode => "654";

public string Name => "Saint Helena pound";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/SllCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class SllCurrency : ICurrency
{
public string Symbol => "Le";

public string Singular => "leone";

public string Plural => "leones";

public string IsoCode => "SLL";

public string NumericCode => "694";

public string Name => "Sierra Leonean leone";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/StdCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class StdCurrency : ICurrency
{
public string Symbol => "Db";

public string Singular => "dobra";

public string Plural => "dobra";

public string IsoCode => "STD";

public string NumericCode => "678";

public string Name => "São Tomé and Príncipe dobra";
}
}
17 changes: 17 additions & 0 deletions src/Nager.Country/Currencies/SvcCurrency.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Nager.Country.Currencies
{
public class SvcCurrency : ICurrency
{
public string Symbol => "";

public string Singular => "colón";

public string Plural => "colón";

public string IsoCode => "SVC";

public string NumericCode => "222";

public string Name => "Salvadoran colón";
}
}
Loading

0 comments on commit dfab115

Please sign in to comment.