PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown.fromJson constructor

PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown.fromJson(
    Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown(
    discounts: (map['discounts'] as List<Object?>)
        .map((el) => LineItemsDiscountAmount.fromJson(el))
        .toList(),
    taxes: (map['taxes'] as List<Object?>)
        .map((el) => LineItemsTaxAmount.fromJson(el))
        .toList(),
  );
}