CountryServiceInterface

Extends

Interface CountryServiceInterface

category

System

package

Customer

subpackage

Interfaces

Methods

Method to check if a country has country zones

countryHasCountryZones(\CustomerCountryInterface $customerCountry) : boolean

Arguments

$customerCountry

\CustomerCountryInterface

Response

boolean

Method to check if a country zone exists in a country

countryZoneExistsInCountry(\CustomerCountryZoneInterface $customerCountryZone, \CustomerCountryInterface $customerCountry) : boolean

Arguments

$customerCountryZone

\CustomerCountryZoneInterface

$customerCountry

\CustomerCountryInterface

Response

boolean

Find country by iso2 code.

findCountryByIso2(string $p_countryIso2) : \CustomerCountryInterface

Arguments

$p_countryIso2

string

Response

\CustomerCountryInterface

Find country by name.

findCountryByName(string $p_countryName) : \CustomerCountryInterface

Arguments

$p_countryName

string

Response

\CustomerCountryInterface

This method returns a CustomerCountryZone object if found. Otherwise null will be returned.

findCountryZoneByNameAndCountry(\CustomerCountryZoneNameInterface|string $p_zoneName, \CustomerCountryInterface $customerCountry) : \CustomerCountryZoneInterface|null

Arguments

$customerCountry

\CustomerCountryInterface

Response

\CustomerCountryZoneInterface|null

Finds the country zone by the given zone code and country.

findCountryZoneByZoneCodeAndCountry(\CustomerCountryZoneIsoCode $zoneCode, \CustomerCountryInterface $country) : \CustomerCountryZoneInterface|null

Null will be returned if no results are found.

Arguments

$zoneCode

\CustomerCountryZoneIsoCode

Zone code of expected country zone.

$country

\CustomerCountryInterface

Country of zone.

Response

\CustomerCountryZoneInterface|null

Country zone model, if found.

Returns the country zone by the given zone code and country id.

findCountryZoneByZoneCodeAndCountryId(\CustomerCountryZoneIsoCode $zoneCode, \IdType $countryId) : \CustomerCountryZoneInterface

Null will be returned if no results are found.

Arguments

$zoneCode

\CustomerCountryZoneIsoCode

Zone code of expected country zone.

$countryId

\IdType

Country id of zone.

Response

\CustomerCountryZoneInterface

Country zone model, if found.

This method will return an array of CustomerCountryZone objects found by the country ID. If the country has no zones, an empty array will be returned

findCountryZonesByCountryId(\IdType $countryId) : array

Arguments

$countryId

\IdType

Response

array

of CustomerCountryZone objects

Method to get a country with a given id

getCountryById(\IdType $id) : \CustomerCountryInterface

Arguments

$id

\IdType

Response

\CustomerCountryInterface

Get country by iso2 code.

getCountryByIso2(string $p_countryIso2) : \CustomerCountryInterface

Arguments

$p_countryIso2

string

Response

\CustomerCountryInterface

Get country by name.

getCountryByName(string $p_countryName) : \CustomerCountryInterface

Arguments

$p_countryName

string

Response

\CustomerCountryInterface

Method to get a country with a given name and country

getCountryZoneByNameAndCountry(\CustomerCountryZoneNameInterface|string $p_zoneName, \CustomerCountryInterface $customerCountry) : \CustomerCountryZoneInterface

Arguments

$customerCountry

\CustomerCountryInterface

Response

\CustomerCountryZoneInterface

Returns the country zone by the given zone code and country.

getCountryZoneByZoneCodeAndCountry(\CustomerCountryZoneIsoCode $zoneCode, \CustomerCountryInterface $country) : \CustomerCountryZoneInterface

An error will be raised if no results are found.

Arguments

$zoneCode

\CustomerCountryZoneIsoCode

Zone code of expected country zone.

$country

\CustomerCountryInterface

Country of zone.

Response

\CustomerCountryZoneInterface

Country zone model.

Returns the country zone by the given zone code and country id.

getCountryZoneByZoneCodeAndCountryId(\CustomerCountryZoneIsoCode $zoneCode, \IdType $countryId) : \CustomerCountryZoneInterface

An error will be raised if no results are found.

Arguments

$zoneCode

\CustomerCountryZoneIsoCode

Zone code of expected country zone.

$countryId

\IdType

Country id of zone.

Response

\CustomerCountryZoneInterface

Country zone model.

This method will return a new CustomerCountryZone object representing an unknown country zone.

getUnknownCountryZoneByName(string $p_zoneName) : \CustomerCountryZone

Arguments

$p_zoneName

string

Response

\CustomerCountryZone

This method returns whether the specified country, necessary, needs a state.

isStateMandatory(\IdType $countryId) : boolean

Arguments

$countryId

\IdType

Response

boolean