io.sphere.sdk.cartdiscounts.CartDiscountImpl Maven / Gradle / Ivy
The newest version!
package io.sphere.sdk.cartdiscounts;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.LocalizedString;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.types.CustomFields;
import java.lang.Boolean;
import java.lang.Long;
import java.lang.String;
import java.time.ZonedDateTime;
import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated(
value = "io.sphere.sdk.annotations.processors.generators.ResourceValueImplGenerator",
comments = "Generated from: io.sphere.sdk.cartdiscounts.CartDiscount"
)
final class CartDiscountImpl extends Base implements CartDiscount {
@JsonProperty("isActive")
private Boolean active;
private String cartPredicate;
private ZonedDateTime createdAt;
@Nullable
private CustomFields custom;
@Nullable
private LocalizedString description;
private String id;
@Nullable
private String key;
private ZonedDateTime lastModifiedAt;
private LocalizedString name;
private List> references;
@JsonProperty("requiresDiscountCode")
private Boolean requiringDiscountCode;
private String sortOrder;
private StackingMode stackingMode;
@Nullable
private CartDiscountTarget target;
@Nullable
private ZonedDateTime validFrom;
@Nullable
private ZonedDateTime validUntil;
private CartDiscountValue value;
private Long version;
@JsonCreator
CartDiscountImpl(@JsonProperty("isActive") final Boolean active, final String cartPredicate,
final ZonedDateTime createdAt, @Nullable final CustomFields custom,
@Nullable final LocalizedString description, final String id, @Nullable final String key,
final ZonedDateTime lastModifiedAt, final LocalizedString name,
final List> references,
@JsonProperty("requiresDiscountCode") final Boolean requiringDiscountCode,
final String sortOrder, final StackingMode stackingMode,
@Nullable final CartDiscountTarget target, @Nullable final ZonedDateTime validFrom,
@Nullable final ZonedDateTime validUntil, final CartDiscountValue value, final Long version) {
this.active = active;
this.cartPredicate = cartPredicate;
this.createdAt = createdAt;
this.custom = custom;
this.description = description;
this.id = id;
this.key = key;
this.lastModifiedAt = lastModifiedAt;
this.name = name;
this.references = references;
this.requiringDiscountCode = requiringDiscountCode;
this.sortOrder = sortOrder;
this.stackingMode = stackingMode;
this.target = target;
this.validFrom = validFrom;
this.validUntil = validUntil;
this.value = value;
this.version = version;
}
@JsonProperty("isActive")
public Boolean isActive() {
return active;
}
public String getCartPredicate() {
return cartPredicate;
}
public ZonedDateTime getCreatedAt() {
return createdAt;
}
@Nullable
public CustomFields getCustom() {
return custom;
}
@Nullable
public LocalizedString getDescription() {
return description;
}
public String getId() {
return id;
}
@Nullable
public String getKey() {
return key;
}
public ZonedDateTime getLastModifiedAt() {
return lastModifiedAt;
}
public LocalizedString getName() {
return name;
}
public List> getReferences() {
return references;
}
@JsonProperty("requiresDiscountCode")
public Boolean isRequiringDiscountCode() {
return requiringDiscountCode;
}
public String getSortOrder() {
return sortOrder;
}
public StackingMode getStackingMode() {
return stackingMode;
}
@Nullable
public CartDiscountTarget getTarget() {
return target;
}
@Nullable
public ZonedDateTime getValidFrom() {
return validFrom;
}
@Nullable
public ZonedDateTime getValidUntil() {
return validUntil;
}
public CartDiscountValue getValue() {
return value;
}
public Long getVersion() {
return version;
}
}