QuoteUpdateOptionsLineItemsItem.fromJson constructor

QuoteUpdateOptionsLineItemsItem.fromJson(
  1. Object? json
)

Implementation

factory QuoteUpdateOptionsLineItemsItem.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return QuoteUpdateOptionsLineItemsItem(
    id: map['id'] == null ? null : (map['id'] as String),
    price: map['price'] == null ? null : (map['price'] as String),
    priceData: map['price_data'] == null
        ? null
        : QuotePriceData.fromJson(map['price_data']),
    quantity:
        map['quantity'] == null ? null : (map['quantity'] as num).toInt(),
    taxRates: map['tax_rates'] == null
        ? null
        : (map['tax_rates'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
  );
}