/// <summary> /// Gets the most recent invoice. When getting a single invoice, the /// downloadUrl property is expanded automatically. This is only supported for /// Azure Web-Direct subscriptions. Other subscription types which were not /// purchased directly through the Azure web portal are not supported through /// this preview API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Invoice> GetLatestAsync(this IInvoicesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetLatestWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }