Type Aliases
The following type aliases are available globally.
- 
                  
                  An empty block, called with no arguments, returning nothing. DeclarationSwift public typealias OPVoidBlock = () -> Void
- 
                  
                  A callback used to return an error during the ApplePay completion flow DeclarationSwift public typealias OPApplePayCompletionBlock = (_ error: Error?) -> VoidParameterserrorThe error that occurred when submitting an ApplePay payment method to Olo’s Ordering API, or nil if no error occurred 
- 
                  
                  A callback to be run with a PaymentMethod response from the OloPay API. DeclarationSwift public typealias OPPaymentMethodCompletionBlock = (_ paymentMethod: OPPaymentMethodProtocol?, _ error: Error?) -> VoidParameterspaymentMethodThe Olo Pay PaymentMethod from the response. Will be nil if an error occurs. errorThe error returned from the response, or nil if none occurs. 
- 
                  
                  A block used for returning an image associated with the card brand parameter DeclarationSwift public typealias OPCardBrandImageBlock = (_ cardBrand: OPCardBrand) -> UIImage?ParameterscardBrandThe brand to get an image for Return ValueAn image associated with the given brand, or nil 
- 
                  
                  A block used for returning an error message based on the current state of the passed-in card control DeclarationSwift public typealias OPCardErrorMessageBlock = (_ card: OPPaymentCardDetailsView, _ field: OPCardField) -> StringParameterscardThe card control fieldThe field that is invalid, or nil if a general error message should be displayed Return ValueAn error message, or nil if no message should be displayed 
 Type Aliases  Reference
        Type Aliases  Reference