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

com.commercetools.sunrise.framework.hooks.ctpactions.CartUpdatedActionHook Maven / Gradle / Ivy

There is a newer version: 1.0.0-M10
Show newest version
package com.commercetools.sunrise.framework.hooks.ctpactions;

import com.commercetools.sunrise.framework.hooks.HookRunner;
import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.expansion.ExpansionPathContainer;

import java.util.concurrent.CompletionStage;

public interface CartUpdatedActionHook extends CtpActionHook {

    CompletionStage onCartUpdatedAction(final Cart cart, final ExpansionPathContainer expansionPathContainer);

    static CompletionStage runHook(final HookRunner hookRunner, final Cart cart, final ExpansionPathContainer expansionPathContainer) {
        return hookRunner.runActionHook(CartUpdatedActionHook.class, (hook, updatedCart) -> hook.onCartUpdatedAction(updatedCart, expansionPathContainer), cart);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy