本文整理匯總了Java中io.sphere.sdk.products.search.PriceSelection類的典型用法代碼示例。如果您正苦於以下問題:Java PriceSelection類的具體用法?Java PriceSelection怎麽用?Java PriceSelection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PriceSelection類屬於io.sphere.sdk.products.search包,在下文中一共展示了PriceSelection類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: providePriceSelection
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Provides
@RequestScoped
public PriceSelection providePriceSelection(final CurrencyUnit currency, final CountryCode country,
final CustomerInSession customerInSession) {
return PriceSelection.of(currency)
.withPriceCountry(country)
.withPriceCustomerGroupId(customerInSession.findCustomerGroupId().orElse(null));
}
示例2: LastViewedProductsViewerControllerComponent
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Inject
public LastViewedProductsViewerControllerComponent(final SphereClient sphereClient,
final PriceSelection priceSelection,
final ProductListViewModelFactory productListViewModelFactory) {
this.sphereClient = sphereClient;
this.priceSelection = priceSelection;
this.productListViewModelFactory = productListViewModelFactory;
}
開發者ID:commercetools,項目名稱:commercetools-sunrise-java-training,代碼行數:9,代碼來源:LastViewedProductsViewerControllerComponent.java
示例3: fetchProjectionWithPriceSelection
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
private ProductProjection fetchProjectionWithPriceSelection(final BlockingSphereClient sphereClient, final ProductProjection productProjection, final Channel channel) {
final CountryCode country = channel.getAddress().getCountry();
final CurrencyUnit currency = Monetary.getCurrency(country.toLocale());
final PriceSelection priceSelection = PriceSelection.of(currency).withPriceCountry(country);
final ProductProjectionQuery productProjectionQuery = ProductProjectionQuery.ofCurrent().withPredicates(m -> m.id().is(productProjection.getId())).withPriceSelection(priceSelection);
final PagedQueryResult<ProductProjection> result = sphereClient.executeBlocking(productProjectionQuery);
return result.getResults().get(0);
}
開發者ID:commercetools,項目名稱:commercetools-sunrise-data,代碼行數:9,代碼來源:AvailabilityPricesImportJobConfiguration.java
示例4: ProductFinderBySlug
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Inject
protected ProductFinderBySlug(final SphereClient sphereClient, final HookRunner hookRunner, final Locale locale,
final PriceSelection priceSelection) {
super(sphereClient, hookRunner);
this.locale = locale;
this.priceSelection = priceSelection;
}
示例5: ProductFinderById
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Inject
protected ProductFinderById(final SphereClient sphereClient, final HookRunner hookRunner, final PriceSelection priceSelection) {
super(sphereClient, hookRunner);
this.priceSelection = priceSelection;
}
示例6: ProductListFinderByCategory
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Inject
protected ProductListFinderByCategory(final SphereClient sphereClient, final HookRunner hookRunner, final PriceSelection priceSelection) {
super(sphereClient, hookRunner);
this.priceSelection = priceSelection;
}
示例7: ProductListFinderByCategoryWithMatchingVariants
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Inject
ProductListFinderByCategoryWithMatchingVariants(final SphereClient sphereClient, final HookRunner hookRunner,
final PriceSelection priceSelection) {
super(sphereClient, hookRunner, priceSelection);
}
開發者ID:commercetools,項目名稱:commercetools-sunrise-java,代碼行數:6,代碼來源:ProductListFinderByCategoryWithMatchingVariants.java
示例8: DefaultProductRecommender
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
@Inject
protected DefaultProductRecommender(final SphereClient sphereClient, final PriceSelection priceSelection) {
this.sphereClient = sphereClient;
this.priceSelection = priceSelection;
}
示例9: productRecommendation
import io.sphere.sdk.products.search.PriceSelection; //導入依賴的package包/類
private DefaultProductRecommender productRecommendation(final SphereClient sphereClient) {
final PriceSelection priceSelection = PriceSelection.of(Monetary.getCurrency("EUR"));
return new DefaultProductRecommender(sphereClient, priceSelection);
}