Discount class final
Discount
A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
- Implemented types
Constructors
- Discount({String? checkoutSession, required Coupon coupon, BankAccountCustomerOrId? customer, DateTime? end, required String id, String? invoice, String? invoiceItem, PromotionCodeOrId? promotionCode, required DateTime start, String? subscription})
-
Discount
const
- Discount.fromJson(Object? json)
-
factory
Properties
- checkoutSession → String?
-
final
- coupon → Coupon
-
final
- customer → BankAccountCustomerOrId?
-
final
- end → DateTime?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The ID of the Discount.
final
- invoice → String?
-
final
- invoiceItem → String?
-
final
- object → String
-
final
- promotionCode → PromotionCodeOrId?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → DateTime
-
final
- subscription → String?
-
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