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

io.sphere.sdk.orders.commands.updateactions.ImportCustomLineItemState Maven / Gradle / Ivy

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

import io.sphere.sdk.carts.ItemState;
import io.sphere.sdk.carts.CustomLineItem;
import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.orders.Order;

import java.util.Set;

/**
 * These import of states does not follow any predefined rules and should be only used if no transitions are defined.
 *
 * {@doc.gen intro}
 *
 * {@include.example io.sphere.sdk.orders.commands.OrderUpdateCommandTest#importCustomLineItemState()}
 */
public class ImportCustomLineItemState extends UpdateActionImpl {
    private final String customLineItemId;
    private final Set state;

    private ImportCustomLineItemState(final String customLineItemId, final Set state) {
        super("importCustomLineItemState");
        this.customLineItemId = customLineItemId;
        this.state = state;
    }

    public String getCustomLineItemId() {
        return customLineItemId;
    }

    public Set getState() {
        return state;
    }

    public static ImportCustomLineItemState of(final CustomLineItem CustomLineItem, final Set itemState) {
        return of(CustomLineItem.getId(), itemState);
    }

    public static ImportCustomLineItemState of(final String CustomLineItemId, final Set itemState) {
        return new ImportCustomLineItemState(CustomLineItemId, itemState);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy