io.sphere.sdk.orders.commands.OrderFromCartCreateCommandImpl Maven / Gradle / Ivy
package io.sphere.sdk.orders.commands;
import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.models.Versioned;
import io.sphere.sdk.orders.Order;
import io.sphere.sdk.orders.OrderFromCartDraft;
import io.sphere.sdk.orders.expansion.OrderExpansionModel;
final class OrderFromCartCreateCommandImpl extends MetaModelCreateCommandImpl> implements OrderFromCartCreateCommand {
OrderFromCartCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
super(builder);
}
OrderFromCartCreateCommandImpl(final OrderFromCartDraft draft) {
super(draft, OrderEndpoint.ENDPOINT, OrderExpansionModel.of(), OrderFromCartCreateCommandImpl::new);
}
public static OrderFromCartCreateCommandImpl of(final OrderFromCartDraft draft) {
return new OrderFromCartCreateCommandImpl(draft);
}
public static OrderFromCartCreateCommandImpl of(final Versioned cart) {
return new OrderFromCartCreateCommandImpl(OrderFromCartDraft.of(cart));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy