All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.products.commands.ProductCreateCommandImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.products.commands;

import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.products.Product;
import io.sphere.sdk.products.ProductDraft;
import io.sphere.sdk.products.expansion.ProductExpansionModel;

/**
 Creates a product.

 

A {@link Product} must belong to a {@link io.sphere.sdk.producttypes.ProductType}, so you need to {@link io.sphere.sdk.producttypes.commands.ProductTypeCreateCommand create a product type} first if not already done.

Example usage executing the command: {@include.example io.sphere.sdk.products.CreateProductExamples#createWithClient()} Create a {@link ProductDraft} instance: {@include.example io.sphere.sdk.suppliers.SimpleCottonTShirtProductDraftSupplier} */ final class ProductCreateCommandImpl extends MetaModelCreateCommandImpl> implements ProductCreateCommand { ProductCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) { super(builder); } ProductCreateCommandImpl(final ProductDraft body) { super(body, ProductEndpoint.ENDPOINT, ProductExpansionModel.of(), ProductCreateCommandImpl::new); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy