175 lines
4.7 KiB
Dart
175 lines
4.7 KiB
Dart
import 'dart:developer';
|
|
import 'package:dio/dio.dart';
|
|
|
|
class DepositService{
|
|
final Dio _dio;
|
|
|
|
DepositService(this._dio);
|
|
|
|
Future<dynamic> fetchaccountdetails({
|
|
required String accountno,
|
|
}) async {
|
|
try {
|
|
final response = await _dio.post(
|
|
"/api/deposit/req/deposit",
|
|
data: {
|
|
'accountNo': accountno,
|
|
},
|
|
options: Options(
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
),
|
|
);
|
|
|
|
log("PMY Details Response: ${response.data}");
|
|
|
|
if (response.statusCode == 200) {
|
|
return response.data;
|
|
} else {
|
|
throw Exception("INTERNAL SERVER ERROR");
|
|
}
|
|
} catch (e) {
|
|
log("Error fetching Account details: $e");
|
|
return null;
|
|
}
|
|
}
|
|
|
|
Future createFdTd({
|
|
String? fromacctno,
|
|
String? cifNo,
|
|
String? idno,
|
|
String? customername,
|
|
String? nationality,
|
|
String? addressline1,
|
|
String? addressline2,
|
|
String? pincode,
|
|
String? product,
|
|
String? type,
|
|
String? customercategory,
|
|
String? termlocation,
|
|
String? currency,
|
|
String? acctsgmtcode,
|
|
String? interestpaymentmethod,
|
|
String? taxfilenumberindicator,
|
|
String? termlenght,
|
|
String? termbasis,
|
|
String? termvaluedeposited,
|
|
String? interestfrequency,
|
|
String? termdays,
|
|
String? termmonths,
|
|
String? termyears,
|
|
String? nominationRequired,
|
|
String? printNomineename,
|
|
required String tpin,
|
|
}) async {
|
|
final response = await _dio.post(
|
|
'/api/deposit/create/fd-td',
|
|
options: Options(
|
|
validateStatus: (int? status) => true,
|
|
receiveDataWhenStatusError: true,
|
|
),
|
|
data: {
|
|
"fromacctno": fromacctno,
|
|
"cifNo": cifNo,
|
|
"idno": idno,
|
|
"customername": customername,
|
|
"nationality": nationality,
|
|
"addressline1": addressline1,
|
|
"addressline2": addressline2,
|
|
"pincode": pincode,
|
|
"product": product,
|
|
"type": type,
|
|
"customercategory": customercategory,
|
|
"termlocation": termlocation,
|
|
"currency": currency,
|
|
"acctsgmtcode": acctsgmtcode,
|
|
"interestpaymentmethod": interestpaymentmethod,
|
|
"taxfilenumberindicator": taxfilenumberindicator,
|
|
"termlenght": termlenght,
|
|
"termbasis": termbasis,
|
|
"termvaluedeposited": termvaluedeposited,
|
|
"interestfrequency": interestfrequency,
|
|
"termdays": termdays,
|
|
"termmonths": termmonths,
|
|
"termyears": termyears,
|
|
"nominationRequired": nominationRequired,
|
|
"printNomineename": printNomineename,
|
|
'tpin': tpin,
|
|
},
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
Future createRd({
|
|
String? fromacctno,
|
|
String? cifNo,
|
|
String? idno,
|
|
String? customername,
|
|
String? nationality,
|
|
String? addressline1,
|
|
String? addressline2,
|
|
String? pincode,
|
|
String? product,
|
|
String? type,
|
|
String? customercategory,
|
|
String? termlocation,
|
|
String? currency,
|
|
String? acctsgmtcode,
|
|
String? interestpaymentmethod,
|
|
String? taxfilenumberindicator,
|
|
String? termlenght,
|
|
String? termbasis,
|
|
String? termvaluedeposited,
|
|
String? interestfrequency,
|
|
String? termdays,
|
|
String? termmonths,
|
|
String? termyears,
|
|
String? nominationRequired,
|
|
String? printNomineename,
|
|
String? rdinstallmentvalue,
|
|
String? monthlyRDInstallmentdueday,
|
|
String? rdInstlFreq,
|
|
required String tpin,
|
|
}) async {
|
|
final response = await _dio.post(
|
|
'/api/deposit/create/rd',
|
|
options: Options(
|
|
validateStatus: (int? status) => true,
|
|
receiveDataWhenStatusError: true,
|
|
),
|
|
data: {
|
|
"fromacctno": fromacctno,
|
|
"cifNo": cifNo,
|
|
"idno": idno,
|
|
"customername": customername,
|
|
"nationality": nationality,
|
|
"addressline1": addressline1,
|
|
"addressline2": addressline2,
|
|
"pincode": pincode,
|
|
"product": product,
|
|
"type": type,
|
|
"customercategory": customercategory,
|
|
"termlocation": termlocation,
|
|
"currency": currency,
|
|
"acctsgmtcode": acctsgmtcode,
|
|
"interestpaymentmethod": interestpaymentmethod,
|
|
"taxfilenumberindicator": taxfilenumberindicator,
|
|
"termlenght": termlenght,
|
|
"termbasis": termbasis,
|
|
"termvaluedeposited": termvaluedeposited,
|
|
"interestfrequency": interestfrequency,
|
|
"termdays": termdays,
|
|
"termmonths": termmonths,
|
|
"termyears": termyears,
|
|
"nominationRequired": nominationRequired,
|
|
"printNomineename": printNomineename,
|
|
"rdinstallmentvalue": rdinstallmentvalue,
|
|
"monthlyRDInstallmentdueday": monthlyRDInstallmentdueday,
|
|
"rdInstlFreq": rdInstlFreq,
|
|
'tpin': tpin,
|
|
},
|
|
);
|
|
return response.data;
|
|
}
|
|
} |