getPaymentDiscount static method
iOS only. Use this function to retrieve the PurchasesPaymentDiscount
for a given PurchasesPackage
.
Returns a PaymentDiscount
object. Pass this object
to purchaseDiscountedProduct or purchaseDiscountedPackage to complete
the purchase. A null PaymentDiscount means
product
The Product
the user intends to purchase.
discount
The Discount
to apply to the product.
Implementation
static Future<rc.PaymentDiscount> getPaymentDiscount(
rc.Product product, rc.Discount discount) async {
return rc.Purchases.getPaymentDiscount(product, discount);
}