io.sphere.sdk.shippingmethods.ZoneRate Maven / Gradle / Ivy
package io.sphere.sdk.shippingmethods;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.models.Referenceable;
import io.sphere.sdk.zones.Zone;
import java.util.List;
public class ZoneRate extends Base {
private final Reference zone;
private final List shippingRates;
@JsonCreator
private ZoneRate(final Reference zone, final List shippingRates) {
this.zone = zone;
this.shippingRates = shippingRates;
}
@JsonIgnore
public static ZoneRate of(final Referenceable zone, final List shippingRates) {
return new ZoneRate(zone.toReference(), shippingRates);
}
public Reference getZone() {
return zone;
}
public List getShippingRates() {
return shippingRates;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy