GiftCardComponent
open class GiftCardComponent @RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP] ) constructor(giftCardDelegate: GiftCardDelegate, genericActionDelegate: GenericActionDelegate, actionHandlingComponent: DefaultActionHandlingComponent, componentEventHandler: ComponentEventHandler<GiftCardComponentState>) : ViewModel, PaymentComponent, ViewableComponent, ButtonComponent, ActionHandlingComponent
A PaymentComponent that supports the PaymentMethodTypes.GIFTCARD payment method.
Constructors
Link copied to clipboard
constructor(giftCardDelegate: GiftCardDelegate, genericActionDelegate: GenericActionDelegate, actionHandlingComponent: DefaultActionHandlingComponent, componentEventHandler: ComponentEventHandler<GiftCardComponentState>)
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun observe(lifecycleOwner: LifecycleOwner, callback: (PaymentComponentEvent<GiftCardComponentState>) -> Unit)
Link copied to clipboard
Link copied to clipboard
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.
Link copied to clipboard
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.
Link copied to clipboard
Link copied to clipboard