Package com.adyen.checkout.giftcard
Class GiftCardComponent
-
- All Implemented Interfaces:
-
com.adyen.checkout.action.core.internal.ActionHandlingComponent,com.adyen.checkout.components.core.internal.ButtonComponent,com.adyen.checkout.components.core.internal.Component,com.adyen.checkout.components.core.internal.PaymentComponent,com.adyen.checkout.ui.core.internal.ui.ViewableComponent
public final class GiftCardComponent extends ViewModel implements PaymentComponent, ViewableComponent, ButtonComponent, ActionHandlingComponent
A PaymentComponent that supports the PaymentMethodTypes.GIFTCARD payment method.
-
-
Field Summary
Fields Modifier and Type Field Description public final static GiftCardComponentProviderPROVIDERpublic final static List<String>PAYMENT_METHOD_TYPESprivate final ComponentDelegatedelegateprivate final Flow<ComponentViewType>viewFlow
-
Method Summary
Modifier and Type Method Description ComponentDelegategetDelegate()Flow<ComponentViewType>getViewFlow()BooleanisConfirmationRequired()Unitsubmit()UnitsetInteractionBlocked(Boolean isInteractionBlocked)final UnitresolveBalanceResult(BalanceResult balanceResult)Pass the BalanceResult you get from the call to the /paymentMethods/balance endpoint of the Checkout API to continue the gift card flow. final UnitresolveOrderResponse(OrderResponse orderResponse)Pass the OrderResponse you get from the call to the /orders endpoint of the Checkout API to continue the gift card flow. -
Methods inherited from class com.adyen.checkout.action.core.internal.ActionHandlingComponent
canHandleAction, handleAction, handleIntent, setOnRedirectListener -
Methods inherited from class androidx.lifecycle.ViewModel
addCloseable -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getDelegate
ComponentDelegate getDelegate()
-
getViewFlow
Flow<ComponentViewType> getViewFlow()
-
isConfirmationRequired
Boolean isConfirmationRequired()
-
setInteractionBlocked
Unit setInteractionBlocked(Boolean isInteractionBlocked)
-
resolveBalanceResult
final Unit resolveBalanceResult(BalanceResult balanceResult)
Pass the BalanceResult you get from the call to the /paymentMethods/balance endpoint of the Checkout API to continue the gift card flow. You should make this call in the GiftCardComponentCallback.onBalanceCheck callback. Deserialize the response using BalanceResult.SERIALIZER.
- Parameters:
balanceResult- The deserialized response from the /paymentMethods/balance endpoint.
-
resolveOrderResponse
final Unit resolveOrderResponse(OrderResponse orderResponse)
Pass the OrderResponse you get from the call to the /orders endpoint of the Checkout API to continue the gift card flow. You should make this call in the GiftCardComponentCallback.onRequestOrder callback. Deserialize the response using OrderResponse.SERIALIZER.
- Parameters:
orderResponse- The deserialized response from the /orders endpoint.
-
-
-
-