Interface ActionComponentProvider
-
- All Implemented Interfaces:
-
com.adyen.checkout.components.core.internal.provider.ComponentProvider
public interface ActionComponentProvider<ComponentT extends ActionComponent, ConfigurationT extends Configuration, DelegateT extends ActionDelegate> implements ComponentProvider<ComponentT>
-
-
Method Summary
-
-
Method Detail
-
get
ComponentT get(Fragment fragment, CheckoutConfiguration checkoutConfiguration, ActionComponentCallback callback, String key)
Get an ActionComponent.
- Parameters:
fragment- The Fragment to associate the lifecycle.checkoutConfiguration- The CheckoutConfiguration.callback- The callback to handle events from the ActionComponent.key- The key to use to identify the ActionComponent.- Returns:
The Component
-
get
ComponentT get(ComponentActivity activity, CheckoutConfiguration checkoutConfiguration, ActionComponentCallback callback, String key)
Get an ActionComponent.
- Parameters:
activity- The Activity to associate the lifecycle.checkoutConfiguration- The CheckoutConfiguration.callback- The callback to handle events from the ActionComponent.key- The key to use to identify the ActionComponent.- Returns:
The Component
-
get
abstract ComponentT get(SavedStateRegistryOwner savedStateRegistryOwner, ViewModelStoreOwner viewModelStoreOwner, LifecycleOwner lifecycleOwner, Application application, CheckoutConfiguration checkoutConfiguration, ActionComponentCallback callback, String key)
Get an ActionComponent.
- Parameters:
savedStateRegistryOwner- The owner of the SavedStateRegistry, normally an Activity or Fragment.viewModelStoreOwner- A scope that owns ViewModelStore, normally an Activity or Fragment.lifecycleOwner- The lifecycle owner, normally an Activity or Fragment.application- Your main application class.checkoutConfiguration- The CheckoutConfiguration.callback- The callback to handle events from the ActionComponent.key- The key to use to identify the ActionComponent.- Returns:
The Component
-
get
ComponentT get(Fragment fragment, ConfigurationT configuration, ActionComponentCallback callback, String key)
Get an ActionComponent.
- Parameters:
fragment- The Fragment to associate the lifecycle.configuration- The Configuration of the component.callback- The callback to handle events from the ActionComponent.key- The key to use to identify the ActionComponent.- Returns:
The Component
-
get
ComponentT get(ComponentActivity activity, ConfigurationT configuration, ActionComponentCallback callback, String key)
Get an ActionComponent.
- Parameters:
activity- The Activity to associate the lifecycle.configuration- The Configuration of the component.callback- The callback to handle events from the ActionComponent.key- The key to use to identify the ActionComponent.- Returns:
The Component
-
get
abstract ComponentT get(SavedStateRegistryOwner savedStateRegistryOwner, ViewModelStoreOwner viewModelStoreOwner, LifecycleOwner lifecycleOwner, Application application, ConfigurationT configuration, ActionComponentCallback callback, String key)
Get an ActionComponent.
- Parameters:
savedStateRegistryOwner- The owner of the SavedStateRegistry, normally an Activity or Fragment.viewModelStoreOwner- A scope that owns ViewModelStore, normally an Activity or Fragment.lifecycleOwner- The lifecycle owner, normally an Activity or Fragment.application- Your main application class.configuration- The Configuration of the component.callback- The callback to handle events from the ActionComponent.key- The key to use to identify the ActionComponent.- Returns:
The Component
-
getDelegate
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) abstract DelegateT getDelegate(CheckoutConfiguration checkoutConfiguration, SavedStateHandle savedStateHandle, Application application)
-
canHandleAction
abstract Boolean canHandleAction(Action action)
Checks if the provided component can handle a given action.
- Parameters:
action- The Action object from the API response.- Returns:
If the action can be handled by this component.
-
providesDetails
abstract Boolean providesDetails(Action action)
Checks if the provided component will trigger any updates through the ActionComponentCallback or not. If false, no events will be fired and you don't need to make a /payments/details API call. The component only serves to present some final data to the shopper.
- Returns:
If the provided component provides details to make an API call to the /payments/details endpoint.
-
getSupportedActionTypes
abstract List<String> getSupportedActionTypes()
- Returns:
the list of supported action types
-
-
-
-