io.sphere.sdk.discountcodes.DiscountCodeInfo Maven / Gradle / Ivy
package io.sphere.sdk.discountcodes;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.models.Referenceable;
public class DiscountCodeInfo extends Base {
private final Reference discountCode;
private final DiscountCodeState state;
@JsonCreator
private DiscountCodeInfo(final Reference discountCode, final DiscountCodeState state) {
this.discountCode = discountCode;
this.state = state;
}
public Reference getDiscountCode() {
return discountCode;
}
public DiscountCodeState getState() {
return state;
}
public static DiscountCodeInfo of(final Referenceable discountCode, final DiscountCodeState state) {
return new DiscountCodeInfo(discountCode.toReference(), state);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy