Coupon
Describes one coupon or discount applied on a receipt.
Package: com.microblink.core
Declaration
class Coupon : Parcelable
Constructor:
Coupon(
couponType: CouponType?,
amount: FloatType?,
sku: StringType?,
description: StringType?
)
// or with related product:
Coupon(
couponType: CouponType?,
amount: FloatType?,
sku: StringType?,
description: StringType?,
relatedProductIndex: Int
)
Quick Reference
Properties
| Property | Description |
|---|---|
couponType | The type of coupon |
amount | The discount amount |
sku | SKU associated with the coupon |
description | Coupon description text |
relatedProductIndex | Index of the product this coupon applies to |
Methods
| Method | Description |
|---|---|
typeToString() | Returns the coupon type as a user-friendly string |
Properties
couponType
val couponType: CouponType?
The type of coupon. See CouponType enum.
amount
val amount: FloatType?
The discount amount. See FloatType.
sku
val sku: StringType?
SKU associated with the coupon, if applicable.
description
val description: StringType?
Coupon description text as printed on the receipt.
relatedProductIndex
val relatedProductIndex: Int
Zero-based index into ScanResults.products() for the product this coupon applies to. Present only in the second constructor overload.
Methods
typeToString()
fun typeToString(): String?
Returns the coupon type as a user-friendly string.