suchmaske/emarsys-countries

A class to map country codes and country names to Emarsys' specified country Ids.

v1.0.0 2021-03-10 22:56 UTC

This package is auto-updated.

Last update: 2024-05-11 06:04:02 UTC


README

Description

A small library to map country ISO-3166-1 country IDs to their respective Emarsys IDs.

Installation

composer require suchmaske/emarsys-countries

Run Tests

Directly

composer install
vendor/bin/phpunit tests

Docker

make init
make test

Usage

use Suchmaske\EmarsysCountries\EmarsysCountryHelper;

...

EmarsysCountryHelper::getCountryIdByIsoCode2('DE'); // returns 65
EmarsysCountryHelper::getCountryIdByIsoCode3('DEU'); // returns 65 
EmarsysCountryHelper::getCountryIdByNumericIsoCode(276); // returns 65