PromotionCode class final
PromotionCode
A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to create multiple codes for a single coupon.
- Implemented types
Constructors
-
PromotionCode({required bool active, required String code, required Coupon coupon, required DateTime created, BankAccountCustomerOrId? customer, DateTime? expiresAt, required String id, required bool livemode, int? maxRedemptions, Map<
String, String> ? metadata, required PromotionCodesResourceRestrictions restrictions, required int timesRedeemed}) -
PromotionCode
const
- PromotionCode.fromJson(Object? json)
-
factory
Properties
- active → bool
-
final
- code → String
-
final
- coupon → Coupon
-
final
- created → DateTime
-
final
- customer → BankAccountCustomerOrId?
-
final
- expiresAt → DateTime?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The ID of the PromotionCode.
final
- livemode → bool
-
final
- maxRedemptions → int?
-
final
-
metadata
→ Map<
String, String> ? -
final
- object → String
-
The resource's type.
final
- restrictions → PromotionCodesResourceRestrictions
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timesRedeemed → int
-
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> (PromotionCode instance, Encoder< V> encoder) → V -
override