ParkingItemSearchDelegate
public protocol ParkingItemSearchDelegate : AnyObject
Notified of catalog search results
-
Called when the
ParkingItemswere searched successfully- result:
ParkingItemSearchResultfiltered by search query - identifier: A
Hashableidentifying the request that was made. This will be the same identifier you passed to the search catalog call
Declaration
Swift
func parkingItemSearchDidSucceedWith(_ result: ParkingItemSearchResult, identifier: AnyHashable?) - result:
-
Called when there was an error searching the catalog
- error: The
Errorrepresenting the reason for failure. No specific errors to look for here. Best course of action is to just display a generic error message. - identifier: A
Hashableidentifying the request that was made. This will be the same identifier you passed to the search catalog call
Declaration
Swift
func parkingItemSearchDidFailWith(_ error: Error, identifier: AnyHashable?) - error: The
-
previousResult()Default implementationCalled before supplying the searched items. This is your opportunity to return any previous (paged) results you had so the SDK can merge them for you. Default implementation of this method returns nil.
Default Implementation
Declaration
Swift
func previousResult() -> ParkingItemSearchResult?Return Value
Any previous
ParkingItemSearchResultthat corresponds to the sameParkingItemSearchQuery. nil if none -
parkingItemSearchDidReceive(_:Default implementationidentifier: ) Called when the results have been fetched and merged. This method is called on a background thread and gives you the opportunity to substitute any buffering or volitile variables you may be holding. Default implementation of this method is a no-op.
- result: The fetched and merged
ParkingItemSearchResult - identifier: A
Hashableidentifying the request that was made. This will be same identifier you passed to fetch orders call.
Default Implementation
Declaration
Swift
func parkingItemSearchDidReceive(_ result: ParkingItemSearchResult, identifier: AnyHashable?) - result: The fetched and merged
ParkingItemSearchDelegate Protocol Reference