CustomerCountryZoneRepositoryInterface
in
Interface CustomerCountryZoneRepositoryInterface
Tags
Table of Contents
- findById() : CustomerCountryZone|null
- Method to get a country zone by ID if exists else return null
- findByNameAndCountry() : CustomerCountryZone|null
- This method will get the country zone by its name and country if it exists, if not it will return null.
- 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 get all country zones by a country ID if it exists, if not it will return an empty array.
- getById() : CustomerCountryZoneInterface
- Method to get a country zone with a given ID
- getByNameAndCountry() : CustomerCountryZoneInterface
- Method to get a county zone with a given name and country
- getUnknownCountryZoneByName() : CustomerCountryZone
- This method will return a new CustomerCountryZoneName object representing an unknown country zone.
- isStateMandatory() : bool
- This method returns whether the specified country, necessary, needs a state.
Methods
findById()
Method to get a country zone by ID if exists else return null
public
findById(IdType $countryZoneId) : CustomerCountryZone|null
Parameters
- $countryZoneId : IdType
Return values
CustomerCountryZone|null —findByNameAndCountry()
This method will get the country zone by its name and country if it exists, if not it will return null.
public
findByNameAndCountry(CustomerCountryZoneNameInterface $countryZoneName, CustomerCountryInterface $country) : CustomerCountryZone|null
Parameters
- $countryZoneName : CustomerCountryZoneNameInterface
- $country : CustomerCountryInterface
Return values
CustomerCountryZone|null —findCountryZoneByZoneCodeAndCountry()
Finds the country zone by the given zone code and country.
public
findCountryZoneByZoneCodeAndCountry(CustomerCountryZoneIsoCodeInterface $zoneCode, CustomerCountryInterface $country) : CustomerCountryZoneInterface|null
Null will be returned if no results are found.
Parameters
- $zoneCode : CustomerCountryZoneIsoCodeInterface
-
Zone code of expected country zone.
- $country : CustomerCountryInterface
-
Country of zone.
Return values
CustomerCountryZoneInterface|null —Country zone model.
findCountryZoneByZoneCodeAndCountryId()
Returns the country zone by the given zone code and country id.
public
findCountryZoneByZoneCodeAndCountryId(CustomerCountryZoneIsoCodeInterface $zoneCode, IdType $countryId) : CustomerCountryZoneInterface
Null will be returned if no results are found.
Parameters
- $zoneCode : CustomerCountryZoneIsoCodeInterface
-
Zone code of expected country zone.
- $countryId : IdType
-
Country id of zone.
Return values
CustomerCountryZoneInterface —Country zone model.
findCountryZonesByCountryId()
This method will get all country zones by a country ID if it exists, if not it will return an empty array.
public
findCountryZonesByCountryId(IdType $countryId) : array<string|int, mixed>
Parameters
- $countryId : IdType
Return values
array<string|int, mixed> —getById()
Method to get a country zone with a given ID
public
getById(IdType $countryZoneId) : CustomerCountryZoneInterface
Parameters
- $countryZoneId : IdType
Tags
Return values
CustomerCountryZoneInterface —getByNameAndCountry()
Method to get a county zone with a given name and country
public
getByNameAndCountry(CustomerCountryZoneNameInterface $countryZoneName, CustomerCountryInterface $country) : CustomerCountryZoneInterface
Parameters
- $countryZoneName : CustomerCountryZoneNameInterface
- $country : CustomerCountryInterface
Tags
Return values
CustomerCountryZoneInterface —getUnknownCountryZoneByName()
This method will return a new CustomerCountryZoneName object representing an unknown country zone.
public
getUnknownCountryZoneByName(CustomerCountryZoneNameInterface $countryZoneName) : CustomerCountryZone
ID is 0 and ISO code is empty.
Parameters
- $countryZoneName : CustomerCountryZoneNameInterface
Return values
CustomerCountryZone —isStateMandatory()
This method returns whether the specified country, necessary, needs a state.
public
isStateMandatory(IdType $countryId) : bool
Parameters
- $countryId : IdType