/// <summary> /// Get the billing account by id. /// </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 address, invoiceSections and billingProfiles. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BillingAccount> GetAsync(this IBillingAccountsOperations operations, string billingAccountName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The operation to update a billing account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='billingAccountName'> /// billing Account Id. /// </param> /// <param name='parameters'> /// Request parameters supplied to the update billing account operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BillingAccount> BeginUpdateAsync(this IBillingAccountsOperations operations, string billingAccountName, BillingAccountUpdateRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(billingAccountName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the billing accounts that a user has access to. /// <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 <BillingAccount> > ListNextAsync(this IBillingAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the billing account by id. /// </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 address, invoiceSections and billingProfiles. /// </param> public static BillingAccount Get(this IBillingAccountsOperations operations, string billingAccountName, string expand = default(string)) { return(operations.GetAsync(billingAccountName, expand).GetAwaiter().GetResult()); }
/// <summary> /// Lists all billing accounts for a user which he has access to. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// May be used to expand the address, invoiceSections and billingProfiles. /// </param> public static BillingAccountListResult List(this IBillingAccountsOperations operations, string expand = default(string)) { return(operations.ListAsync(expand).GetAwaiter().GetResult()); }
/// <summary> /// Lists all invoice sections with create subscription permission for a user. /// </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 <InvoiceSectionWithCreateSubPermission> > ListInvoiceSectionsByCreateSubscriptionPermissionNextAsync(this IBillingAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListInvoiceSectionsByCreateSubscriptionPermissionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all invoice sections with create subscription permission for a user. /// </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 <InvoiceSectionWithCreateSubPermission> ListInvoiceSectionsByCreateSubscriptionPermissionNext(this IBillingAccountsOperations operations, string nextPageLink) { return(operations.ListInvoiceSectionsByCreateSubscriptionPermissionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// The operation to update a billing account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='billingAccountName'> /// billing Account Id. /// </param> /// <param name='parameters'> /// Request parameters supplied to the update billing account operation. /// </param> public static BillingAccount BeginUpdate(this IBillingAccountsOperations operations, string billingAccountName, BillingAccountUpdateRequest parameters) { return(operations.BeginUpdateAsync(billingAccountName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all invoice sections 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> public static IPage <InvoiceSectionWithCreateSubPermission> ListInvoiceSectionsByCreateSubscriptionPermission(this IBillingAccountsOperations operations, string billingAccountName) { return(operations.ListInvoiceSectionsByCreateSubscriptionPermissionAsync(billingAccountName).GetAwaiter().GetResult()); }
/// <summary> /// Lists the billing accounts that a user has access to. /// <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 <BillingAccount> ListNext(this IBillingAccountsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }