InvoiceSettingSubscriptionSchedulePhaseSetting.fromJson constructor

InvoiceSettingSubscriptionSchedulePhaseSetting.fromJson(
  1. Object? json
)

Implementation

factory InvoiceSettingSubscriptionSchedulePhaseSetting.fromJson(
    Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InvoiceSettingSubscriptionSchedulePhaseSetting(
    accountTaxIds: map['account_tax_ids'] == null
        ? null
        : (map['account_tax_ids'] as List<Object?>)
            .map((el) => InvoiceAccountTaxIdsItemOrId.fromJson(el))
            .toList(),
    daysUntilDue: map['days_until_due'] == null
        ? null
        : (map['days_until_due'] as num).toInt(),
    issuer: map['issuer'] == null
        ? null
        : ConnectAccountReference.fromJson(map['issuer']),
  );
}