Interface CountryServiceInterface

Interface CountryServiceInterface

Direct known implementers

CountryService

Methods summary

public getCountryById( IdType $id ) : CustomerCountryInterface

Method to get a country with a given id

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

Method to get a country with a given name and country

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

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

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

Method to check if a country zone exists in a country

public countryHasCountryZones( CustomerCountryInterface $customerCountry ) : boolean

Method to check if a country has country zones

public getUnknownCountryZoneByName( string $p_zoneName ) : CustomerCountryZone

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

public findCountryZonesByCountryId( IdType $countryId ) : array

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 getCountryByName( string $p_countryName ) : CustomerCountryInterface

Get country by name.

public findCountryByName( string $p_countryName ) : CustomerCountryInterface

Find country by name.

public getCountryByIso2( string $p_countryIso2 ) : CustomerCountryInterface

Get country by iso2 code.

public findCountryByIso2( string $p_countryIso2 ) : CustomerCountryInterface

Find country by iso2 code.

public isStateMandatory( IdType $countryId ) : boolean

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

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

Returns the country zone by the given zone code and country. An error will be raised if no results are found.

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

Returns the country zone by the given zone code and country id. An error will be raised if no results are found.

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

Finds the country zone by the given zone code and country. Null will be returned if no results are found.

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

Returns the country zone by the given zone code and country id. Null will be returned if no results are found.