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'name'] = this.name;
  json[r'fee'] = this.fee;
  json[r'annual_monthly_fee'] = this.annualMonthlyFee;
  json[r'annual_fee'] = this.annualFee;
  json[r'amount'] = this.amount;
  json[r'amount_formatted'] = this.amountFormatted;
  json[r'annual_monthly_amount'] = this.annualMonthlyAmount;
  json[r'annual_monthly_amount_formatted'] =
      this.annualMonthlyAmountFormatted;
  json[r'annual_amount'] = this.annualAmount;
  json[r'annual_amount_formatted'] = this.annualAmountFormatted;
  json[r'currency_symbol'] = this.currencySymbol;
  json[r'currency'] = this.currency;
  json[r'description'] = this.description;
  json[r'product_id'] = this.productId;
  json[r'is_default'] = this.isDefault;
  json[r'is_recurring'] = this.isRecurring;
  json[r'publicly_visible'] = this.publiclyVisible;
  json[r'has_base_fee'] = this.hasBaseFee;
  json[r'payer_type'] = this.payerType;
  json[r'for_payer_type'] = this.forPayerType;
  json[r'slug'] = this.slug;
  json[r'avatar_url'] = this.avatarUrl;
  if (this.period != null) {
    json[r'period'] = this.period;
  } else {
    json[r'period'] = null;
  }
  if (this.interval != null) {
    json[r'interval'] = this.interval;
  } else {
    json[r'interval'] = null;
  }
  json[r'features'] = this.features;
  if (this.freeTrialEnabled != null) {
    json[r'free_trial_enabled'] = this.freeTrialEnabled;
  } else {
    json[r'free_trial_enabled'] = null;
  }
  if (this.freeTrialDays != null) {
    json[r'free_trial_days'] = this.freeTrialDays;
  } else {
    json[r'free_trial_days'] = null;
  }
  return json;
}