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

io.sphere.sdk.orders.commands.OrderFromCartCreateCommand Maven / Gradle / Ivy

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

import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.commands.CreateCommandImpl;
import io.sphere.sdk.models.Versioned;
import io.sphere.sdk.orders.Order;
import io.sphere.sdk.orders.OrderFromCartDraft;

public class OrderFromCartCreateCommand extends CreateCommandImpl {
    private OrderFromCartCreateCommand(final OrderFromCartDraft draft) {
        super(draft, OrdersEndpoint.ENDPOINT);
    }

    public static OrderFromCartCreateCommand of(final OrderFromCartDraft draft) {
        return new OrderFromCartCreateCommand(draft);
    }

    public static OrderFromCartCreateCommand of(final Versioned cart) {
        return new OrderFromCartCreateCommand(OrderFromCartDraft.of(cart));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy