fromJson static method
Returns a new InvoicePaymentModel instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static InvoicePaymentModel? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return InvoicePaymentModel(
invoice: InvoiceModel.fromJson(json[r'invoice'])!,
payment: AvailablePaymentModel.fromJson(json[r'payment'])!,
value: mapValueOfType<double>(json, r'value')!,
);
}
return null;
}