initializeCountryOptions

fun initializeCountryOptions(shopperLocale: Locale, addressParams: AddressParams?, countryList: List<AddressItem>): List<AddressListItem>

Initialize country options using AddressParams.

First filter if there's AddressParams.FullAddress.supportedCountryCodes defined in the configuration. Then mark AddressParams.FullAddress.defaultCountryCode as selected if it is defined in configuration and exists in the filtered country list. Otherwise mark first item in the list as selected.

Return

Country options.

Parameters

addressParams

object.

countryList

List of countries from API.