Coupon class final

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).

Implemented types

Constructors

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
const
Coupon.fromJson(Object? json)
factory

Properties

amountOff int?
final
appliesTo CouponAppliesTo?
final
created DateTime
final
currency String?
final
currencyOptions Map<String, CouponCurrencyOption>?
final
duration CouponDuration
final
durationInMonths int?
final
hashCode int
The hash code for this object.
no setterinherited
id String
The ID of the SubscriptionSchedulePhaseConfigurationCoupon.
final
livemode bool
final
maxRedemptions int?
final
metadata Map<String, String>?
final
name String?
final
object String
The resource's type.
final
percentOff double?
final
redeemBy DateTime?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timesRedeemed int
final
valid bool
final

Methods

encodeWith<V>(Encoder<V> encoder) → V
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

encode<V>(Coupon instance, Encoder<V> encoder) → V
override