예제 #1
0
 /// <summary>
 /// Gets an invoice by subscription ID and invoice ID.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceName'>
 /// The ID that uniquely identifies an invoice.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Invoice> GetBySubscriptionAndInvoiceIdAsync(this IInvoicesOperations operations, string invoiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetBySubscriptionAndInvoiceIdWithHttpMessagesAsync(invoiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the available invoices for a subscription in reverse chronological
 /// order beginning with the most recent invoice. In preview, invoices are
 /// available via this API only for invoice periods which end December 1, 2016
 /// or later.  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.
 /// <see href="https://go.microsoft.com/fwlink/?linkid=842057" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the downloadUrl property within a list of invoices.
 /// This enables download links to be generated for multiple invoices at once.
 /// By default, downloadURLs are not included when listing invoices.
 /// </param>
 /// <param name='filter'>
 /// May be used to filter invoices by invoicePeriodEndDate. The filter supports
 /// 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support
 /// 'ne', 'or', or 'not'.
 /// </param>
 /// <param name='skiptoken'>
 /// Skiptoken is only used if a previous operation returned a partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a skiptoken parameter that specifies a
 /// starting point to use for subsequent calls.
 /// </param>
 /// <param name='top'>
 /// May be used to limit the number of results to the most recent N invoices.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Invoice> > ListAsync(this IInvoicesOperations operations, string expand = default(string), string filter = default(string), string skiptoken = default(string), int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(expand, filter, skiptoken, top, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the available invoices for a subscription in reverse chronological
 /// order beginning with the most recent invoice. In preview, invoices are
 /// available via this API only for invoice periods which end December 1, 2016
 /// or later.  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.
 /// <see href="https://go.microsoft.com/fwlink/?linkid=842057" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Invoice> > ListNextAsync(this IInvoicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <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);
     }
 }
예제 #5
0
 /// <summary>
 /// List of invoices for a billing account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='periodStartDate'>
 /// Invoice period start date.
 /// </param>
 /// <param name='periodEndDate'>
 /// Invoice period end date.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoiceListResult> ListByBillingAccountAsync(this IInvoicesOperations operations, string billingAccountName, string periodStartDate, string periodEndDate, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBillingAccountWithHttpMessagesAsync(billingAccountName, periodStartDate, periodEndDate, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #6
0
 /// <summary>
 /// Gets a URL to download an invoice. The operation is supported for billing
 /// accounts with agreement type Microsoft Partner Agreement or Microsoft
 /// Customer Agreement.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// The ID that uniquely identifies a billing account.
 /// </param>
 /// <param name='invoiceName'>
 /// The ID that uniquely identifies an invoice.
 /// </param>
 /// <param name='downloadToken'>
 /// Download token with document source and document ID.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DownloadUrl> BeginDownloadInvoiceAsync(this IInvoicesOperations operations, string billingAccountName, string invoiceName, string downloadToken, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDownloadInvoiceWithHttpMessagesAsync(billingAccountName, invoiceName, downloadToken, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #7
