Provides functionality to manage country-related data in MegaScript.

interface Countries {
    GetByIsoCode: ((countryNameOrIsoCode: string) => ApiCountry);
    GetCountries: (() => ApiCountry);
}

Properties

GetByIsoCode: ((countryNameOrIsoCode: string) => ApiCountry)

Fetches details of a specific country by its name or ISO code.

Type declaration

    • (countryNameOrIsoCode): ApiCountry
    • Parameters

      • countryNameOrIsoCode: string

        A string representing either the country name or ISO code.

      Returns ApiCountry

      An ApiCountry object if found, otherwise null.

GetCountries: (() => ApiCountry)

Fetches all available countries from the system. This includes country details such as name, ISO codes, and billing/shipping permissions.

Type declaration