예제 #1
0
 /// <summary>
 /// Queries MPESA Paybill Account balance.
 /// </summary>
 /// <param name="accountBalanceQueryDto">Account balance query data transfer object.</param>
 /// <param name="accesstoken">Acccesstoken retrieved by the <c>GetAuthTokenAsync</c> method.</param>
 /// <param name="requestEndPoint">Set to <c>RequestEndPoint.QueryAccountBalance</c></param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <returns>A JSON string containing data from MPESA API reposnse.</returns>
 public async Task <string> QueryAccountBalanceAsync(AccountBalanceDto accountBalanceQueryDto, string accesstoken, string requestEndPoint, CancellationToken cancellationToken = default)
 {
     return(await MpesaHttpRequest(accountBalanceQueryDto, accesstoken, requestEndPoint, cancellationToken));
 }
예제 #2
0
 /// <summary>
 /// Queries MPESA Paybill Account balance.
 /// </summary>
 /// <param name="accountBalanceQueryDto">Account balance query data transfer object.</param>
 /// <param name="accesstoken">Acccesstoken retrieved by the <c>GetAuthTokenAsync</c> method.</param>
 /// <param name="requestEndPoint">Set to <c>RequestEndPoint.QueryAccountBalance</c></param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <returns>A JSON string containing data from MPESA API reposnse.</returns>
 public string QueryAccountBalance(AccountBalanceDto accountBalanceQueryDto, string accesstoken, string requestEndPoint, CancellationToken cancellationToken = default)
 {
     return(MpesaHttpRequest(accountBalanceQueryDto, accesstoken, requestEndPoint, cancellationToken).GetAwaiter().GetResult());
 }