toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'plan'] = this.plan;
  json[r'payment_method'] = this.paymentMethod;
  json[r'tos_accepted'] = this.tosAccepted;
  if (this.customerId != null) {
    json[r'customer_id'] = this.customerId;
  } else {
    json[r'customer_id'] = null;
  }
  if (this.subscriptionId != null) {
    json[r'subscription_id'] = this.subscriptionId;
  } else {
    json[r'subscription_id'] = null;
  }
  if (this.clientSecret != null) {
    json[r'client_secret'] = this.clientSecret;
  } else {
    json[r'client_secret'] = null;
  }
  return json;
}