0
 /// <summary>
 /// Get the invoice by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='billingProfileName'>
 /// Billing Profile Id.
 /// </param>
 /// <param name='invoiceName'>
 /// Invoice Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Invoice> GetAsync(this IInvoicesOperations operations, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the available invoices for a subscription in reverse chronological
 /// order beginning with the most recent invoice. In preview, invoices are
 /// available via this API only for invoice periods which end December 1, 2016
 /// or later.  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.
 /// <see href="https://go.microsoft.com/fwlink/?linkid=842057" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the downloadUrl property within a list of invoices.
 /// This enables download links to be generated for multiple invoices at once.
 /// By default, downloadURLs are not included when listing invoices.
 /// </param>
 /// <param name='filter'>
 /// May be used to filter invoices by invoicePeriodEndDate. The filter supports
 /// 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support
 /// 'ne', 'or', or 'not'.
 /// </param>
 /// <param name='skiptoken'>
 /// Skiptoken is only used if a previous operation returned a partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a skiptoken parameter that specifies a
 /// starting point to use for subsequent calls.
 /// </param>
 /// <param name='top'>
 /// May be used to limit the number of results to the most recent N invoices.
 /// </param>
 public static IPage <Invoice> List(this IInvoicesOperations operations, string expand = default(string), string filter = default(string), string skiptoken = default(string), int?top = default(int?))
 {
     return(operations.ListAsync(expand, filter, skiptoken, top).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the available invoices for a subscription in reverse chronological
 /// order beginning with the most recent invoice. In preview, invoices are
 /// available via this API only for invoice periods which end December 1, 2016
 /// or later.  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.
 /// <see href="https://go.microsoft.com/fwlink/?linkid=842057" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Invoice> ListNext(this IInvoicesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
예제 #10
0
 /// <summary>
 /// Lists the invoices for a subscription.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='periodStartDate'>
 /// Invoice period start date.
 /// </param>
 /// <param name='periodEndDate'>
 /// Invoice period end date.
 /// </param>
 public static IPage <Invoice> ListByBillingSubscription(this IInvoicesOperations operations, string periodStartDate, string periodEndDate)
 {
     return(operations.ListByBillingSubscriptionAsync(periodStartDate, periodEndDate).GetAwaiter().GetResult());
 }
예제 #11
0
 /// <summary>
 /// Gets a URL to download an invoice.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceName'>
 /// The ID that uniquely identifies an invoice.
 /// </param>
 /// <param name='downloadToken'>
 /// Download token with document source and document ID.
 /// </param>
 public static DownloadUrl BeginDownloadBillingSubscriptionInvoice(this IInvoicesOperations operations, string invoiceName, string downloadToken)
 {
     return(operations.BeginDownloadBillingSubscriptionInvoiceAsync(invoiceName, downloadToken).GetAwaiter().GetResult());
 }
예제 #12
0
 /// <summary>
 /// Lists the invoices for a billing account for a given start date and end
 /// date. The operation is supported for billing accounts with agreement type
 /// Microsoft Partner Agreement or Microsoft Customer Agreement.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// The ID that uniquely identifies a billing account.
 /// </param>
 /// <param name='periodStartDate'>
 /// The start date to fetch the invoices. The date should be specified in
 /// MM-DD-YYYY format.
 /// </param>
 /// <param name='periodEndDate'>
 /// The end date to fetch the invoices. The date should be specified in
 /// MM-DD-YYYY format.
 /// </param>
 public static IPage <Invoice> ListByBillingAccount(this IInvoicesOperations operations, string billingAccountName, string periodStartDate, string periodEndDate)
 {
     return(operations.ListByBillingAccountAsync(billingAccountName, periodStartDate, periodEndDate).GetAwaiter().GetResult());
 }
예제 #13
0
 /// <summary>
 /// Gets a URL to download an invoice. The operation is supported for billing
 /// accounts with agreement type Microsoft Partner Agreement or Microsoft
 /// Customer Agreement.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// The ID that uniquely identifies a billing account.
 /// </param>
 /// <param name='invoiceName'>
 /// The ID that uniquely identifies an invoice.
 /// </param>
 /// <param name='downloadToken'>
 /// Download token with document source and document ID.
 /// </param>
 public static DownloadUrl BeginDownloadInvoice(this IInvoicesOperations operations, string billingAccountName, string invoiceName, string downloadToken)
 {
     return(operations.BeginDownloadInvoiceAsync(billingAccountName, invoiceName, downloadToken).GetAwaiter().GetResult());
 }
예제 #14
0
 /// <summary>
 /// Gets an invoice by subscription ID and invoice ID.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceName'>
 /// The ID that uniquely identifies an invoice.
 /// </param>
 public static Invoice GetBySubscriptionAndInvoiceId(this IInvoicesOperations operations, string invoiceName)
 {
     return(operations.GetBySubscriptionAndInvoiceIdAsync(invoiceName).GetAwaiter().GetResult());
 }
예제 #15
0
 /// <summary>
 /// Get the invoice by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='billingProfileName'>
 /// Billing Profile Id.
 /// </param>
 /// <param name='invoiceName'>
 /// Invoice Id.
 /// </param>
 public static Invoice Get(this IInvoicesOperations operations, string billingAccountName, string billingProfileName, string invoiceName)
 {
     return(operations.GetAsync(billingAccountName, billingProfileName, invoiceName).GetAwaiter().GetResult());
 }
예제 #16
0
 /// <summary>
 /// Gets a named invoice resource. 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='invoiceName'>
 /// The name of an invoice resource.
 /// </param>
 public static Invoice Get(this IInvoicesOperations operations, string invoiceName)
 {
     return(operations.GetAsync(invoiceName).GetAwaiter().GetResult());
 }
예제 #17
0
 /// <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>
 public static Invoice GetLatest(this IInvoicesOperations operations)
 {
     return(operations.GetLatestAsync().GetAwaiter().GetResult());
 }
예제 #18
0
 /// <summary>
 /// List of invoices for a billing profile.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='billingProfileName'>
 /// Billing Profile Id.
 /// </param>
 /// <param name='periodStartDate'>
 /// Invoice period start date.
 /// </param>
 /// <param name='periodEndDate'>
 /// Invoice period end date.
 /// </param>
 public static InvoiceListResult ListByBillingProfile(this IInvoicesOperations operations, string billingAccountName, string billingProfileName, string periodStartDate, string periodEndDate)
 {
     return(operations.ListByBillingProfileAsync(billingAccountName, billingProfileName, periodStartDate, periodEndDate).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the invoice by name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/billing/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='billingSubscriptionName'>
 /// Billing Subscription Id.
 /// </param>
 /// <param name='invoiceName'>
 /// Invoice Id.
 /// </param>
 public static Invoice GetById(this IInvoicesOperations operations, string billingAccountName, string billingSubscriptionName, string invoiceName)
 {
     return(operations.GetByIdAsync(billingAccountName, billingSubscriptionName, invoiceName).GetAwaiter().GetResult());
 }