LokotroPaymentSubmitResponse.fromJson constructor
LokotroPaymentSubmitResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory LokotroPaymentSubmitResponse.fromJson(Map<String, dynamic> json) {
final data = json['data'] as Map<String, dynamic>;
return LokotroPaymentSubmitResponse(
success: data['success'] as bool? ?? false,
status: data['status'] as String,
requiresOtp: data['requires_otp'] as bool? ?? false,
otpSentTo: data['otp_sent_to'] as String?,
estimatedCompletion: data['estimated_completion'] as String?,
systemRef: data['system_ref'] as String?,
onafriqReference: data['onafriq_reference'] as String?,
onafriqStatus: data['onafriq_status'] as String?,
phoneNumber: data['phone_number'] as String?,
processingFee: (data['processing_fee'] as num?)?.toDouble(),
totalAmount: (data['total_amount'] as num?)?.toDouble(),
message: json['message'] as String,
);
}