toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.feedbackId != null) {
json[r'feedback_id'] = this.feedbackId;
} else {
json[r'feedback_id'] = null;
}
if (this.created != null) {
json[r'created'] = this.created!.toUtc().toIso8601String();
} else {
json[r'created'] = null;
}
if (this.modified != null) {
json[r'modified'] = this.modified!.toUtc().toIso8601String();
} else {
json[r'modified'] = null;
}
if (this.deletedAt != null) {
json[r'deleted_at'] = this.deletedAt!.toUtc().toIso8601String();
} else {
json[r'deleted_at'] = null;
}
json[r'num_weeks'] = this.numWeeks;
json[r'start_date'] = this.startDate.toUtc().toIso8601String();
json[r'end_date'] = this.endDate.toUtc().toIso8601String();
json[r'weekly_price_cents'] = this.weeklyPriceCents;
if (this.timeZone != null) {
json[r'time_zone'] = this.timeZone;
} else {
json[r'time_zone'] = null;
}
if (this.stripeCheckoutSessionId != null) {
json[r'stripe_checkout_session_id'] = this.stripeCheckoutSessionId;
} else {
json[r'stripe_checkout_session_id'] = null;
}
if (this.stripeSubscriptionScheduledId != null) {
json[r'stripe_subscription_scheduled_id'] = this.stripeSubscriptionScheduledId;
} else {
json[r'stripe_subscription_scheduled_id'] = null;
}
if (this.stripeSubscriptionId != null) {
json[r'stripe_subscription_id'] = this.stripeSubscriptionId;
} else {
json[r'stripe_subscription_id'] = null;
}
if (this.cancelAt != null) {
json[r'cancel_at'] = this.cancelAt!.toUtc().toIso8601String();
} else {
json[r'cancel_at'] = null;
}
if (this.canceledAt != null) {
json[r'canceled_at'] = this.canceledAt!.toUtc().toIso8601String();
} else {
json[r'canceled_at'] = null;
}
if (this.cancelAtPeriodEnd != null) {
json[r'cancel_at_period_end'] = this.cancelAtPeriodEnd;
} else {
json[r'cancel_at_period_end'] = null;
}
json[r'subscription_status'] = this.subscriptionStatus;
if (this.serialCourse != null) {
json[r'serial_course'] = this.serialCourse;
} else {
json[r'serial_course'] = null;
}
if (this.customer != null) {
json[r'customer'] = this.customer;
} else {
json[r'customer'] = null;
}
if (this.chat != null) {
json[r'chat'] = this.chat;
} else {
json[r'chat'] = null;
}
return json;
}