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

io.sphere.sdk.orders.OrderShippingInfo Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.carts.CartShippingInfo;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.shippingmethods.ShippingMethod;
import io.sphere.sdk.shippingmethods.ShippingRate;
import io.sphere.sdk.taxcategories.TaxCategory;
import io.sphere.sdk.taxcategories.TaxRate;

import javax.money.MonetaryAmount;
import java.util.List;

public class OrderShippingInfo extends CartShippingInfo {
    private final List deliveries;

    @JsonCreator
    private OrderShippingInfo(final String shippingMethodName, final MonetaryAmount price, final ShippingRate shippingRate, final TaxRate taxRate, final Reference taxCategory, final Reference shippingMethod, final List deliveries) {
        super(shippingMethodName, price, shippingRate, taxRate, taxCategory, shippingMethod);
        this.deliveries = deliveries;
    }

    public static OrderShippingInfo of(final String shippingMethodName, final MonetaryAmount price, final ShippingRate shippingRate, final TaxRate taxRate, final Reference taxCategory, final Reference shippingMethod, final List deliveries) {
        return new OrderShippingInfo(shippingMethodName, price, shippingRate, taxRate, taxCategory, shippingMethod, deliveries);
    }

    public List getDeliveries() {
        return deliveries;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy