WishlistFetchDelegate

public protocol WishlistFetchDelegate : AnyObject

Notified of the WishlistResult fetch

  • Called when the results have successfully been fetched

    • result: The WishlistResult that was fetched and merged
    • identifier: A Hashable identifying the request that was made. This will be same identifier you passed to fetch wishlist call.

    Declaration

    Swift

    func wishlistFetchDidSucceedWith(_ result: WishlistResult, identifier: AnyHashable?)
  • Called when there was an error fetching the results

    • error: The Error that caused the issue
    • identifier: A Hashable identifying the request that was made. This will be same identifier you passed to fetch wishlist call.

    Declaration

    Swift

    func wishlistFetchDidFailWith(_ error: Error, identifier: AnyHashable?)
  • previousResult() Default implementation

    Called before supplying the fetched results. 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() -> WishlistResult?

    Return Value

    Any previous WishlistResult that corresponds to the same WishlistQuery. nil if none

  • 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 WishlistResult
    • identifier: A Hashable identifying the request that was made. This will be same identifier you passed to fetch wishlist call.

    Default Implementation

    Declaration

    Swift

    func wishlistFetchDidReceive(_ result: WishlistResult, identifier: AnyHashable?)