phpDocumentor

CountryServiceInterface

Interface CountryServiceInterface

Tags
category

System

subpackage

Interfaces

Table of Contents

countryHasCountryZones()  : bool
Method to check if a country has country zones
countryZoneExistsInCountry()  : bool
Method to check if a country zone exists in a country
findCountryByIso2()  : CustomerCountryInterface
Find country by iso2 code.
findCountryByName()  : CustomerCountryInterface
Find country by name.
findCountryZoneByNameAndCountry()  : CustomerCountryZoneInterface|null
This method returns a CustomerCountryZone object if found. Otherwise null will be returned.
findCountryZoneByZoneCodeAndCountry()  : CustomerCountryZoneInterface|null
Finds the country zone by the given zone code and country.
findCountryZoneByZoneCodeAndCountryId()  : CustomerCountryZoneInterface
Returns the country zone by the given zone code and country id.
findCountryZonesByCountryId()  : array<string|int, mixed>
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
getCountries()  : CustomerCountryCollection
Method to get all countries
getCountryById()  : CustomerCountryInterface
Method to get a country with a given id
getCountryByIso2()  : CustomerCountryInterface
Get country by iso2 code.
getCountryByName()  : CustomerCountryInterface
Get country by name.
getCountryZoneByNameAndCountry()  : CustomerCountryZoneInterface
Method to get a country with a given name and country
getCountryZoneByZoneCodeAndCountry()  : CustomerCountryZoneInterface
Returns the country zone by the given zone code and country.
getCountryZoneByZoneCodeAndCountryId()  : CustomerCountryZoneInterface
Returns the country zone by the given zone code and country id.
getUnknownCountryZoneByName()  : CustomerCountryZone
This method will return a new CustomerCountryZone object representing an unknown country zone.
isStateMandatory()  : bool
This method returns whether the specified country, necessary, needs a state.

Methods

findCountryZoneByZoneCodeAndCountry()

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

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

Null will be returned if no results are found.

Parameters
$zoneCode : CustomerCountryZoneIsoCode

Zone code of expected country zone.

$country : CustomerCountryInterface

Country of zone.

Return values
CustomerCountryZoneInterface|null

Country zone model, if found.

findCountryZoneByZoneCodeAndCountryId()

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

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

Null will be returned if no results are found.

Parameters
$zoneCode : CustomerCountryZoneIsoCode

Zone code of expected country zone.

$countryId : IdType

Country id of zone.

Return values
CustomerCountryZoneInterface

Country zone model, if found.

findCountryZonesByCountryId()

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

public findCountryZonesByCountryId(IdType $countryId) : array<string|int, mixed>
Parameters
$countryId : IdType
Return values
array<string|int, mixed>

of CustomerCountryZone objects

getCountryZoneByZoneCodeAndCountry()

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

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

An error will be raised if no results are found.

Parameters
$zoneCode : CustomerCountryZoneIsoCode

Zone code of expected country zone.

$country : CustomerCountryInterface

Country of zone.

Return values
CustomerCountryZoneInterface

Country zone model.

getCountryZoneByZoneCodeAndCountryId()

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

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

An error will be raised if no results are found.

Parameters
$zoneCode : CustomerCountryZoneIsoCode

Zone code of expected country zone.

$countryId : IdType

Country id of zone.

Return values
CustomerCountryZoneInterface

Country zone model.

isStateMandatory()

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

public isStateMandatory(IdType $countryId) : bool
Parameters
$countryId : IdType
Return values
bool

Search results