SubscriptionScheduleCancelOptions.fromJson constructor

SubscriptionScheduleCancelOptions.fromJson(
  1. Object? json
)

Implementation

factory SubscriptionScheduleCancelOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SubscriptionScheduleCancelOptions(
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    invoiceNow:
        map['invoice_now'] == null ? null : (map['invoice_now'] as bool),
    prorate: map['prorate'] == null ? null : (map['prorate'] as bool),
  );
}