BRScanResults
Objective-C
@interface BRScanResults : NSObject <BRSerializable>Swift
class BRScanResults : NSObject, BRSerializableThis class holds the scan results for a particular scanning session
- 
                  
                  For future auto-detect retailer functionality DeclarationObjective-C @property (nonatomic, readonly) WFRetailerId retailerId;Swift var retailerId: WFRetailerId { get }
- 
                  
                  Unique ID for this receipt which allows BlinkReceipt to correspond scan data to the correct receipt image stored by client DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *blinkReceiptId;Swift var blinkReceiptId: String! { get }
- 
                  
                  An array of BRProductobjects representing the products that were detected on the receipt, if any Some e-receipts may returnshipmentswith products instead of products list directly.
- 
                  
                  The total detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRFloatValue *total;Swift var total: BRFloatValue! { get }
- 
                  
                  The subtotal detected on the receipt, if any DeclarationObjective-C @property (nonatomic, readonly) BRFloatValue *subtotal;Swift var subtotal: BRFloatValue! { get }
- 
                  
                  The tax detected on the receipt, if any DeclarationObjective-C @property (nonatomic, readonly) BRFloatValue *taxes;Swift var taxes: BRFloatValue! { get }
- 
                  
                  The tip detected on the receipt, if any DeclarationObjective-C @property (nonatomic, readonly) BRFloatValue *tip;Swift var tip: BRFloatValue! { get }
- 
                  
                  The purchase date found on the receipt formatted as MM/dd/yyyy, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *receiptDate;Swift var receiptDate: BRStringValue! { get }
- 
                  
                  The purchase time found on the receipt formatted as HH:mm, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *receiptTime;Swift var receiptTime: BRStringValue! { get }
- 
                  
                  The barcode detected on the receipt, if any. Currently we recognize Code 39, Code 128, and ITF formats DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *barcode;Swift var barcode: String! { get }
- 
                  
                  The store number detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *storeNumber;Swift var storeNumber: BRStringValue! { get }
- 
                  
                  The store name detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *merchantName;Swift var merchantName: BRStringValue! { get }
- 
                  
                  If there is client-specific version of a particular merchant, it will be passed back in this property DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *clientMerchantName;Swift var clientMerchantName: BRStringValue! { get }
- 
                  
                  An array of NSNumberobjects wrappingBRMerchantSourcevalues indicating which merchant detection method(s) succeeded in identifying the current merchant. This will benilif no merchant was detected (i.e.merchantName == nil)DeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<NSNumber *> *merchantSources;Swift var merchantSources: [NSNumber]! { get }
- 
                  
                  When no merchant is detected using standard methods, the parser will occasionally return a best guess for the merchant based on receipt heuristics. DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *merchantGuess;Swift var merchantGuess: String! { get }
- 
                  
                  The mall name in which the retailer is located, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *mallName;Swift var mallName: BRStringValue! { get }
- 
                  
                  The store street address detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *storeAddress;Swift var storeAddress: BRStringValue! { get }
- 
                  
                  The store city detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *storeCity;Swift var storeCity: BRStringValue! { get }
- 
                  
                  The store state detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *storeState;Swift var storeState: BRStringValue! { get }
- 
                  
                  The store zipcode detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *storeZip;Swift var storeZip: BRStringValue! { get }
- 
                  
                  The store phone number detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *storePhone;Swift var storePhone: BRStringValue! { get }
- 
                  
                  The cashier ID detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *cashierId;Swift var cashierId: BRStringValue! { get }
- 
                  
                  The transaction ID detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *transactionId;Swift var transactionId: BRStringValue! { get }
- 
                  
                  Some receipts contain a longer transaction number in addition to the standard one DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *longTransactionId;Swift var longTransactionId: BRStringValue! { get }
- 
                  
                  The register ID detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *registerId;Swift var registerId: BRStringValue! { get }
- 
                  
                  An array of BRPaymentMethodobjects representing all payment methods found on the receipt, if anyDeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<BRPaymentMethod *> *paymentMethods;Swift var paymentMethods: [BRPaymentMethod]! { get }
- 
                  
                  The last 4 digits of the credit card used, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *last4CC;Swift var last4CC: BRStringValue! { get }
- 
                  
                  The tax ID of the retailer, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *taxId;Swift var taxId: BRStringValue! { get }
- 
                  
                  The retail channel for this receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *channel;Swift var channel: BRStringValue! { get }
- 
                  
                  The unique identifier associated with the payment processor’s terminal DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *paymentTerminalId;Swift var paymentTerminalId: BRStringValue! { get }
- 
                  
                  The unique identifier associated with the payment processor’s transaction DeclarationObjective-C @property (nonatomic, strong, readonly) BRStringValue *paymentTransactionId;Swift var paymentTransactionId: BRStringValue! { get }
- 
                  
                  Represents the type of purchase DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *purchaseType;Swift var purchaseType: String! { get }
- 
                  
                  Whether there is an indication of a loyalty program found on the receipt DeclarationObjective-C @property (nonatomic, readonly) BOOL loyaltyProgram;Swift var loyaltyProgram: Bool { get }
- 
                  
                  Whether the purchase was made by an Instacart shopper DeclarationObjective-C @property (nonatomic, readonly) BOOL isInstacartShopper;Swift var isInstacartShopper: Bool { get }
- 
                  
                  An average confidence (between 0 and 100) for the OCR performed on this receipt DeclarationObjective-C @property (nonatomic, readonly) float ocrConfidence;Swift var ocrConfidence: Float { get }
- 
                  
                  Indicates whether any server lookups were still pending at the time results were returned to the client DeclarationObjective-C @property (nonatomic, readonly) BOOL serverLookupsCompleted;Swift var serverLookupsCompleted: Bool { get }
- 
                  
                  Indicates whether a top edge was found on any frame that was scanned in this session DeclarationObjective-C @property (nonatomic, readonly) BOOL foundTopEdge;Swift var foundTopEdge: Bool { get }
- 
                  
                  Indicates whether a bottom edge was found on any frame that was scanned in this session DeclarationObjective-C @property (nonatomic, readonly) BOOL foundBottomEdge;Swift var foundBottomEdge: Bool { get }
- 
                  
                  Indicates whether the subtotal matches the sum of the products and coupons DeclarationObjective-C @property (nonatomic, readonly) BOOL subtotalMatches;Swift var subtotalMatches: Bool { get }
- 
                  
                  The currency for this receipt, if identified DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *currencyCode;Swift var currencyCode: String! { get }
- 
                  
                  Indicates how many products were still awaiting product intelligence results when the scan session ended DeclarationObjective-C @property (nonatomic, readonly) NSInteger productsPendingLookup;Swift var productsPendingLookup: Int { get }
- 
                  
                  Indicate whether the receipt is a duplicate (depends on BRScanOptions.detectDuplicatesbeing enabled)DeclarationObjective-C @property (nonatomic, readonly) BOOL isDuplicate;Swift var isDuplicate: Bool { get }
- 
                  
                  Indicate whether the receipt is believed to be fraudulent (depends on BRScanOptions.detectDuplicatesbeing enabled)DeclarationObjective-C @property (nonatomic, readonly) BOOL isFraudulent;Swift var isFraudulent: Bool { get }
- 
                  
                  If isDuplicateis true, this property contains the Blink Receipt ID(s) of the duplicate receiptsDeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<NSString *> *duplicateBlinkReceiptIds;Swift var duplicateBlinkReceiptIds: [String]! { get }
- 
                  
                  If promotion validation is enabled, this will contain all the promotions that were validated DeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<BRPromotion *> *qualifiedPromotions;Swift var qualifiedPromotions: [BRPromotion]! { get }
- 
                  
                  If promotion validation is enabled, this will contain all the promotions that were NOT validated DeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<BRPromotion *> *unqualifiedPromotions;Swift var unqualifiedPromotions: [BRPromotion]! { get }
- 
                  
                  Additional receipt fields DeclarationObjective-C @property (nonatomic, strong, readonly) NSDictionary *extendedFields;Swift var extendedFields: [AnyHashable : Any]! { get }
- 
                  
                  For an Amazon or e-receipt order, this is the order number DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptOrderNumber;Swift var ereceiptOrderNumber: String! { get }
- 
                  
                  For an e-receipt order, this is the order status DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptOrderStatus;Swift var ereceiptOrderStatus: String! { get }
- 
                  
                  For an Amazon or e-receipt order, this is the raw HTML that was parsed DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptRawHTML;Swift var ereceiptRawHTML: String! { get }
- 
                  
                  The name of the email provider from which this e-receipt was obtained DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptEmailProvider;Swift var ereceiptEmailProvider: String! { get }
- 
                  
                  The sender address for this e-receipt DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptMerchantEmail;Swift var ereceiptMerchantEmail: String! { get }
- 
                  
                  The subject of the e-receipt email DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptEmailSubject;Swift var ereceiptEmailSubject: String! { get }
- 
                  
                  For e-receipt orders, if aggregation is turned on, this property will contain the scan results objects from each component email for a given order. However, please note that for emails related to the same order that were originally seen in a different scrape session, the only property of the BRScanResultsobject that will be populated is theblinkReceiptIdDeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<BRScanResults *> *ereceiptComponentEmails;Swift var ereceiptComponentEmails: [BRScanResults]! { get }
