Tabnine Logo
ProductVariantSortSearchModel.price
Code IndexAdd Tabnine to your IDE (free)

How to use
price
method
in
io.sphere.sdk.products.search.ProductVariantSortSearchModel

Best Java code snippets using io.sphere.sdk.products.search.ProductVariantSortSearchModel.price (Showing top 2 results out of 315)

origin: commercetools/commercetools-jvm-sdk

@Test
public void canAccessPriceAmount() throws Exception {
  assertThat(FACET_MODEL.allVariants().price().centAmount().allTerms().expression()).isEqualTo("variants.price.centAmount");
  assertThat(FILTER_MODEL.allVariants().price().centAmount().is(1000L)).extracting(expression()).containsExactly("variants.price.centAmount:1000");
  assertThat(SORT_MODEL.allVariants().price().descWithMinValue().expression()).isEqualTo("price desc.min");
}
origin: com.commercetools.sunrise/common

/**
 * Gets the products belonging to the given categories, up to {@code numProducts}, most expensive products first.
 * @param categoryIds the category IDs to get products from
 * @param numProducts the number of products the returned set should contain
 * @return the products related to these categories
 */
private CompletionStage<Set<ProductProjection>> productsFromCategoryIds(final Iterable<String> categoryIds, final int numProducts) {
  final ProductProjectionSearch request = ProductProjectionSearch.ofCurrent()
      .withLimit(numProducts)
      .withQueryFilters(product -> product.categories().id().containsAny(categoryIds))
      .withSort(product -> product.allVariants().price().desc())
      .withPriceSelection(PriceUtils.createPriceSelection(userContext));
  return sphereClient.execute(request)
      .whenCompleteAsync((result, t) -> logProductRequest(LOGGER, request, result), HttpExecution.defaultContext())
      .thenApply(SunriseProductRecommendation::resultToProductSet);
}
io.sphere.sdk.products.searchProductVariantSortSearchModelprice

Popular methods of ProductVariantSortSearchModel

  • <init>
  • searchModel
  • attribute
  • availability
  • scopedPrice
  • scopedPriceDiscounted
  • sku

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ImageIO (javax.imageio)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now