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

io.sphere.sdk.products.ProductImpl Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonCreator;

import java.time.Instant;
import java.util.Optional;
import io.sphere.sdk.models.DefaultModelImpl;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.producttypes.ProductType;
import io.sphere.sdk.taxcategories.TaxCategory;

class ProductImpl extends DefaultModelImpl implements Product {
    private final Reference productType;
    private final ProductCatalogData masterData;
    private final Optional> taxCategory;

    @JsonCreator
    ProductImpl(final String id, final long version, final Instant createdAt, final Instant lastModifiedAt,
                final Reference productType, final ProductCatalogData masterData, final Optional> taxCategory) {
        super(id, version, createdAt, lastModifiedAt);
        this.productType = productType;
        this.masterData = masterData;
        this.taxCategory = taxCategory;
    }

    @Override
    public Reference getProductType() {
        return productType;
    }

    @Override
    public ProductCatalogData getMasterData() {
        return masterData;
    }

    @Override
    public Optional> getTaxCategory() {
        return taxCategory;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy