BRCoupon
Describes one coupon or discount detected on a receipt.
Declaration
@interface BRCoupon : NSObject <BRSerializable>
class BRCoupon : NSObject, BRSerializable
Quick Reference
Class Methods
| Method | Description |
|---|---|
+friendlyNameForCouponType: | Converts a BRCouponType value to a user-friendly string. |
Properties
| Property | Description |
|---|---|
couponType | The type of coupon, from the BRCouponType enum. |
couponAmount | The amount of the coupon or discount. |
couponDesc | Coupon description. |
couponSku | Coupon SKU. |
couponDescPrefix | The prefix found before the coupon description, if any. |
couponDescPostfix | The postfix found after the coupon description, if any. |
couponSkuPrefix | The prefix found before the coupon SKU, if any. |
couponSkuPostfix | The postfix found after the coupon SKU, if any. |
relatedProductIndex | If this coupon is related to a particular product, this is the index of that product in BRScanResults.products. Default: -1 |
Properties
couponType (read-only)
@property (nonatomic, readonly) BRCouponType couponType;
var couponType: BRCouponType { get }
The type of coupon, from the BRCouponType enum.
couponAmount (read-only)
@property (nonatomic, strong, readonly) BRFloatValue *couponAmount;
var couponAmount: BRFloatValue! { get }
The amount of the coupon or discount.
couponDesc (read-only)
@property (nonatomic, strong, readonly) BRStringValue *couponDesc;
var couponDesc: BRStringValue! { get }
Coupon description.
couponSku (read-only)
@property (nonatomic, strong, readonly) BRStringValue *couponSku;
var couponSku: BRStringValue! { get }
Coupon SKU.
couponDescPrefix (read-only)
@property (nonatomic, strong, readonly) BRStringValue *couponDescPrefix;
var couponDescPrefix: BRStringValue! { get }
The prefix found before the coupon description, if any.
couponDescPostfix (read-only)
@property (nonatomic, strong, readonly) BRStringValue *couponDescPostfix;
var couponDescPostfix: BRStringValue! { get }
The postfix found after the coupon description, if any.
couponSkuPrefix (read-only)
@property (nonatomic, strong, readonly) BRStringValue *couponSkuPrefix;
var couponSkuPrefix: BRStringValue! { get }
The prefix found before the coupon SKU, if any.
couponSkuPostfix (read-only)
@property (nonatomic, strong, readonly) BRStringValue *couponSkuPostfix;
var couponSkuPostfix: BRStringValue! { get }
The postfix found after the coupon SKU, if any.
relatedProductIndex (read-only)
@property (nonatomic, readonly) NSInteger relatedProductIndex;
var relatedProductIndex: Int { get }
If this coupon is related to a particular product, this is the index of that product in BRScanResults.products.
Default: -1
Class Methods
+friendlyNameForCouponType:
+ (NSString *)friendlyNameForCouponType:(BRCouponType)type;
class func friendlyName(for type: BRCouponType) -> String!
Converts a BRCouponType value to a user-friendly display string.
Parameters:
| Parameter | Description |
|---|---|
type | The BRCouponType enum value to convert |
Returns: A human-readable string representation of the coupon type.