fetch method
Future<Response<RazorpayPaymentLink> >
fetch({
- required String paymentLinkId,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayPaymentLink> ?
Fetch a paymentLink given paymentLink ID
@param paymentLinkId - The unique identifier of the paymentlink.
Implementation
Future<Response<RazorpayPaymentLink>> fetch({
required String paymentLinkId,
void Function(RazorpayApiException?, Response<RazorpayPaymentLink>?)?
callback,
}) async {
if (paymentLinkId.isEmpty) {
throw ArgumentError(MISSING_ID_ERROR);
}
final url = '$BASE_URL/$paymentLinkId';
return api.get<RazorpayPaymentLink>(
{'url': url},
fromJsonFactory: RazorpayPaymentLink.fromJson,
callback: callback,
);
}