BRCoupon
Objective-C
@interface BRCoupon : NSObject <BRSerializable>
Swift
class BRCoupon : NSObject, BRSerializable
Describes one coupon or discount on a receipt
-
The type of coupon based on the above enum
Declaration
Objective-C
@property (nonatomic, readonly) BRCouponType couponType;
Swift
var couponType: BRCouponType { get }
-
The amount of the coupon or discount
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRFloatValue *couponAmount;
Swift
var couponAmount: BRFloatValue! { get }
-
Coupon description
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRStringValue *couponDesc;
Swift
var couponDesc: BRStringValue! { get }
-
Coupon SKU
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRStringValue *couponSku;
Swift
var couponSku: BRStringValue! { get }
-
The prefix found before the coupon description if any
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRStringValue *couponDescPrefix;
Swift
var couponDescPrefix: BRStringValue! { get }
-
The postfix found after the coupon description if any
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRStringValue *couponDescPostfix;
Swift
var couponDescPostfix: BRStringValue! { get }
-
The prefix found before the coupon SKU if any
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRStringValue *couponSkuPrefix;
Swift
var couponSkuPrefix: BRStringValue! { get }
-
The postfix found after the coupon SKU if any
Declaration
Objective-C
@property (nonatomic, strong, readonly) BRStringValue *couponSkuPostfix;
Swift
var couponSkuPostfix: BRStringValue! { get }
-
If this coupon is related to a particular product, this property will be set to correspond to the index of related product in the
BRScanResults.products
array.Default value: -1
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger relatedProductIndex;
Swift
var relatedProductIndex: Int { get }
-
Convert a coupon type to a user-friendly string
Declaration
Objective-C
+ (NSString *)friendlyNameForCouponType:(BRCouponType)type;
Swift
class func friendlyName(for type: BRCouponType) -> String!