fetchSubscriptions method Null safety
Fetches your premium sms subscriptions.
It requires keyword (The premium keyword under the above short code mapped to your account)
& lastReceivedId (ID of the subscription you believe to be your last. Set it to 0 to for the first time.)
Implementation
Future<http.Response> fetchSubscriptions({
required String keyword, String? lastReceivedId
})async{
return await africasTalking.httpGetProcess(
africasTalking.isLive ? smsSubscribeLiveUrl : smsSubscribeTestUrl,
{
'shortCode': shortCode,
'keyword': keyword,
if(lastReceivedId != null) ...{'lastReceivedId': lastReceivedId},
}
);
}