DiscountsResourceDiscountAmount.fromJson constructor

DiscountsResourceDiscountAmount.fromJson(
  1. Object? json
)

Implementation

factory DiscountsResourceDiscountAmount.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return DiscountsResourceDiscountAmount(
    amount: (map['amount'] as num).toInt(),
    discount:
        DiscountsResourceDiscountAmountDiscountOrId.fromJson(map['discount']),
  );
}