All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.shippingmethods.ZoneRate Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
package io.sphere.sdk.shippingmethods;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.annotations.ResourceValue;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.models.Referenceable;
import io.sphere.sdk.zones.Zone;

import java.util.List;

/**
 * Defines shipping rates (prices) for a specific zone.
 *
 * @see ShippingMethod#getZoneRates()
 * @see ShippingMethodDraft#getZoneRates()
 */
@ResourceValue
@JsonDeserialize(as = ZoneRateImpl.class)
public interface ZoneRate {

    Reference getZone();

    List getShippingRates();

    @JsonIgnore
    static ZoneRate of(final Referenceable zone, final List shippingRates) {
        return new ZoneRateImpl(shippingRates, zone.toReference());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy