QuotesResourceUpfront.fromJson constructor

QuotesResourceUpfront.fromJson(
  1. Object? json
)

Implementation

factory QuotesResourceUpfront.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return QuotesResourceUpfront(
    amountSubtotal: (map['amount_subtotal'] as num).toInt(),
    amountTotal: (map['amount_total'] as num).toInt(),
    lineItems: map['line_items'] == null
        ? null
        : CheckoutSessionLineItems.fromJson(map['line_items']),
    totalDetails: QuotesResourceTotalDetails.fromJson(map['total_details']),
  );
}