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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      ComponentDelegate getDelegate()
      Flow<ComponentViewType> getViewFlow()
      Boolean isConfirmationRequired()
      Unit submit()
      Unit setInteractionBlocked(Boolean isInteractionBlocked)
      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.
      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.
      • 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
    • Constructor Detail

    • Method Detail

      • 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.