Type Aliases

The following type aliases are available globally.

  • The coarse address protocol Address has been renamed to CoarseAddress as we’re moving toward portable format. This typealias is provided to avoid breaking changes until we fully remove coarse address format.

    Declaration

    Swift

    typealias Address = CoarseAddress
  • The auth token or access token is provided after a user is authenticated and logged in for use with this checkout session. The typealias allows for code location and easy refactoring should such a need arise.

    Declaration

    Swift

    typealias AuthToken = String
  • Type alias for items of CheckoutProcess

    Declaration

    Swift

    typealias CheckoutProcessItem = SequenceProcessor<State>.Callback
  • The type containing all of the SDK’s translated strings, below.

    Declaration

    Swift

    typealias CheckoutStrings = I18n
  • ColorSheet allows us to provide both dark mode and light mode colors for our Paysheet using custom UIColor extension

    Declaration

    Swift

    typealias ColorSheet = [ColorType : UIColor]
  • Old name for CheckoutConfig - keeping it to avoid a breaking change

    Declaration

    Swift

    typealias Config = CheckoutConfig
  • This alias definition describes a closure that takes a parent UIView and an instance of ContentPage and expects an array of NSLayoutConstraint objects describing the layout of the page in question. Any constraints passed back will be applied via a call to NSLayoutConstraint.activate().

    Declaration

    Swift

    typealias ContentConstrainer = (UIView, ContentPage) -> [NSLayoutConstraint]
  • Callback closure for custom layout types. These should return the overall desired height for the views layout.

    Declaration

    Swift

    typealias CustomContentLayout = (ContentView) -> CGFloat
  • Used as a way to uniquely identify a listener. As long as this EventID is always the same when the listener is registered the event handler that is registered will be overwritten and it can be defined functions or places that are reentrant

    Declaration

    Swift

    typealias EventID = String
  • The format for the event listeners to use as a closure

    Declaration

    Swift

    typealias EventListener = (EventTypeData, Error?) -> Void
  • Old name for ExtendedCheckoutConfig - keeping it to avoid a breaking change

    Declaration

    Swift

    typealias ExtendedConfig = ExtendedCheckoutConfig
  • An alias for a closure that takes an order ID/pay token/EC token or an error

    Declaration

    Swift

    typealias GetOrderIdCallback = (String?, Error?) -> Void
  • Each network operation potentially receives a callback that allows the closure to respond with the result of the network activity

    Declaration

    Swift

    typealias NetworkOperationCompletion = (NetworkResult, Any?) -> Void
  • A way to control when we send a message to RTDB to approve a transaction

    Declaration

    Swift

    typealias OnApproveRTDBMessageClosure = (OnApprove) -> Void
  • A way to control when we send a message to RTDB to cancel a transaction

    Declaration

    Swift

    typealias OnCancelRTDBMessageClosure = (OnCancel) -> Void
  • A way to control when we send a message to RTDB to indicate an error during the transaction

    Declaration

    Swift

    typealias OnErrorRTDBMessageClosure = (OnError) -> Void
  • A way to control when we send a message to RTDB to indicate that we are falling back to the browser.

    Declaration

    Swift

    typealias OnFallbackRTDBMessageClosure = (String) -> Void
  • A way to control when we send a message to RTDB to indicate that the we connected to Firebase.

    Declaration

    Swift

    typealias OnInitRTDBMessageClosure = () -> Void
  • A PageConfigurator will receive an instance of ContentRouter, wherein custom ContentPages can be added, existing ones removed and all reconfigured.

    Declaration

    Swift

    typealias PageConfigurator = (ContentRouter) -> Void
  • Allowing for easy refactoring later, the EC-Token, PAY-Token or Order ID are String values used by PayPal to represent an order and its associated details.

    Declaration

    Swift

    typealias PayToken = String
  • A way for 1st or possibly trusted 3rd party hosting apps to provide hooks that allow new PaysheetContainerCells to be applied to the table.

    Declaration

    Swift

    typealias PaysheetContainerContentDeducer = (AnyHashable, ContentPage) -> [ContentView]

    Return Value

    an array of ContentView objects that should be shown

  • ProcessConfigurator receives a list of checkout processes such as startup and shutdown that can be customized: new processes can be added and existing ones removed.

    Declaration

    Swift

    typealias ProcessConfigurator = (CheckoutProcesses) -> Void
  • The redirect URL which is represented by a string

    Declaration

    Swift

    typealias RedirectURI = URI
  • While always basically just a String, type aliasing the StaticIdentifier allows for it to be more easily refactored later. The purpose is to identity the type of thing we are referencing without always having an instance at hand to reference

    Declaration

    Swift

    typealias StaticIdentifier = String
  • URI

    The URL which is represented by a string

    Declaration

    Swift

    typealias URI = String
  • Closure for completion handlers for Web Experience

    Declaration

    Swift

    typealias WebExperienceCompletion = (WebRoute) -> Void
  • A way for the SDK to initialize a websocket with a web access token at the time of the initialized step

    Declaration

    Swift

    typealias WebSocketAuthentication = (String) -> Void