BRAccountLinkingManager

Objective-C

@interface BRAccountLinkingManager : NSObject

Swift

class BRAccountLinkingManager : NSObject

Use this interface to manage users’ linked retailer accounts for parsing e-receipts. Here is the basic flow:

  1. Implement UI to capture the user’s credentials to one or more retailers from the supported list (see BRAccountLinkingRetailer enum)
  2. Store these using -[BRAccountLinkingManager linkAccountWithCredentials:]
  3. Call -[BRAccountLinkingManager grabNewOrdersWithCompletion:]
  4. The callback to this method will return all order details available since the most recent successful invocation

Class Methods



  • Declaration

    Objective-C

    + (nonnull instancetype)shared;

    Swift

    class func shared() -> Self

Properties

  • Returns current version

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull version;

    Swift

    var version: String { get }
  • A completion handler to receive updates from a background operation when enabled via enableBackgroundFetchWithIdentifier BRAccountLinkingRetailer retailer - the retailer for this order BRScanResults *results - the current order BRAccountLinkingError error - any error that was encountered while attempting to grab orders NSString *sessionId - a unique session GUID that can be reported for debugging purposes

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^) (BRAccountLinkingRetailer, BRAccountLinkingError, NSString *_Nonnull, BRScanResults *_Nullable) backgroundFetchCompletion;

    Swift

    var backgroundFetchCompletion: ((BRAccountLinkingRetailer, BRAccountLinkingError, String, BRScanResults?) -> Void)? { get set }

Methods