ProductSearchCriteria

public struct ProductSearchCriteria: QueryItemConvertible

Data transfer object to search for products for product search HTTP request.

  • The keyword used to specify search query.

    Declaration

    Swift

    let keyword: String?
  • Category id used to specify search query.

    Declaration

    Swift

    let categoryId: String?
  • Filter items to be sent through the search query, set using available filters returned by a previous search.

    Declaration

    Swift

    let filterItems: QueryItems?
  • Paging information for the search query.

    Declaration

    Swift

    let pageInformation: PageInformation?
  • Sorting information for the search query.

    Declaration

    Swift

    let sortInformation: SortInformation?
  • Default initializer for a product search data transfer object.

    • Parameters:
      • keyword: The keyword to use.
      • categoryId: Category id to use.
      • filterItems: Filter items to use.
      • sort: Sort type to use.
      • order: Order to use for the sort type.
      • offset: Offset to use for resulting products.
      • limit: Number of products to be returned.

    Declaration

    Swift

    public init(keyword: String? = nil,
                    categoryId: String? = nil,
                    filterItems: QueryItems? = nil,
                    pageInformation: PageInformation? = nil,
                    sortInformation: SortInformation? = nil)

    Parameters

    keyword

    The keyword to use.

    categoryId

    Category id to use.

    filterItems

    Filter items to use.

    sort

    Sort type to use.

    order

    Order to use for the sort type.

    offset

    Offset to use for resulting products.

    limit

    Number of products to be returned.

  • Default initializer for a product search data transfer object.

    • Parameters:
      • keyword: The keyword to use.
      • categoryId: Category id to use.
      • filterItems: Filter items to use.
      • sort: Sort type to use.
      • order: Order to use for the sort type.
      • offset: Offset to use for resulting products.
      • limit: Number of products to be returned.

    Declaration

    Swift

    public func toQueryItems() -> QueryItems

    Return Value

    The query items to pass through the request.