toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'plan'] = this.plan;
  json[r'purchase_source'] = this.purchaseSource;
  json[r'status'] = this.status;
  json[r'current_period_start'] =
      this.currentPeriodStart.toUtc().toIso8601String();
  json[r'current_period_end'] =
      this.currentPeriodEnd.toUtc().toIso8601String();
  json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  if (this.cancelledAt != null) {
    json[r'cancelled_at'] = this.cancelledAt!.toUtc().toIso8601String();
  } else {
    json[r'cancelled_at'] = null;
  }
  return json;
}