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

com.commercetools.sunrise.framework.hooks.ctpactions.CustomerSignedInActionHook 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.customers.CustomerSignInResult;
import io.sphere.sdk.expansion.ExpansionPathContainer;

import javax.annotation.Nullable;
import java.util.concurrent.CompletionStage;

public interface CustomerSignedInActionHook extends CtpActionHook {

    CompletionStage onCustomerSignedInAction(final CustomerSignInResult customerSignInResult, @Nullable final ExpansionPathContainer expansionPathContainer);

    static CompletionStage runHook(final HookRunner hookRunner, final CustomerSignInResult customerSignInResult, @Nullable final ExpansionPathContainer expansionPathContainer) {
        return hookRunner.runActionHook(CustomerSignedInActionHook.class, (hook, updatedCustomerSignInResult) -> hook.onCustomerSignedInAction(updatedCustomerSignInResult, expansionPathContainer), customerSignInResult);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy