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: 1.0.0-M26
Show newest version
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