public protocol StampReaderViewControllerDelegate : class
Delegate for Fintiv StampReaderViewController
didCompleteScan(_:forEventType:result:reward:)
func didCompleteScan(_ controller : FTMCStampReaderViewController, forEventType event: FTMCStampEventType, result : FTMCResult<FTMCStampCard,FintivError>, reward: FTMCRewardInstance?)
Called on the optional StampReaderViewController delegate when it succefully scans a stamp or reward instance’s QR code
- Parameters:
- controller: the StampReaderViewController
- event: The FTMCStampEventType case of the controller (stamp vs reward scan)
- result: The fintiv result with .success(updated StampCard), or .failure(NetworkError)
- reward: The updated reward instance if event == .redeem
Name | Description |
---|---|
controller | the StampReaderViewController |
event | The FTMCStampEventType case of the controller (stamp vs reward scan) |
result | The fintiv result with .success(updated StampCard), or .failure(NetworkError) |
reward | The updated reward instance if event == .redeem |
didCancelScan(_:)
func didCancelScan(_ controller : FTMCStampReaderViewController)
Called on the optional StampReaderViewController delegate when the user cancels the controller’s scan action
- Parameter controller: the controller instance, the delegate is responsible for presenting / dismissing the controller
Name | Description |
---|---|
controller | the controller instance, the delegate is responsible for presenting / dismissing the controller |