SchemasCommercePlan class

Constructors

SchemasCommercePlan({required SchemasCommercePlanObjectEnum object, required String id, required String name, required CommerceMoneyResponse fee, required CommerceMoneyResponse annualMonthlyFee, required CommerceMoneyResponse annualFee, required int amount, required String amountFormatted, required int annualMonthlyAmount, required String annualMonthlyAmountFormatted, required int annualAmount, required String annualAmountFormatted, required String currencySymbol, required String currency, required String description, required String productId, required bool isDefault, required bool isRecurring, required bool publiclyVisible, required bool hasBaseFee, List<String> payerType = const [], required String forPayerType, required String slug, required String avatarUrl, String? period, int? interval, List<SchemasFeatureResponse> features = const [], bool? freeTrialEnabled, int? freeTrialDays})
Returns a new SchemasCommercePlan instance.

Properties

amount int
The amount in cents for the plan.
getter/setter pair
amountFormatted String
The formatted amount as a string (e.g., "$49.99").
getter/setter pair
annualAmount int
The total annual amount in cents.
getter/setter pair
annualAmountFormatted String
The formatted annual amount as a string.
getter/setter pair
annualFee CommerceMoneyResponse
getter/setter pair
annualMonthlyAmount int
The monthly amount in cents when billed annually.
getter/setter pair
annualMonthlyAmountFormatted String
The formatted annual monthly amount as a string.
getter/setter pair
annualMonthlyFee CommerceMoneyResponse
getter/setter pair
avatarUrl String
The URL of the plan's avatar image.
getter/setter pair
currency String
The currency code (e.g., "USD").
getter/setter pair
currencySymbol String
The currency symbol (e.g., "$").
getter/setter pair
description String
The description of the commerce plan.
getter/setter pair
features List<SchemasFeatureResponse>
The features included in this plan.
getter/setter pair
fee CommerceMoneyResponse
getter/setter pair
forPayerType String
The payer type this plan is designed for.
getter/setter pair
freeTrialDays int?
Number of free trial days for this plan.
getter/setter pair
freeTrialEnabled bool?
Whether free trial is enabled for this plan.
getter/setter pair
hasBaseFee bool
Whether this plan has a base fee.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
Unique identifier for the commerce plan.
getter/setter pair
interval int?
The billing interval.
getter/setter pair
isDefault bool
Whether this is the default plan.
getter/setter pair
isRecurring bool
Whether this is a recurring plan.
getter/setter pair
name String
The name of the commerce plan.
getter/setter pair
object SchemasCommercePlanObjectEnum
String representing the object's type. Objects of the same type share the same value.
getter/setter pair
payerType List<String>
The types of payers that can use this plan.
getter/setter pair
period String?
The billing period for the plan.
getter/setter pair
productId String
The ID of the product this plan belongs to.
getter/setter pair
publiclyVisible bool
Whether this plan is publicly visible.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slug String
The URL-friendly slug for the plan.
getter/setter pair

Methods

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

Operators

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

Static Methods

fromJson(dynamic value) SchemasCommercePlan?
Returns a new SchemasCommercePlan instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<SchemasCommercePlan>
mapFromJson(dynamic json) Map<String, SchemasCommercePlan>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<SchemasCommercePlan>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.