Table of Contents

Class FiscalCountryMapper

Namespace
RetailForce.Fiscalisation.Configuration
Assembly
RetailForce.Fiscalisation.Model.dll

Class to map fiscal country to iso alpha 2 codes.

public static class FiscalCountryMapper
Inheritance
object
FiscalCountryMapper
Inherited Members

Methods

GetFiscalCountryFromIsoAlpha2(string)

Returns the fiscal country (FiscalCountry) from the iso alpha 2 code (case insensitive).

public static FiscalCountry GetFiscalCountryFromIsoAlpha2(string countryCode)

Parameters

countryCode string

The iso alpha 2 country code to map.

Returns

FiscalCountry

The fiscal country (FiscalCountry) from the iso alpha 2 code (case insensitive).

Exceptions

NotImplementedException

Thrown if the given country code is not covered by this method.

GetIsoAlpha2CountryCode(FiscalCountry)

Returns the iso alpha 2 code from the FiscalCountry.

public static string GetIsoAlpha2CountryCode(this FiscalCountry fiscalCountry)

Parameters

fiscalCountry FiscalCountry

The fiscal country to map.

Returns

string

The iso alpha 2 code form the FiscalCountry.

Exceptions

NotImplementedException

Thrown if the given fiscal country is not covered by this method.

TryGetFiscalCountryFromIsoAlpha2(string, out FiscalCountry?)

Try to fetch the FiscalCountry from iso alpha 2 code.

public static bool TryGetFiscalCountryFromIsoAlpha2(string countryCode, out FiscalCountry? fiscalCountry)

Parameters

countryCode string

The iso alpha 2 code to fetch the FiscalCountry.

fiscalCountry FiscalCountry?

The fetched FiscalCountry. Nullable. Null if not fetched.

Returns

bool

True if FiscalCountry can be matched; otherwise false.

TryGetIsoAlpha2CountryCode(FiscalCountry, out string?)

Try's to fetch the iso alpha 2 code from FiscalCountry.

public static bool TryGetIsoAlpha2CountryCode(FiscalCountry fiscalCountry, out string? countryCode)

Parameters

fiscalCountry FiscalCountry

The fiscal country to fetch the iso alpha 2 code.

countryCode string

The iso alpha 2 code as out parameter. Null if not found.

Returns

bool

True if iso alpha 2 code can be matched; otherwise false.