com.commercetools.sunrise.framework.hooks.ctpactions.CartUpdatedActionHook Maven / Gradle / Ivy
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);
}
}