io.sphere.sdk.productdiscounts.ProductDiscountImpl Maven / Gradle / Ivy
package io.sphere.sdk.productdiscounts;
import io.sphere.sdk.models.DefaultModelImpl;
import io.sphere.sdk.models.LocalizedStrings;
import io.sphere.sdk.models.Reference;
import java.time.Instant;
import java.util.List;
import java.util.Optional;
class ProductDiscountImpl extends DefaultModelImpl implements ProductDiscount {
private final LocalizedStrings name;
private final Optional description;
private final ProductDiscountValue value;
private final String predicate;
private final String sortOrder;
private final boolean isActive;
private final List> references;
ProductDiscountImpl(final String id, final long version, final Instant createdAt, final Instant lastModifiedAt,
final LocalizedStrings name, final Optional description,
final ProductDiscountValue value, final String predicate, final String sortOrder,
final boolean isActive, final List> references) {
super(id, version, createdAt, lastModifiedAt);
this.name = name;
this.description = description;
this.value = value;
this.predicate = predicate;
this.sortOrder = sortOrder;
this.isActive = isActive;
this.references = references;
}
public LocalizedStrings getName() {
return name;
}
public Optional getDescription() {
return description;
}
public ProductDiscountValue getValue() {
return value;
}
public String getPredicate() {
return predicate;
}
public String getSortOrder() {
return sortOrder;
}
public boolean isActive() {
return isActive;
}
public List> getReferences() {
return references;
}
@Override
public Reference toReference() {
return Reference.of(ProductDiscount.typeId(), this);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy