Coupon constructor

const Coupon({
  1. int? amountOff,
  2. CouponAppliesTo? appliesTo,
  3. required DateTime created,
  4. String? currency,
  5. Map<String, CouponCurrencyOption>? currencyOptions,
  6. required CouponDuration duration,
  7. int? durationInMonths,
  8. required String id,
  9. required bool livemode,
  10. int? maxRedemptions,
  11. Map<String, String>? metadata,
  12. String? name,
  13. double? percentOff,
  14. DateTime? redeemBy,
  15. required int timesRedeemed,
  16. required bool valid,
})

Coupon

A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create\_charge) or [payment intents](https://stripe.com/docs/api/payment\_intents).

Implementation

const Coupon({
  this.amountOff,
  this.appliesTo,
  required this.created,
  this.currency,
  this.currencyOptions,
  required this.duration,
  this.durationInMonths,
  required this.id,
  required this.livemode,
  this.maxRedemptions,
  this.metadata,
  this.name,
  this.percentOff,
  this.redeemBy,
  required this.timesRedeemed,
  required this.valid,
});