toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'object'] = this.object;
  json[r'id'] = this.id;
  json[r'instance_id'] = this.instanceId;
  json[r'status'] = this.status;
  json[r'payer_id'] = this.payerId;
  json[r'created_at'] = this.createdAt;
  json[r'updated_at'] = this.updatedAt;
  if (this.activeAt != null) {
    json[r'active_at'] = this.activeAt;
  } else {
    json[r'active_at'] = null;
  }
  if (this.pastDueAt != null) {
    json[r'past_due_at'] = this.pastDueAt;
  } else {
    json[r'past_due_at'] = null;
  }
  json[r'subscription_items'] = this.subscriptionItems;
  if (this.nextPayment != null) {
    json[r'next_payment'] = this.nextPayment;
  } else {
    json[r'next_payment'] = null;
  }
  if (this.eligibleForFreeTrial != null) {
    json[r'eligible_for_free_trial'] = this.eligibleForFreeTrial;
  } else {
    json[r'eligible_for_free_trial'] = null;
  }
  return json;
}