toJson method

Map<String, String> toJson()

Implementation

Map<String, String> toJson() {
  // only push to the Map if the value is not null
  return <String, String>{
    'req_id': req_id,
    'client_id': client_id,
    'amount': amount.toString(),
    'description': description,
    'notification_url': notification_url,
    'expiry': expiry.toString(),
    'email': email ?? '',
    'contact': contact ?? '',
    'name': name ?? '',
    'redirect_url': redirect_url ?? '',
    'param1': param1 ?? '',
    'param2': param2 ?? '',
  };
}