/// <summary>
 /// Get the InvoiceSection by id.
 /// </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='expand'>
 /// May be used to expand the billingProfiles.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoiceSection> GetAsync(this IInvoiceSectionsOperations operations, string billingAccountName, string invoiceSectionName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, invoiceSectionName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// The operation to create a InvoiceSection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create InvoiceSection operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoiceSection> CreateAsync(this IInvoiceSectionsOperations operations, string billingAccountName, InvoiceSectionProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the invoice sections that a user has access to. 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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <InvoiceSection> > ListByBillingProfileAsync(this IInvoiceSectionsOperations operations, string billingAccountName, string billingProfileName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBillingProfileWithHttpMessagesAsync(billingAccountName, billingProfileName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all invoice sections under a billing profile for a user which he has
 /// access to.
 /// </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 InvoiceSectionListResult ListByBillingProfileName(this IInvoiceSectionsOperations operations, string billingAccountName, string billingProfileName)
 {
     return(operations.ListByBillingProfileNameAsync(billingAccountName, billingProfileName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// The operation to create a InvoiceSection.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create InvoiceSection operation.
 /// </param>
 public static InvoiceSection Create(this IInvoiceSectionsOperations operations, string billingAccountName, InvoiceSectionProperties parameters)
 {
     return(operations.CreateAsync(billingAccountName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// The operation to update a InvoiceSection.
 /// </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='parameters'>
 /// Parameters supplied to the Create InvoiceSection operation.
 /// </param>
 public static InvoiceSection BeginUpdate(this IInvoiceSectionsOperations operations, string billingAccountName, string invoiceSectionName, InvoiceSection parameters)
 {
     return(operations.BeginUpdateAsync(billingAccountName, invoiceSectionName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Elevates the caller's access to match their billing profile access.
 /// </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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ElevateToBillingProfileAsync(this IInvoiceSectionsOperations operations, string billingAccountName, string invoiceSectionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.ElevateToBillingProfileWithHttpMessagesAsync(billingAccountName, invoiceSectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Elevates the caller's access to match their billing profile access.
 /// </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 void ElevateToBillingProfile(this IInvoiceSectionsOperations operations, string billingAccountName, string invoiceSectionName)
 {
     operations.ElevateToBillingProfileAsync(billingAccountName, invoiceSectionName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Get the InvoiceSection by id.
 /// </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='expand'>
 /// May be used to expand the billingProfiles.
 /// </param>
 public static InvoiceSection Get(this IInvoiceSectionsOperations operations, string billingAccountName, string invoiceSectionName, string expand = default(string))
 {
     return(operations.GetAsync(billingAccountName, invoiceSectionName, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets an invoice section by its ID. 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 InvoiceSection Get(this IInvoiceSectionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName)
 {
     return(operations.GetAsync(billingAccountName, billingProfileName, invoiceSectionName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the invoice sections that a user has access to. 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 <InvoiceSection> ListByBillingProfileNext(this IInvoiceSectionsOperations operations, string nextPageLink)
 {
     return(operations.ListByBillingProfileNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all invoiceSections with create subscription permission for a user.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the billingProfiles.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoiceSectionListResult> ListByCreateSubscriptionPermissionAsync(this IInvoiceSectionsOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByCreateSubscriptionPermissionWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all invoiceSections with create subscription permission for a user.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the billingProfiles.
 /// </param>
 public static InvoiceSectionListResult ListByCreateSubscriptionPermission(this IInvoiceSectionsOperations operations, string billingAccountName, string expand = default(string))
 {
     return(operations.ListByCreateSubscriptionPermissionAsync(billingAccountName, expand).GetAwaiter().GetResult());
 }
예제 #14
0
 /// <summary>
 /// The operation to create an invoice section.
 /// </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='parameters'>
 /// Request parameters supplied to the Create InvoiceSection operation.
 /// </param>
 public static InvoiceSection Create(this IInvoiceSectionsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, InvoiceSectionCreationRequest parameters)
 {
     return(operations.CreateAsync(billingAccountName, billingProfileName, invoiceSectionName, parameters).GetAwaiter().GetResult());
 }