Tabnine Logo
io.sphere.sdk.products
Code IndexAdd Tabnine to your IDE (free)

How to use io.sphere.sdk.products

Best Java code snippets using io.sphere.sdk.products (Showing top 20 results out of 315)

origin: io.sphere.sdk.jvm/sphere-models

public static PriceDraftDsl of(final Price template) {
  return PriceDraftBuilder.of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .validFrom(template.getValidFrom())
      .validUntil(template.getValidUntil())
      .custom(customFieldsDraftOrNull(template))
      .build();
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

 /**
  * Creates a new object initialized with the fields of the template parameter.
  *
  * @param template the template
  * @return a new object initialized from the template
  */
 public static ProductVariantDraftBuilder of(final ProductVariant template) {
  return new ProductVariantDraftBuilder(copyAssets(template.getAssets()), copyAttributes(template.getAttributes()), template.getImages(), template.getKey(), copyPrices(template.getPrices()), template.getSku());
 }
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

/**
 * Creates a new object initialized with the fields of the template parameter.
 *
 * @param template the template
 * @return a new object initialized from the template
 */
public static ProductVariantDraftBuilder of(final ProductVariantDraft template) {
 return new ProductVariantDraftBuilder(template.getAssets(), template.getAttributes(), template.getImages(), template.getKey(), template.getPrices(), template.getSku());
}
origin: io.sphere.sdk.jvm/sphere-models

public static PriceBuilder of(final Price template) {
  return of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .discounted(template.getDiscounted())
      .validFrom(template.getValidFrom())
      .validUntil(template.getValidUntil())
      .id(template.getId());
}
origin: io.sphere.sdk.jvm/products

public static PriceBuilder of(final Price template) {
  return of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .discounted(template.getDiscounted());
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

 /**
  * Creates a new object initialized with the fields of the template parameter.
  *
  * @param template the template
  * @return a new object initialized from the template
  */
 public static PriceBuilder of(final Price template) {
  return new PriceBuilder(template.getChannel(), template.getCountry(), template.getCustom(), template.getCustomerGroup(), template.getDiscounted(), template.getId(), template.getTiers(), template.getValidFrom(), template.getValidUntil(), template.getValue());
 }
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

public static PriceDraftBuilder of(final PriceDraft template) {
  return of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .validFrom(template.getValidFrom())
      .validUntil(template.getValidUntil())
      .custom(template.getCustom());
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

 /**
  * Creates a new object initialized with the fields of the template parameter.
  *
  * @param template the template
  * @return a new object initialized from the template
  */
 public static ProductDraftBuilder of(final ProductDraft template) {
  return new ProductDraftBuilder(template.getCategories(), template.getCategoryOrderHints(), template.getDescription(), template.getKey(), template.getMasterVariant(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getProductType(), template.isPublish(), template.getSearchKeywords(), template.getSlug(), template.getState(), template.getTaxCategory(), template.getVariants());
 }
}
origin: commercetools/commercetools-jvm-sdk

  private String getSku(final Product product) {
    return product.getMasterData().getStaged().getMasterVariant().getSku();
  }
}
origin: commercetools/commercetools-jvm-sdk

  private Attribute attribute(final String attributeName) {
    return product.getMasterData().getStaged().getMasterVariant().getAttribute(attributeName);
  }
}
origin: commercetools/commercetools-jvm-sdk

  private Optional<LocalizedEnumValue> extractAttribute(final Product product, final NamedAttributeAccess<LocalizedEnumValue> namesAccess) {
    return product.getMasterData().getStaged().getMasterVariant().findAttribute(namesAccess);
  }
}
origin: io.sphere.sdk.jvm/products

  @Override
  public boolean isPublished() {
    return product.getMasterData().isPublished();
  }
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

ProductToProductProjectionWrapper(final Product product, final ProductProjectionType productProjectionType) {
  this.product = product;
  this.productData = product.getMasterData().get(productProjectionType);
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

 /**
  * Creates a new object initialized with the fields of the template parameter.
  *
  * @param template the template
  * @return a new object initialized from the template
  */
 public static ProductVariantDraftDsl of(final ProductVariantDraft template) {
  return new ProductVariantDraftDsl(template.getAssets(), template.getAttributes(), template.getImages(), template.getKey(), template.getPrices(), template.getSku());
 }
}
origin: commercetools/commercetools-jvm-sdk

  @Override
  public boolean matches(final Price value) {
    return PriceDraft.of(value).equals(draft);
  }
}.describedAs("like %s", draft);
origin: com.commercetools.sdk.jvm.core/commercetools-models

 /**
  * Creates a new object initialized with the fields of the template parameter.
  *
  * @param template the template
  * @return a new object initialized from the template
  */
 public static PriceTierBuilder of(final PriceTier template) {
  return new PriceTierBuilder(template.getMinimumQuantity(), template.getValue());
 }
}
origin: io.sphere.sdk.jvm/models

public static PriceBuilder of(final Price template) {
  return of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .discounted(template.getDiscounted());
}
origin: io.sphere.sdk.jvm/sphere-models

public static PriceDraftBuilder of(final PriceDraft template) {
  return of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .validFrom(template.getValidFrom())
      .validUntil(template.getValidUntil())
      .custom(template.getCustom());
}
origin: com.commercetools.sdk.jvm.core/commercetools-models

 /**
  * Creates a new object initialized with the fields of the template parameter.
  *
  * @param template the template
  * @return a new object initialized from the template
  */
 public static ProductDraftDsl of(final ProductDraft template) {
  return new ProductDraftDsl(template.getCategories(), template.getCategoryOrderHints(), template.getDescription(), template.getKey(), template.getMasterVariant(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getProductType(), template.isPublish(), template.getSearchKeywords(), template.getSlug(), template.getState(), template.getTaxCategory(), template.getVariants());
 }
}
origin: commercetools/commercetools-jvm-sdk

public static PriceDraftBuilder of(final PriceDraft template) {
  return of(template.getValue())
      .country(template.getCountry())
      .customerGroup(template.getCustomerGroup())
      .channel(template.getChannel())
      .validFrom(template.getValidFrom())
      .validUntil(template.getValidUntil())
      .custom(template.getCustom());
}
io.sphere.sdk.products

Most used classes

  • ProductProjection
  • Price
    Amount that must be paid when buying goods.A Price can have io.sphere.sdk.types.Custom. For constru
  • ProductDraftBuilder
  • ProductVariant
  • ProductVariantDraftBuilder
  • ProductProjectionQueryModel,
  • Product,
  • ProductCatalogData,
  • ProductData,
  • AddPrice,
  • AddToCategory,
  • ChangeName,
  • ChangePrice,
  • ChangeSlug,
  • Publish,
  • RemovePrice,
  • SetDescription,
  • SetSku,
  • SetTaxCategory
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