SBDataEvent
Objective-C
@interface SBDataEvent : NSObject
Swift
class SBDataEvent : NSObject
Interface defines methods to monitor currently processed transactions
Note: To monitor a single transaction, use TransactionObserver
.
-
Shared instance of SBDataEvent
Declaration
Objective-C
+ (instancetype)sharedManager;
Swift
class func sharedManager() -> Self!
Return Value
SBDataEvent
-
Add SBDataEventReceiptBlock to monitor receipt data changes in Sensibill Receipt SDK
Notes:
- Ensure that your block accounts for situations where an event happens when a caller is no longer available.
- Block may be called on background thread. It’s a responsibility of a block author to ensure that any changes to UI elements are done on main thread.
Declaration
Objective-C
- (void)addReceiptObserver:(id)observer withBlock:(SBDataEventReceiptBlock)block;
Swift
func addReceiptObserver(_ observer: Any!, with block: SBDataEventReceiptBlock!)
Parameters
observer
identifier of block added
block
code segment that will be executed when receipt data has changed
-
Add SBDataEventTransactionBlock to monitor transaction data changes in Sensibill Receipt SDK
Notes:
- Ensure that your block accounts for situations where an event happens when a caller is no longer available.
- Block may be called on background thread. It’s a responsibility of a block author to ensure that any changes to UI elements are done on main thread.
Declaration
Objective-C
- (void)addTransactionObserver:(id)observer withBlock:(SBDataEventTransactionBlock)block;
Swift
func addTransactionObserver(_ observer: Any!, with block: SBDataEventTransactionBlock!)
Parameters
observer
identifier of block added
block
code segment will be executed when transaction data has changed
-
Remove all observers
Declaration
Objective-C
- (void)clear;
Swift
func clear()