io.sphere.sdk.cartdiscounts.CartDiscount Maven / Gradle / Ivy
package io.sphere.sdk.cartdiscounts;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.models.Resource;
import io.sphere.sdk.models.LocalizedString;
import io.sphere.sdk.models.Reference;
import javax.annotation.Nullable;
import java.time.ZonedDateTime;
import java.util.List;
@JsonDeserialize(as=CartDiscountImpl.class)
public interface CartDiscount extends Resource {
String getCartPredicate();
@Nullable
LocalizedString getDescription();
Boolean isActive();
LocalizedString getName();
List> getReferences();
Boolean isRequiringDiscountCode();
String getSortOrder();
CartDiscountTarget getTarget();
@Nullable
ZonedDateTime getValidFrom();
@Nullable
ZonedDateTime getValidUntil();
CartDiscountValue getValue();
static String referenceTypeId() {
return "cart-discount";
}
/**
*
* @deprecated use {@link #referenceTypeId()} instead
* @return referenceTypeId
*/
@Deprecated
static String typeId() {
return "cart-discount";
}
@Override
default Reference toReference() {
return Reference.of(referenceTypeId(), getId(), this);
}
static TypeReference typeReference() {
return new TypeReference() {
@Override
public String toString() {
return "TypeReference";
}
};
}
static Reference referenceOfId(final String id) {
return Reference.of(referenceTypeId(), id);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy