EventTypeData

enum EventTypeData

As new event types are identified, a new enum case should be defined here so that it can be listened to and fired.

  • This event sends the index and data associated with the centered FI

    Declaration

    Swift

    case FICentered(Int, FIModelBase)
  • This event sends the index and data associated with the selected FI

    Declaration

    Swift

    case FISelected(Int, FIModelBase)
  • New FI card is added

    Declaration

    Swift

    case addCard
  • This event tracks when we approve the card from add card

    Declaration

    Swift

    case addCardApproved(FundingInstrument?)
  • Event called when we need to display an error relating to the add card flow

    Declaration

    Swift

    case addCardError(isThreeDSFlow: Bool)
  • This event is fired when add card state is updated to processing or not processing processing = true when user attempted to add card and we are waiting on step up/query responses processing = false when user has not yet attemped to add card or when add card query is finished

    Declaration

    Swift

    case addCardStateUpdated(isProcessing: Bool)
  • The user edited addressLine1

    Declaration

    Swift

    case addressLine1EditingChanged
  • When address validation query has finished and there is a reformatted address provided in the response. Firing this event will update ShippingCorrectionPage with the entered address and reformatted address.

    Declaration

    Swift

    case addressReformatted(firstName: String, lastName: String, enteredAddress: PortableAddress, reformattedAddress: PortableAddress)
  • When user toggles the billing balance

    Declaration

    Swift

    case billingBalanceToggled(isOn: Bool)
  • When the SDK encounters a 3DS challenge when confirming payment, but the Cardinal SDK is not present to handle the transaction

    Declaration

    Swift

    case cardinalNotPresent
  • The user selected a country from the select country page.

    Declaration

    Swift

    case countrySelected(suggestion: CountrySuggestion)
  • This event tracks when create order request has finished successfully with an order ID

    Declaration

    Swift

    case createOrderSucceeded
  • This event tracks when we get new quotes from gql or switch to a different crypto FI

    Declaration

    Swift

    case cryptoUpdated
  • When the cta needs to be updated

    Declaration

    Swift

    case ctaButtonUpdated(FIModelBase)
  • This event tracks when we find a duplicate button session id.

    Declaration

    Swift

    case duplicateButtonSessionID
  • This event tracks when we find a duplicate ec-token.

    Declaration

    Swift

    case duplicateTokenFound
  • This event tracks when there’s an error while approving 3DS during checkout. (approval happens after the user hits the continue/ pay now button).

    Declaration

    Swift

    case errorApproving3DS(ThreeDSContext)
  • There was an error approving the payment menthod. Start the error process.

    Declaration

    Swift

    case errorApprovingPayment
  • This event tracks when a funding instrument has failed 3DS authentication.

    Declaration

    Swift

    case fiFailed3DS
  • This event tracks when firebase finishes or times out

    Declaration

    Swift

    case firebaseSetProps(Result<Bool, Error>)
  • This event tracks any changes in the funding options list.

    Declaration

    Swift

    case fundingOptionsChanged(old: [FundingOption], new: [FundingOption])
  • The default event type in the application

    Declaration

    Swift

    case gqlPayload(Result<UserCheckoutResult, Error>)
  • Fired after we fetch GQL checkoutSession.cart

    Declaration

    Swift

    case gqlSessionCart(Cart?)
  • Keyboard will hide

    Declaration

    Swift

    case keyboardWillHide
  • Keyboard will show with its height and animation duration

    Declaration

    Swift

    case keyboardWillShow(keyboardHeight: CGFloat, duration: TimeInterval)
  • Triggers a logout flow and redirects the user to the start experience

    Declaration

    Swift

    case logout
  • This event tracks when native eligbility is updated

    Declaration

    Swift

    case nativeEligibilityUpdated(Bool)
  • Lets us know when the onApprove RTDB message has been successfully sent

    Declaration

    Swift

    case onApproveRTDBMessage
  • Lets us know when the user has chosen to select Cancel

    Declaration

    Swift

    case onCancel
  • This event tracks when the close button is tapped

    Declaration

    Swift

    case onCloseButtonTapped
  • Generalized on error type

    Declaration

    Swift

    case onError(Error)
  • Fire this event to display a generic error or a custom error message to the user without doing anything additional If message is not passed, we’ll use a default generic error message.

    Declaration

    Swift

    case onGenericError(message: String = I18n.errorMessageGeneric)
  • This event tracks when a user selects a Link in the Profile Page

    Declaration

    Swift

    case openProfileLink(link: PayPalLink)
  • Will open safari based on the route

    Declaration

    Swift

    case openWeb(route: WebRoute)
  • This event tracks when the PaysheetViewController gets added to a view hierarchy.

    Declaration

    Swift

    case paysheetDidAppear
  • This event tracks when the PaysheetViewController will get removed from a view hierarchy.

    Declaration

    Swift

    case paysheetWillDisappear
  • We received a response for PlaceDetails we can update our AddShippingPage with the normalized address or show error.

    Declaration

    Swift

    case placeDetailsUpdate(Result<PlaceDetails, RequestError>)
  • Address suggestions shown

    Declaration

    Swift

    case scrollPageOnAddressSuggestionsShown(offsetHeight: CGFloat)
  • As the SDK shuts down it makes a final mutation to the backend to modify the cart and payment that transactions are complete. The response from this call is used in several places. This event allows that to happen.

    Declaration

    Swift

    case sdkApprovePayment(CheckoutCompleteResult?, Error?)
  • This event tracks the start of the finishing flow

    Declaration

    Swift

    case sdkFinishing
  • The SDK has been shutdown. Do any cleanup work here

    Declaration

    Swift

    case sdkShutdown
  • This event represents when the user has selected a new plan.

    Declaration

    Swift

    case selectedPlanChanged(Plan)
  • This event sets the profile image view with a new image The bool parameter determines if there should be an image transition when applying a new image

    Declaration

    Swift

    case setNewProfileImage(UIImage, Bool)
  • A new shipping address has been added

    Declaration

    Swift

    case shippingAddressAdded(ShippingAddress?)
  • Fired after merchant finished handling shipping change in shipping callback and Paysheet has been reloaded with new shipping address/method

    Declaration

    Swift

    case shippingChangeCompleted(ShippingAddress?, ShippingMethod?, ShippingChangeState)
  • Fired when we call shipping callback when new shipping address or method is selected

    Declaration

    Swift

    case shippingChangeStarted(ShippingAddress?, ShippingMethod?)
  • Toggle the cart details view

    Declaration

    Swift

    case toggleCartDetailsView
  • We finished our ELMO treatments call and this event updates paysheet based on treatments.

    Declaration

    Swift

    case treatmentsUpdated
  • This event represents when the user has changed between using PayPal for currency conversion or not.

    Declaration

    Swift

    case uiCurrencyConversionChanged(Bool)
  • Fired after any height and content changes resulting from page transition

    Declaration

    Swift

    case uiPageDidChange(oldPage: ContentPage?, newPage: ContentPage?)
  • Fired during any height and content changes resulting from page transition

    Declaration

    Swift

    case uiPageIsChanging(oldPage: ContentPage?, newPage: ContentPage?)
  • Fired before any height and content changes resulting from page transition

    Declaration

    Swift

    case uiPageWillChange(oldPage: ContentPage?, newPage: ContentPage?)
  • When there is a profile pic data available, use this event to let views that are currently presently know.

    Declaration

    Swift

    case uiProfilePicAvailable(Result<UIImage, Error>)
  • This event represents when the UI has set a card as preferred and the corresponding model should be updated.

    Declaration

    Swift

    case uiSetCardAsPreferred(atPosition: Int)
  • Update add card card issuer image

    Declaration

    Swift

    case updateCarouselAddCardImage(UIImage?)