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

io.sphere.sdk.shippingmethods.commands.updateactions.RemoveShippingRate Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.shippingmethods.commands.updateactions;

import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.models.Referenceable;
import io.sphere.sdk.shippingmethods.ShippingMethod;
import io.sphere.sdk.shippingmethods.ShippingRate;
import io.sphere.sdk.zones.Zone;

/**
 * Removes a shipping rate.
 *
 * {@doc.gen intro}
 *
 * {@include.example io.sphere.sdk.shippingmethods.commands.ShippingMethodUpdateCommandTest#workingWithZones()}
 */
public class RemoveShippingRate extends UpdateActionImpl {
    private final Reference zone;
    private final ShippingRate shippingRate;

    private RemoveShippingRate(final ShippingRate shippingRate, final Reference zone) {
        super("removeShippingRate");
        this.shippingRate = shippingRate;
        this.zone = zone;
    }

    public ShippingRate getShippingRate() {
        return shippingRate;
    }

    public Reference getZone() {
        return zone;
    }

    public static RemoveShippingRate of(final ShippingRate shippingRate, final Referenceable zone) {
        return new RemoveShippingRate(shippingRate, zone.toReference());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy