copyWith method
SubscriptionModel
copyWith({
- String? id,
- bool? suspended,
- String? planIdentifier,
- int? priceCents,
- String? currency,
- SubscriptionFeatures? features,
- Object? expiresAt,
- String? createdAt,
- String? updatedAt,
- String? customerName,
- String? customerEmail,
- Object? cycledAt,
- int? creditsMin,
- Object? creditsCycle,
- String? customerId,
- String? planName,
- String? customerRef,
- String? planRef,
- bool? active,
- Object? inTrial,
- int? credits,
- bool? creditsBased,
- Object? recentInvoices,
- List<
SubscriptionSubitem> ? subitems, - List<
SubscriptionLog> ? logs, - List<
CustomVariables> ? customVariables,
Implementation
SubscriptionModel copyWith({
String? id,
bool? suspended,
String? planIdentifier,
int? priceCents,
String? currency,
SubscriptionFeatures? features,
Object? expiresAt,
String? createdAt,
String? updatedAt,
String? customerName,
String? customerEmail,
Object? cycledAt,
int? creditsMin,
Object? creditsCycle,
String? customerId,
String? planName,
String? customerRef,
String? planRef,
bool? active,
Object? inTrial,
int? credits,
bool? creditsBased,
Object? recentInvoices,
List<SubscriptionSubitem>? subitems,
List<SubscriptionLog>? logs,
List<CustomVariables>? customVariables,
}) {
return SubscriptionModel(
id: id ?? this.id,
suspended: suspended ?? this.suspended,
planIdentifier: planIdentifier ?? this.planIdentifier,
priceCents: priceCents ?? this.priceCents,
currency: currency ?? this.currency,
features: features ?? this.features,
expiresAt: expiresAt ?? this.expiresAt,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
customerName: customerName ?? this.customerName,
customerEmail: customerEmail ?? this.customerEmail,
cycledAt: cycledAt ?? this.cycledAt,
creditsMin: creditsMin ?? this.creditsMin,
creditsCycle: creditsCycle ?? this.creditsCycle,
customerId: customerId ?? this.customerId,
planName: planName ?? this.planName,
customerRef: customerRef ?? this.customerRef,
planRef: planRef ?? this.planRef,
active: active ?? this.active,
inTrial: inTrial ?? this.inTrial,
credits: credits ?? this.credits,
creditsBased: creditsBased ?? this.creditsBased,
recentInvoices: recentInvoices ?? this.recentInvoices,
subitems: subitems ?? this.subitems,
logs: logs ?? this.logs,
customVariables: customVariables ?? this.customVariables,
);
}