ProductDiscount.fromAndroidParams constructor
ProductDiscount.fromAndroidParams()
Implementation
ProductDiscount.fromAndroidParams(
int? price, String? priceCurrency, String? period, int? cycles)
: discountId = "",
discountPrice = price,
discountPriceCurrency = priceCurrency,
discountPeriod = period,
discountCycle = cycles,
//如果周期大于1那就是随用随付,等于1就是一次性付款了
discountPaymentModel = (cycles != null && cycles > 1) ? 0 : 1;