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

com.commercetools.sunrise.hooks.actions.CartLoadedActionHook Maven / Gradle / Ivy

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

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

import java.util.concurrent.CompletionStage;

public interface CartLoadedActionHook extends ActionHook {

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy