PriceCustomUnitAmount.fromJson constructor
PriceCustomUnitAmount.fromJson(
- Object? json
Implementation
factory PriceCustomUnitAmount.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PriceCustomUnitAmount(
enabled: (map['enabled'] as bool),
maximum: map['maximum'] == null ? null : (map['maximum'] as num).toInt(),
minimum: map['minimum'] == null ? null : (map['minimum'] as num).toInt(),
preset: map['preset'] == null ? null : (map['preset'] as num).toInt(),
);
}