Subscription constructor
const
Subscription({
- BillingPortalConfigurationApplicationOrId? application,
- double? applicationFeePercent,
- required SubscriptionAutomaticTax automaticTax,
- required DateTime billingCycleAnchor,
- SubscriptionBillingCycleAnchorConfig? billingCycleAnchorConfig,
- SubscriptionBillingThresholds? billingThresholds,
- DateTime? cancelAt,
- required bool cancelAtPeriodEnd,
- DateTime? canceledAt,
- CancellationDetails? cancellationDetails,
- required InvoiceCollectionMethod collectionMethod,
- required DateTime created,
- required String currency,
- required DateTime currentPeriodEnd,
- required DateTime currentPeriodStart,
- required BankAccountCustomerOrId customer,
- int? daysUntilDue,
- PaymentMethodOrId? defaultPaymentMethod,
- PaymentSourceOrId? defaultSource,
- List<
TaxRate> ? defaultTaxRates, - String? description,
- Discount? discount,
- DateTime? endedAt,
- required String id,
- required SubscriptionItems items,
- InvoiceOrId? latestInvoice,
- required bool livemode,
- required Map<
String, String> metadata, - DateTime? nextPendingInvoiceItemInvoice,
- AccountOrId? onBehalfOf,
- SubscriptionPauseCollection? pauseCollection,
- SubscriptionPaymentSettings? paymentSettings,
- SubscriptionPendingInvoiceItemInterval? pendingInvoiceItemInterval,
- SetupIntentOrId? pendingSetupIntent,
- SubscriptionPendingUpdate? pendingUpdate,
- SubscriptionScheduleOrId? schedule,
- required DateTime startDate,
- required SubscriptionStatus status,
- TestHelpersTestClockOrId? testClock,
- SubscriptionTransferData? transferData,
- DateTime? trialEnd,
- PaymentLinkSubscriptionDataTrialSettings? trialSettings,
- DateTime? trialStart,
Subscription
Subscriptions allow you to charge a customer on a recurring basis. Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
Implementation
const Subscription({
this.application,
this.applicationFeePercent,
required this.automaticTax,
required this.billingCycleAnchor,
this.billingCycleAnchorConfig,
this.billingThresholds,
this.cancelAt,
required this.cancelAtPeriodEnd,
this.canceledAt,
this.cancellationDetails,
required this.collectionMethod,
required this.created,
required this.currency,
required this.currentPeriodEnd,
required this.currentPeriodStart,
required this.customer,
this.daysUntilDue,
this.defaultPaymentMethod,
this.defaultSource,
this.defaultTaxRates,
this.description,
this.discount,
this.endedAt,
required this.id,
required this.items,
this.latestInvoice,
required this.livemode,
required this.metadata,
this.nextPendingInvoiceItemInvoice,
this.onBehalfOf,
this.pauseCollection,
this.paymentSettings,
this.pendingInvoiceItemInterval,
this.pendingSetupIntent,
this.pendingUpdate,
this.schedule,
required this.startDate,
required this.status,
this.testClock,
this.transferData,
this.trialEnd,
this.trialSettings,
this.trialStart,
});