toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'organizationId'] = this.organizationId;
    json[r'productId'] = this.productId;
    json[r'totalSeats'] = this.totalSeats;
    json[r'seatsUsed'] = this.seatsUsed;
    json[r'status'] = this.status;
    json[r'startDate'] = this.startDate;
  if (this.endDate != null) {
    json[r'endDate'] = this.endDate;
  } else {
    json[r'endDate'] = null;
  }
  if (this.pricePerSeat != null) {
    json[r'pricePerSeat'] = this.pricePerSeat;
  } else {
    json[r'pricePerSeat'] = null;
  }
  if (this.billingCycle != null) {
    json[r'billingCycle'] = this.billingCycle;
  } else {
    json[r'billingCycle'] = null;
  }
  if (this.providerType != null) {
    json[r'providerType'] = this.providerType;
  } else {
    json[r'providerType'] = null;
  }
  if (this.providerSubscriptionId != null) {
    json[r'providerSubscriptionId'] = this.providerSubscriptionId;
  } else {
    json[r'providerSubscriptionId'] = null;
  }
  if (this.providerPlanId != null) {
    json[r'providerPlanId'] = this.providerPlanId;
  } else {
    json[r'providerPlanId'] = null;
  }
  if (this.paymentStatus != null) {
    json[r'paymentStatus'] = this.paymentStatus;
  } else {
    json[r'paymentStatus'] = null;
  }
  if (this.nextBillingDate != null) {
    json[r'nextBillingDate'] = this.nextBillingDate;
  } else {
    json[r'nextBillingDate'] = null;
  }
  if (this.lastPaymentDate != null) {
    json[r'lastPaymentDate'] = this.lastPaymentDate;
  } else {
    json[r'lastPaymentDate'] = null;
  }
  if (this.paypalSubscriptionId != null) {
    json[r'paypalSubscriptionId'] = this.paypalSubscriptionId;
  } else {
    json[r'paypalSubscriptionId'] = null;
  }
  if (this.paypalPlanId != null) {
    json[r'paypalPlanId'] = this.paypalPlanId;
  } else {
    json[r'paypalPlanId'] = null;
  }
  if (this.metadata != null) {
    json[r'metadata'] = this.metadata;
  } else {
    json[r'metadata'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt;
  } else {
    json[r'createdAt'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updatedAt'] = this.updatedAt;
  } else {
    json[r'updatedAt'] = null;
  }
  return json;
}