Coupon constructor
const
Coupon({
- int? amountOff,
- CouponAppliesTo? appliesTo,
- required DateTime created,
- String? currency,
- Map<
String, CouponCurrencyOption> ? currencyOptions, - required CouponDuration duration,
- int? durationInMonths,
- required String id,
- required bool livemode,
- int? maxRedemptions,
- Map<
String, String> ? metadata, - String? name,
- double? percentOff,
- DateTime? redeemBy,
- required int timesRedeemed,
- 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,
});