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

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

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

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.models.Referenceable;
import io.sphere.sdk.taxcategories.TaxCategory;

import javax.annotation.Nullable;
import java.util.List;

@JsonDeserialize(as = ShippingMethodDraftImpl.class)
public interface ShippingMethodDraft {
    String getName();

    @Nullable
    String getDescription();

    Reference getTaxCategory();

    List getZoneRates();

    Boolean isDefault();


    static ShippingMethodDraft of(final String name, @Nullable final String description, final Referenceable taxCategory, final List zoneRates) {
        return of(name, description, taxCategory, zoneRates, false);
    }

    static ShippingMethodDraft of(final String name, @Nullable final String description, final Referenceable taxCategory, final List zoneRates, final boolean isDefault) {
        return new ShippingMethodDraftImpl(name, description, taxCategory.toReference(), zoneRates, isDefault);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy