createSubscription method Null safety
Subscribes a phone number
It requires;
phoneNo (The phoneNumber to be subscribed)
keyword (The premium keyword under the above short code mapped to your account.)
checkoutToken (This is a token used to validate the subscription request)
Implementation
Future<http.Response> createSubscription({
required String phoneNo,
required String keyword,
required String checkoutToken,
})async {
return await africasTalking.httpPostProcess(
africasTalking.isLive ? smsSubscribeCreateLiveUrl : smsSubscribeCreateTestUrl,
{
'shortCode': shortCode,
'phoneNumber': phoneNo,
'checkoutToken': checkoutToken,
'keyword': keyword,
}
);
}