- 
                  
                  For an Amazon or e-receipt order, this is the type of purchase DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptPurchaseType;Swift var ereceiptPurchaseType: String! { get }
- 
                  
                  The name of the 3rd party service (like Instacart) that fulfilled this order, if any DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptFulfilledBy;Swift var ereceiptFulfilledBy: String! { get }
- 
                  
                  The name of the sub-merchant (like “McDonald’s” for some Uber Eats orders), if any DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptSubMerchant;Swift var ereceiptSubMerchant: String! { get }
- 
                  
                  The point of sale system used for this order, if any DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptPOSSystem;Swift var ereceiptPOSSystem: String! { get }
- 
                  
                  The internal identifier of this email message from the provider DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *ereceiptEmailId;Swift var ereceiptEmailId: String! { get }
- 
                  
                  The shipping costs for this e-receipt, if any DeclarationObjective-C @property (nonatomic, readonly) float ereceiptShippingCosts;Swift var ereceiptShippingCosts: Float { get }
- 
                  
                  Whether this e-receipt could be authenticated via DKIM or SPF headers DeclarationObjective-C @property (nonatomic, readonly) BOOL ereceiptAuthenticated;Swift var ereceiptAuthenticated: Bool { get }
- 
                  
                  Whether the email was successfully identified as an e-receipt or related message (as opposed to a marketing message, etc) DeclarationObjective-C @property (nonatomic, readonly) BOOL ereceiptIsValid;Swift var ereceiptIsValid: Bool { get }
- 
                  
                  Additional fees / charges for this e-receipt, if any (like tips, bag / bottle fees, etc…) Each key-value pair, represents the name of the fee and its amount { “Tips”: “2.19”, “Bag Fee”: “0.05” } DeclarationObjective-C @property (nonatomic, strong, readonly) NSDictionary<NSString *, NSString *> *ereceiptAdditionalFees;Swift var ereceiptAdditionalFees: [String : String]! { get }
- 
                  
                  An array of BRShipmentobjects representing all shipments discovered in this orderDeclarationObjective-C @property (nonatomic, strong, readonly) NSArray<BRShipment *> *shipments;Swift var shipments: [BRShipment]! { get }
- 
                  
                  NSString representing cumulative set of raw results DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *combinedRawText;Swift var combinedRawText: String! { get }
- 
                  
                  Float value representing cashback amount DeclarationObjective-C @property (nonatomic, readonly) float cashback;Swift var cashback: Float { get }
- 
                  
                  A set of raw product data results DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *rawBasketText;Swift var rawBasketText: String! { get }
- 
                  
                  A set of raw trip results found on top of receipt DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *rawTripHeaderText;Swift var rawTripHeaderText: String! { get }
- 
                  
                  A set of raw trip results found on bottom of receipt DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *rawTripFooterText;Swift var rawTripFooterText: String! { get }
- 
                  
                  Loyalty member number detected on the receipt, if any DeclarationObjective-C @property (nonatomic, strong, readonly) NSString *memberNumber;Swift var memberNumber: String! { get }
- 
                  
                  For custom user corrections flow, if the user adds a new product, call this method to add it to this scan results object DeclarationObjective-C - (void)addUserCorrectedProductWithBrand:(NSString *)brand upc:(NSString *)upc productName:(NSString *)productName imageUrl:(NSString *)imgUrl totalPrice:(float)totalPrice quantity:(float)quantity;Swift func addUserCorrectedProduct(withBrand brand: String!, upc: String!, productName: String!, imageUrl imgUrl: String!, totalPrice: Float, quantity: Float)ParametersbrandThe brand, if any, of the new product upcThe upc, if any, of the new product productNameThe name, if any, of the new product imgUrlThe image URL, if any, of the new product totalPriceThe total price of the new product quantityThe quantity of the new product 
- 
                  
                  For custom user corrections flow, when a user modifies the date, call this method to update the receipt’s purchase date DeclarationObjective-C - (void)userCorrectedDate:(NSString *)dateString;Swift func userCorrectedDate(_ dateString: String!)ParametersdateStringThe date in MM/dd/yyyy format 
- 
                  
                  For custom user corrections flow, when a user modifies the total, call this method to update the receipt’s purchase total DeclarationObjective-C - (void)userCorrectedTotal:(float)total;Swift func userCorrectedTotal(_ total: Float)Parameterstotal
- 
                  
                  For custom user corrections flow, when a user modifies the merchant, call this method to update the receipt’s purchase merchant name DeclarationObjective-C - (void)userCorrectedMerchant:(NSString *)name;Swift func userCorrectedMerchant(_ name: String!)Parametersname
 
       View on GitHub
            View on GitHub
          