copyWith method

SubscriptionModel copyWith({
  1. String? id,
  2. bool? suspended,
  3. String? planIdentifier,
  4. int? priceCents,
  5. String? currency,
  6. SubscriptionFeatures? features,
  7. Object? expiresAt,
  8. String? createdAt,
  9. String? updatedAt,
  10. String? customerName,
  11. String? customerEmail,
  12. Object? cycledAt,
  13. int? creditsMin,
  14. Object? creditsCycle,
  15. String? customerId,
  16. String? planName,
  17. String? customerRef,
  18. String? planRef,
  19. bool? active,
  20. Object? inTrial,
  21. int? credits,
  22. bool? creditsBased,
  23. Object? recentInvoices,
  24. List<SubscriptionSubitem>? subitems,
  25. List<SubscriptionLog>? logs,
  26. 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,
  );
}