You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uco-mobile-poc/lib/app/models/create_transition_otp_model...

52 lines
1.5 KiB
Dart

import 'dart:convert';
class CreateTransactionPinRequest {
String newTransPincode;
String channelCode;
String pctCstycode;
String porOrgacode;
String cmpCustcode;
bool isOtpRequired;
String pinType;
CreateTransactionPinRequest({
required this.newTransPincode,
required this.channelCode,
required this.pctCstycode,
required this.porOrgacode,
required this.cmpCustcode,
required this.isOtpRequired,
required this.pinType,
});
Map<String, dynamic> toMap() {
final result = <String, dynamic>{};
result.addAll({'newTransPincode': newTransPincode});
result.addAll({'channelCode': channelCode});
result.addAll({'pctCstycode': pctCstycode});
result.addAll({'porOrgacode': porOrgacode});
result.addAll({'cmpCustcode': cmpCustcode});
result.addAll({'isOtpRequired': isOtpRequired});
result.addAll({'pinType': pinType});
return result;
}
factory CreateTransactionPinRequest.fromMap(Map<String, dynamic> map) {
return CreateTransactionPinRequest(
newTransPincode: map['newTransPincode'] ?? '',
channelCode: map['channelCode'] ?? '',
pctCstycode: map['pctCstycode'] ?? '',
porOrgacode: map['porOrgacode'] ?? '',
cmpCustcode: map['cmpCustcode'] ?? '',
isOtpRequired: map['isOtpRequired'] ?? false,
pinType: map['pinType'] ?? '',
);
}
String toJson() => json.encode(toMap());
factory CreateTransactionPinRequest.fromJson(String source) =>
CreateTransactionPinRequest.fromMap(json.decode(source));
}