fetch method
Future<Response<RazorpayIin> >
fetch({
- required String tokenIin,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayIin> ?
Fetch the properties of the card using token IIN
@param tokenIin - The token IIN.
Implementation
Future<Response<RazorpayIin>> fetch({
required String tokenIin,
void Function(RazorpayApiException?, Response<RazorpayIin>?)? callback,
}) async {
if (tokenIin.isEmpty) {
throw ArgumentError('tokenIin is required');
}
return api.get<RazorpayIin>(
{'url': '$BASE_URL/$tokenIin'},
fromJsonFactory: RazorpayIin.fromJson,
callback: callback,
);
}