Class CustomerCountryZoneRepository

Class CustomerCountryZoneRepository

This class provides basic methods for finding customer country zone data

CustomerCountryZoneRepository implements CustomerCountryZoneRepositoryInterface
Package: Customer\CountryZone
Category: System
Implements: CustomerCountryZoneRepositoryInterface
Located at Services/Core/Country/CustomerCountryZoneRepository.inc.php

Methods summary

public __construct( CustomerCountryZoneReaderInterface $customerCountryZoneReader, AbstractCustomerFactory $customerFactory )

Constructor of the class CustomerCountryZoneRepository

public getById( IdType $countryZoneId ) : CustomerCountryZoneInterface
public getByNameAndCountry( CustomerCountryZoneNameInterface $countryZoneName, CustomerCountryInterface $country ) : CustomerCountryZoneInterface
public getUnknownCountryZoneByName( CustomerCountryZoneNameInterface $countryZoneName ) : CustomerCountryZone

This method will return a new CustomerCountryZone object representing an unknown country zone. ID is 0 and ISO code is empty.

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

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

public findById( IdType $countryZoneId ) : CustomerCountryZone|null

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

public findCountryZonesByCountryId( IdType $countryId ) : array

This method will return an array of country zones found by the country ID.

public isStateMandatory( IdType $countryId ) : boolean

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

public findCountryZoneByZoneCodeAndCountry( CustomerCountryZoneIsoCodeInterface $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( CustomerCountryZoneIsoCodeInterface $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.

Properties summary