fromJson static method
Returns a new AvailablePaymentModel instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static AvailablePaymentModel? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AvailablePaymentModel(
id: mapValueOfType<int>(json, r'id')!,
customerId: mapValueOfType<int>(json, r'customerId')!,
description: mapValueOfType<String>(json, r'description')!,
date: mapDateTime(json, r'date', r'')!,
value: mapValueOfType<double>(json, r'value')!,
availableValue: mapValueOfType<double>(json, r'availableValue')!,
paymentMethod: mapValueOfType<String>(json, r'paymentMethod')!,
);
}
return null;
}