WishlistResult

public struct WishlistResult : Decodable

A result model representing the CatalogItemss that were fetched for a given WishlistQuery

  • The total number of orders matching the given query

    Declaration

    Swift

    public private(set) var total: Int
  • An Array<CatalogItem> representing the results of the query

    Declaration

    Swift

    public private(set) var items: [Int : Product & CatalogItem]
  • The fromDate part of the WishlistQuerythat matches the result

    Declaration

    Swift

    public let fromDate: Date?
  • The toDate part of the WishlistQuery that matches the result

    Declaration

    Swift

    public let toDate: Date
  • Determines if the given WishlistResult is result-equivalent to self

    • to: The WishlistResult to compare against

    Declaration

    Swift

    public func isResultEquivalent(to: WishlistResult) -> Bool

    Return Value

    A Bool indicating result-equivalency

  • Merges self with the given WishlistResult.

    • result: The WishlistResult to merge with

    Declaration

    Swift

    public func merge(_ result: WishlistResult) -> WishlistResult?

    Return Value

    A merged WishlistResult if the two WishlistResults are result-equivalent; nil otherwise.

  • Undocumented

    Declaration

    Swift

    @discardableResult
    public mutating func remove(_ item: Product) -> Bool
  • Declaration

    Swift

    public init(from decoder: Decoder) throws