Esempio n. 1
0
 /// <summary>
 /// Updates the properties of a billing subscription. Currently, cost center
 /// can be updated. The operation is supported only for billing accounts with
 /// agreement type Microsoft Customer Agreement.
 /// </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='parameters'>
 /// Request parameters that are provided to the update billing subscription
 /// operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BillingSubscription> UpdateAsync(this IBillingSubscriptionsOperations operations, string billingAccountName, BillingSubscription parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Moves a subscription's charges to a new invoice section. The new invoice
 /// section must belong to the same billing profile as the existing invoice
 /// section. This operation is supported for billing accounts with agreement
 /// type 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='parameters'>
 /// Request parameters that are provided to the move subscription operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BillingSubscription> BeginMoveAsync(this IBillingSubscriptionsOperations operations, string billingAccountName, TransferBillingSubscriptionRequestProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginMoveWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Get a single billing subscription by name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='billingSubscriptionName'>
 /// Billing Subscription Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BillingSubscriptionSummary> GetAsync(this IBillingSubscriptionsOperations operations, string billingAccountName, string invoiceSectionName, string billingSubscriptionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, invoiceSectionName, billingSubscriptionName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Lists the subscriptions for a customer. The operation is supported only for
 /// billing accounts with agreement type Microsoft Partner 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='customerName'>
 /// The ID that uniquely identifies a customer.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <BillingSubscription> > ListByCustomerAsync(this IBillingSubscriptionsOperations operations, string billingAccountName, string customerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByCustomerWithHttpMessagesAsync(billingAccountName, customerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Moves a subscription's charges to a new invoice section. The new invoice
 /// section must belong to the same billing profile as the existing invoice
 /// section. This operation is supported for billing accounts with agreement
 /// type 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='parameters'>
 /// Request parameters that are provided to the move subscription operation.
 /// </param>
 public static BillingSubscription BeginMove(this IBillingSubscriptionsOperations operations, string billingAccountName, TransferBillingSubscriptionRequestProperties parameters)
 {
     return(operations.BeginMoveAsync(billingAccountName, parameters).GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// Validates if a subscription's charges can be moved to a new invoice
 /// section. This operation is supported for billing accounts with agreement
 /// type 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='parameters'>
 /// Request parameters that are provided to the validate move eligibility
 /// operation.
 /// </param>
 public static ValidateSubscriptionTransferEligibilityResult ValidateMove(this IBillingSubscriptionsOperations operations, string billingAccountName, TransferBillingSubscriptionRequestProperties parameters)
 {
     return(operations.ValidateMoveAsync(billingAccountName, parameters).GetAwaiter().GetResult());
 }
Esempio n. 7
0
 /// <summary>
 /// Updates the properties of a billing subscription. Currently, cost center
 /// can be updated. The operation is supported only for billing accounts with
 /// agreement type Microsoft Customer Agreement.
 /// </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='parameters'>
 /// Request parameters that are provided to the update billing subscription
 /// operation.
 /// </param>
 public static BillingSubscription Update(this IBillingSubscriptionsOperations operations, string billingAccountName, BillingSubscription parameters)
 {
     return(operations.UpdateAsync(billingAccountName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get a single billing subscription by id.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='customerName'>
 /// Customer name.
 /// </param>
 /// <param name='billingSubscriptionName'>
 /// Billing Subscription Id.
 /// </param>
 public static BillingSubscription GetByCustomer(this IBillingSubscriptionsOperations operations, string billingAccountName, string customerName, string billingSubscriptionName)
 {
     return(operations.GetByCustomerAsync(billingAccountName, customerName, billingSubscriptionName).GetAwaiter().GetResult());
 }
Esempio n. 9
0
 /// <summary>
 /// Lists billing subscriptions by billing profile name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </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>
 public static BillingSubscriptionsListResult ListByBillingProfileName(this IBillingSubscriptionsOperations operations, string billingAccountName, string billingProfileName)
 {
     return(operations.ListByBillingProfileNameAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult());
 }
Esempio n. 10
0
 /// <summary>
 /// Lists billing subscriptions by billing account name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </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 <BillingSubscriptionSummary> ListByBillingAccountNameNext(this IBillingSubscriptionsOperations operations, string nextPageLink)
 {
     return(operations.ListByBillingAccountNameNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Esempio n. 11
0
 /// <summary>
 /// Transfers the subscription from one invoice section to another within a
 /// billing account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='billingSubscriptionName'>
 /// Billing Subscription Id.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Transfer Billing Subscription operation.
 /// </param>
 public static TransferBillingSubscriptionResult BeginTransfer(this IBillingSubscriptionsOperations operations, string billingAccountName, string invoiceSectionName, string billingSubscriptionName, TransferBillingSubscriptionRequestProperties parameters)
 {
     return(operations.BeginTransferAsync(billingAccountName, invoiceSectionName, billingSubscriptionName, parameters).GetAwaiter().GetResult());
 }
Esempio n. 12
0
 /// <summary>
 /// Get a single billing subscription by name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='billingSubscriptionName'>
 /// Billing Subscription Id.
 /// </param>
 public static BillingSubscriptionSummary Get(this IBillingSubscriptionsOperations operations, string billingAccountName, string invoiceSectionName, string billingSubscriptionName)
 {
     return(operations.GetAsync(billingAccountName, invoiceSectionName, billingSubscriptionName).GetAwaiter().GetResult());
 }
Esempio n. 13
0
 /// <summary>
 /// Lists billing subscription by invoice section name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 public static BillingSubscriptionsListResult ListByInvoiceSectionName(this IBillingSubscriptionsOperations operations, string billingAccountName, string invoiceSectionName)
 {
     return(operations.ListByInvoiceSectionNameAsync(billingAccountName, invoiceSectionName).GetAwaiter().GetResult());
 }
Esempio n. 14
0
 /// <summary>
 /// Lists the subscriptions that are billed to an invoice section. The
 /// operation is supported only for billing accounts with agreement type
 /// 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='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <BillingSubscription> ListByInvoiceSectionNext(this IBillingSubscriptionsOperations operations, string nextPageLink)
 {
     return(operations.ListByInvoiceSectionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Esempio n. 15
0
 /// <summary>
 /// Lists billing subscriptions by billing profile name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BillingSubscriptionsListResult> ListByBillingProfileNameAsync(this IBillingSubscriptionsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBillingProfileNameWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 16
0
 /// <summary>
 /// Lists the subscriptions that are billed to an invoice section. The
 /// operation is supported only for billing accounts with agreement type
 /// 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='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <BillingSubscription> > ListByInvoiceSectionNextAsync(this IBillingSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByInvoiceSectionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 17
0
 /// <summary>
 /// Lists the subscriptions that are billed to an invoice section. The
 /// operation is supported only for billing accounts with agreement type
 /// 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='billingProfileName'>
 /// The ID that uniquely identifies a billing profile.
 /// </param>
 /// <param name='invoiceSectionName'>
 /// The ID that uniquely identifies an invoice section.
 /// </param>
 public static IPage <BillingSubscription> ListByInvoiceSection(this IBillingSubscriptionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName)
 {
     return(operations.ListByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName).GetAwaiter().GetResult());
 }
Esempio n. 18
0
 /// <summary>
 /// Lists the subscriptions for a billing account. The operation is supported
 /// for billing accounts with agreement type Microsoft Customer Agreement or
 /// Microsoft Partner 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>
 public static IPage <BillingSubscription> ListByBillingAccount(this IBillingSubscriptionsOperations operations, string billingAccountName)
 {
     return(operations.ListByBillingAccountAsync(billingAccountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Validates the transfer of billing subscriptions across invoice sections.
 /// </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='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='billingSubscriptionName'>
 /// Billing Subscription Id.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Transfer Billing Subscription operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ValidateSubscriptionTransferEligibilityResult> ValidateTransferAsync(this IBillingSubscriptionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string billingSubscriptionName, TransferBillingSubscriptionRequestProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateTransferWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, billingSubscriptionName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }