SubscriptionPlan class

A single subscription plan returned by the MoneyHash API.

Constructors

SubscriptionPlan.new({String? id, String? name, String? description, String? currency, double? amount, double? oneTimeFee, int? recurrency, String? recurrencyUnit, int? recurringCycles, int? trialPeriod, double? discountAmount, double? discountPercentage, int? discountCycles, bool? isLive, bool? alreadySubscribed, String? created})
const
SubscriptionPlan.fromJson(dynamic data)
Create a SubscriptionPlan from JSON.
factory

Properties

alreadySubscribed bool?
true if the customer already has an active subscription to this plan.
final
amount double?
Charge amount.
final
created String?
Time when the plan was created.
final
currency String?
The plan currency.
final
description String?
Description of the plan.
final
discountAmount double?
Flat discount applied.
final
discountCycles int?
Number of cycles for which the discount applies.
final
discountPercentage double?
Percentage discount applied.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Unique identifier of the plan.
final
isLive bool?
Indicates whether the plan is live or not.
final
name String?
Name of the plan.
final
oneTimeFee double?
One-time onboarding or setup fee.
final
recurrency int?
How often the plan recurs.
final
recurrencyUnit String?
Cycle unit for recurrency.
final
recurringCycles int?
Total number of recurring cycles.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trialPeriod int?
Free-trial duration.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert this object to JSON, preserving the API’s snake-case keys.
toString() String
A string representation of this object.
inherited

Operators

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