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

io.sphere.client.shop.model.OrderUpdate Maven / Gradle / Ivy

There is a newer version: 0.72.1
Show newest version
package io.sphere.client.shop.model;

import io.sphere.internal.command.CartCommands;
import io.sphere.internal.command.OrderCommands;
import io.sphere.internal.command.Update;
import io.sphere.internal.command.UpdateAction;

import java.util.List;

public class OrderUpdate extends Update {
    public OrderUpdate setPaymentState(PaymentState paymentState) {
        add(new OrderCommands.UpdatePaymentState(paymentState));
        return this;
    }

    public OrderUpdate setShipmentState(ShipmentState shipmentState) {
        add(new OrderCommands.UpdateShipmentState(shipmentState));
        return this;
    }

    /** Sets the tracking data, some info about the delivery (like a DHL tracking number) which is useful to keep an eye
     * on your delivery, view its status etc.*/
    public OrderUpdate addTrackingData(final TrackingData ... trackingData) {
        for (final TrackingData item : trackingData) {
            add(new OrderCommands.AddTrackingData(item));
        }
        return this;
    }

    /** Sets the tracking data, some info about the delivery (like a DHL tracking number) which is useful to keep an eye
     * on your delivery, view its status etc.*/
    public OrderUpdate addTrackingData(final List trackingData) {
        for (final TrackingData item : trackingData) {
            add(new OrderCommands.AddTrackingData(item));
        }
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy