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.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'stripe_token'] = this.stripeToken;
if (this.stripeId != null) {
json[r'stripe_id'] = this.stripeId;
} else {
json[r'stripe_id'] = null;
}
if (this.last4 != null) {
json[r'last4'] = this.last4;
} else {
json[r'last4'] = null;
}
if (this.brand != null) {
json[r'brand'] = this.brand;
} else {
json[r'brand'] = null;
}
if (this.country != null) {
json[r'country'] = this.country;
} else {
json[r'country'] = null;
}
if (this.expMonth != null) {
json[r'exp_month'] = this.expMonth;
} else {
json[r'exp_month'] = null;
}
if (this.expYear != null) {
json[r'exp_year'] = this.expYear;
} else {
json[r'exp_year'] = null;
}
if (this.isDefault != null) {
json[r'is_default'] = this.isDefault;
} else {
json[r'is_default'] = null;
}
if (this.isActive != null) {
json[r'is_active'] = this.isActive;
} else {
json[r'is_active'] = null;
}
json[r'user'] = this.user;
return json;
}