/// <summary> /// Get transaction Retrieve the details of a single transaction by its ID. /// </summary> /// <exception cref="ApiException">Thrown when fails to make API call</exception> /// <param name="accessToken"></param> /// <param name="transactionId"></param> /// <returns>Transaction</returns> public async Task <Transaction> GetDetailAsync(AccessTokenDto accessToken, string transactionId) { if (accessToken == null) { throw new ArgumentNullException(nameof(accessToken)); } if (!accessToken.IsValid) { throw new ArgumentException($"{nameof(accessToken)} is expired."); } if (transactionId == null) { throw new ArgumentNullException(nameof(transactionId)); } this.Configuration.AccessToken = accessToken.AccessToken; var transactionsApi = new TransactionsApi(this.Configuration, this.Logger); return(await transactionsApi .GetTransactionAsync(transactionId) .ConfigureAwait(false)); }