Plan class final

Plan

You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. Plans define the base price, currency, and billing cycle for recurring purchases of products. [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).

Implemented types

Constructors

Plan({required bool active, InvoiceitemPlanAggregateUsage? aggregateUsage, int? amount, String? amountDecimal, required InvoiceitemPlanBillingScheme billingScheme, required DateTime created, required String currency, required String id, required InvoiceitemPlanInterval interval, required int intervalCount, required bool livemode, Map<String, String>? metadata, String? meter, String? nickname, InvoiceitemPlanProductOrId? product, List<PlanTier>? tiers, InvoiceitemPlanTiersMode? tiersMode, InvoiceitemPlanTransformUsage? transformUsage, int? trialPeriodDays, required InvoiceitemPlanUsageType usageType})
Plan
const
Plan.fromJson(Object? json)
factory

Properties

active bool
final
aggregateUsage InvoiceitemPlanAggregateUsage?
final
amount int?
final
amountDecimal String?
final
billingScheme InvoiceitemPlanBillingScheme
final
created DateTime
final
currency String
final
hashCode int
The hash code for this object.
no setterinherited
id String
The ID of the SubscriptionScheduleConfigurationItemPlan.
final
interval InvoiceitemPlanInterval
final
intervalCount int
final
livemode bool
final
metadata Map<String, String>?
final
meter String?
final
nickname String?
final
object String
The resource's type.
final
product InvoiceitemPlanProductOrId?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tiers List<PlanTier>?
final
tiersMode InvoiceitemPlanTiersMode?
final
transformUsage InvoiceitemPlanTransformUsage?
final
trialPeriodDays int?
final
usageType InvoiceitemPlanUsageType
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>(Plan instance, Encoder<V> encoder) → V
override