CustomerCountryZoneRepositoryInterface

Extends

Interface CustomerCountryZoneRepositoryInterface

category

System

package

Customer

subpackage

Interfaces

Methods

Method to get a country zone by ID if exists else return null

findById(\IdType $countryZoneId) : \CustomerCountryZone|null

Arguments

$countryZoneId

\IdType

Response

\CustomerCountryZone|null

This method will get the country zone by its name and country if it exists, if not it will return null.

findByNameAndCountry(\CustomerCountryZoneNameInterface $countryZoneName, \CustomerCountryInterface $country) : \CustomerCountryZone|null

Arguments

Response

\CustomerCountryZone|null

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

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

Null will be returned if no results are found.

Arguments

$zoneCode

\CustomerCountryZoneIsoCodeInterface

Zone code of expected country zone.

$country

\CustomerCountryInterface

Country of zone.

Response

\CustomerCountryZoneInterface|null

Country zone model.

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

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

Null will be returned if no results are found.

Arguments

$zoneCode

\CustomerCountryZoneIsoCodeInterface

Zone code of expected country zone.

$countryId

\IdType

Country id of zone.

Response

\CustomerCountryZoneInterface

Country zone model.

This method will get all country zones by a country ID if it exists, if not it will return an empty array.

findCountryZonesByCountryId(\IdType $countryId) : array

Arguments

$countryId

\IdType

Response

array

Method to get a country zone with a given ID

getById(\IdType $countryZoneId) : \CustomerCountryZoneInterface
Throws
\Exception

if country zone not found

Arguments

$countryZoneId

\IdType

Response

\CustomerCountryZoneInterface

Method to get a county zone with a given name and country

getByNameAndCountry(\CustomerCountryZoneNameInterface $countryZoneName, \CustomerCountryInterface $country) : \CustomerCountryZoneInterface
Throws
\Exception

if country zone not found

Arguments

Response

\CustomerCountryZoneInterface

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

getUnknownCountryZoneByName(\CustomerCountryZoneNameInterface $countryZoneName) : \CustomerCountryZone

ID is 0 and ISO code is empty.

Arguments

Response

\CustomerCountryZone

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

isStateMandatory(\IdType $countryId) : boolean

Arguments

$countryId

\IdType

Response

boolean