mSitefMenu method
Implementation
Future<TefTransactionResponseMSitef?> mSitefMenu({
required String ipSitef,
required String storeId,
required String terminalId,
required String companyDocument,
required String comExternal,
required String isDoubleValidation,
required String otp,
required String enabledTransactions,
required String automationDocument,
}) async {
try {
Map<String, dynamic> lineToMethodChannel({
String? ipSitef,
String? storeId,
String? terminalId,
String? companyDocument,
String? comExternal,
String? isDoubleValidation,
String? otp,
String? enabledTransactions,
String? automationDocument,
}) {
return {
'ipSitef': ipSitef,
'storeId': storeId,
'terminalId': terminalId,
'companyDocument': companyDocument,
'comExternal': comExternal,
'isDoubleValidation': isDoubleValidation,
'otp': otp,
'enabledTransactions': enabledTransactions,
'automationDocument': automationDocument,
};
}
final paramsTransaction = lineToMethodChannel(
ipSitef: ipSitef,
storeId: storeId,
terminalId: terminalId,
companyDocument: companyDocument,
comExternal: comExternal,
isDoubleValidation: isDoubleValidation,
otp: otp,
enabledTransactions: enabledTransactions,
automationDocument: automationDocument,
);
final resultTransaction = await channel.invokeMethod(
'menuMSitef',
paramsTransaction,
);
final resultJson = json.decode(resultTransaction);
final model = TefTransactionModel.fromMap(resultJson);
return _fetchTefTransactionResponse(
model: model,
);
} catch (e) {
return null;
}
}