Example #1
0
 /// <summary>
 /// Lists the products for a customer. These don't include products billed
 /// based on usage.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 <Product> > ListByCustomerAsync(this IProductsOperations operations, string billingAccountName, string customerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByCustomerWithHttpMessagesAsync(billingAccountName, customerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Return product name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroup'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='activationName'>
 /// Name of the activation.
 /// </param>
 /// <param name='productName'>
 /// Name of the product.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProductResource> GetAsync(this IProductsOperations operations, string resourceGroup, string activationName, string productName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroup, activationName, productName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Returns a list of products.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroup'>
 /// Name of the resource group.
 /// </param>
 /// <param name='registrationName'>
 /// Name of the Azure Stack registration.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Product> > ListAsync(this IProductsOperations operations, string resourceGroup, string registrationName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroup, registrationName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get a single product 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='productName'>
 /// Invoice Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProductSummary> GetAsync(this IProductsOperations operations, string billingAccountName, string invoiceSectionName, string productName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, invoiceSectionName, productName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #5
0
 /// <summary>
 /// Updates the properties of a Product. Currently, auto renew 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='productName'>
 /// The ID that uniquely identifies a product.
 /// </param>
 /// <param name='parameters'>
 /// Request parameters that are provided to the update product operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Product> UpdateAsync(this IProductsOperations operations, string billingAccountName, string productName, Product parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(billingAccountName, productName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #6
0
 /// <summary>
 /// Lists the products for an invoice section. These don't include products
 /// billed based on usage. 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>
 /// <param name='filter'>
 /// May be used to filter by product type. The filter supports 'eq', 'lt',
 /// 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
 /// 'not'. Tag filter is a key value pair string where key and value are
 /// separated by a colon (:).
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Product> > ListByInvoiceSectionAsync(this IProductsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// The operation to transfer a Product to another 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='productName'>
 /// Invoice Id.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Transfer Product operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProductSummary> TransferAsync(this IProductsOperations operations, string billingAccountName, string invoiceSectionName, string productName, TransferProductRequestProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.TransferWithHttpMessagesAsync(billingAccountName, invoiceSectionName, productName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #8
0
 /// <summary>
 /// Lists the products for an invoice section. These don't include products
 /// billed based on usage. 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 <Product> > ListByInvoiceSectionNextAsync(this IProductsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByInvoiceSectionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the ApiManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public ApiManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._apiOperationPolicy = new ApiOperationPolicyOperations(this);
     this._apiOperations      = new ApiOperationsOperations(this);
     this._apiPolicy          = new ApiPolicyOperations(this);
     this._apiProducts        = new ApiProductsOperations(this);
     this._apis = new ApisOperations(this);
     this._authorizationServers = new AuthorizationServersOperations(this);
     this._certificates         = new CertificatesOperations(this);
     this._groups               = new GroupsOperations(this);
     this._groupUsers           = new GroupUsersOperations(this);
     this._policySnippents      = new PolicySnippetsOperations(this);
     this._productApis          = new ProductApisOperations(this);
     this._productGroups        = new ProductGroupsOperations(this);
     this._productPolicy        = new ProductPolicyOperations(this);
     this._products             = new ProductsOperations(this);
     this._productSubscriptions = new ProductSubscriptionsOperations(this);
     this._regions              = new RegionsOperations(this);
     this._reports              = new ReportsOperations(this);
     this._resourceProvider     = new ResourceProviderOperations(this);
     this._subscriptions        = new SubscriptionsOperations(this);
     this._tenantPolicy         = new TenantPolicyOperations(this);
     this._userApplications     = new UserApplicationsOperations(this);
     this._userGroups           = new UserGroupsOperations(this);
     this._userIdentities       = new UserIdentitiesOperations(this);
     this._users      = new UsersOperations(this);
     this._apiVersion = "2014-02-14";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// List all products.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Products operation response details.
 /// </returns>
 public static ProductListResponse List(this IProductsOperations operations, string resourceGroupName, string serviceName, QueryParameters query)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductsOperations)s).ListAsync(resourceGroupName, serviceName, query);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all products.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List Products operation response details.
 /// </returns>
 public static ProductListResponse ListNext(this IProductsOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductsOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create new product.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='pid'>
 /// Required. Identifier of the product.
 /// </param>
 /// <param name='parameters'>
 /// Required. Create or update parameters.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Create(this IProductsOperations operations, string resourceGroupName, string serviceName, string pid, ProductCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductsOperations)s).CreateAsync(resourceGroupName, serviceName, pid, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the ApiManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public ApiManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._apiOperationPolicy = new ApiOperationPolicyOperations(this);
     this._apiOperations      = new ApiOperationsOperations(this);
     this._apiPolicy          = new ApiPolicyOperations(this);
     this._apiProducts        = new ApiProductsOperations(this);
     this._apis = new ApisOperations(this);
     this._authorizationServers = new AuthorizationServersOperations(this);
     this._backends             = new BackendOperations(this);
     this._certificates         = new CertificatesOperations(this);
     this._groups                       = new GroupsOperations(this);
     this._groupUsers                   = new GroupUsersOperations(this);
     this._identityProvider             = new IdentityProviderOperations(this);
     this._loggers                      = new LoggerOperations(this);
     this._openIdConnectProviders       = new OpenIdConnectProvidersOperations(this);
     this._policySnippents              = new PolicySnippetsOperations(this);
     this._productApis                  = new ProductApisOperations(this);
     this._productGroups                = new ProductGroupsOperations(this);
     this._productPolicy                = new ProductPolicyOperations(this);
     this._products                     = new ProductsOperations(this);
     this._productSubscriptions         = new ProductSubscriptionsOperations(this);
     this._property                     = new PropertiesOperations(this);
     this._regions                      = new RegionsOperations(this);
     this._reports                      = new ReportsOperations(this);
     this._resourceProvider             = new ResourceProviderOperations(this);
     this._subscriptions                = new SubscriptionsOperations(this);
     this._tenantAccessGit              = new TenantAccessGitOperations(this);
     this._tenantAccess                 = new TenantAccessInformationOperations(this);
     this._tenantConfiguration          = new TenantConfigurationOperations(this);
     this._tenantConfigurationSyncState = new TenantConfigurationSyncStateOperation(this);
     this._tenantPolicy                 = new TenantPolicyOperations(this);
     this._userApplications             = new UserApplicationsOperations(this);
     this._userGroups                   = new UserGroupsOperations(this);
     this._userIdentities               = new UserIdentitiesOperations(this);
     this._users             = new UsersOperations(this);
     this._userSubscriptions = new UserSubscriptionsOperations(this);
     this._apiVersion        = "2016-10-10";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Get a single product 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='productName'>
 /// Invoice Id.
 /// </param>
 public static ProductSummary Get(this IProductsOperations operations, string billingAccountName, string invoiceSectionName, string productName)
 {
     return(operations.GetAsync(billingAccountName, invoiceSectionName, productName).GetAwaiter().GetResult());
 }
Example #15
0
 /// <summary>
 /// Cancel auto renew for product by product id and invoice section 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='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='productName'>
 /// Invoice Id.
 /// </param>
 /// <param name='body'>
 /// Update auto renew request parameters.
 /// </param>
 public static UpdateAutoRenewOperation UpdateAutoRenewByInvoiceSection(this IProductsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string productName, UpdateAutoRenewRequest body)
 {
     return(operations.UpdateAutoRenewByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, productName, body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create new product.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='pid'>
 /// Required. Identifier of the product.
 /// </param>
 /// <param name='parameters'>
 /// Required. Create or update parameters.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> CreateAsync(this IProductsOperations operations, string resourceGroupName, string serviceName, string pid, ProductCreateParameters parameters)
 {
     return(operations.CreateAsync(resourceGroupName, serviceName, pid, parameters, CancellationToken.None));
 }
Example #17
0
 /// <summary>
 /// Lists the products for an invoice section. These don't include products
 /// billed based on usage. 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>
 /// <param name='filter'>
 /// May be used to filter by product type. The filter supports 'eq', 'lt',
 /// 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
 /// 'not'. Tag filter is a key value pair string where key and value are
 /// separated by a colon (:).
 /// </param>
 public static IPage <Product> ListByInvoiceSection(this IProductsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string filter = default(string))
 {
     return(operations.ListByInvoiceSectionAsync(billingAccountName, billingProfileName, invoiceSectionName, filter).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all products.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List Products operation response details.
 /// </returns>
 public static Task <ProductListResponse> ListNextAsync(this IProductsOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
Example #19
0
 /// <summary>
 /// Updates the properties of a Product. Currently, auto renew 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='productName'>
 /// The ID that uniquely identifies a product.
 /// </param>
 /// <param name='parameters'>
 /// Request parameters that are provided to the update product operation.
 /// </param>
 public static Product Update(this IProductsOperations operations, string billingAccountName, string productName, Product parameters)
 {
     return(operations.UpdateAsync(billingAccountName, productName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all products.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Products operation response details.
 /// </returns>
 public static Task <ProductListResponse> ListAsync(this IProductsOperations operations, string resourceGroupName, string serviceName, QueryParameters query)
 {
     return(operations.ListAsync(resourceGroupName, serviceName, query, CancellationToken.None));
 }
Example #21
0
 /// <summary>
 /// Lists the products for a customer. These don't include products billed
 /// based on usage.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>
 public static IPage <Product> ListByCustomer(this IProductsOperations operations, string billingAccountName, string customerName)
 {
     return(operations.ListByCustomerAsync(billingAccountName, customerName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get specific product.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='pid'>
 /// Required. Identifier of the product.
 /// </param>
 /// <returns>
 /// Get Product operation response details.
 /// </returns>
 public static Task <ProductGetResponse> GetAsync(this IProductsOperations operations, string resourceGroupName, string serviceName, string pid)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, pid, CancellationToken.None));
 }
Example #23
0
 /// <summary>
 /// Validates if a product's charges can be moved to a new invoice section.
 /// This operation is supported only for products that are purchased with a
 /// recurring charge and 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='productName'>
 /// The ID that uniquely identifies a product.
 /// </param>
 /// <param name='parameters'>
 /// Request parameters that are provided to the validate move eligibility
 /// operation.
 /// </param>
 public static ValidateProductTransferEligibilityResult ValidateMove(this IProductsOperations operations, string billingAccountName, string productName, TransferProductRequestProperties parameters)
 {
     return(operations.ValidateMoveAsync(billingAccountName, productName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete product.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='pid'>
 /// Required. Identifier of the product.
 /// </param>
 /// <param name='etag'>
 /// Required. ETag.
 /// </param>
 /// <param name='deleteSubscriptions'>
 /// Required. Delete existing subscriptions to the product ot not.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IProductsOperations operations, string resourceGroupName, string serviceName, string pid, string etag, bool deleteSubscriptions)
 {
     return(operations.DeleteAsync(resourceGroupName, serviceName, pid, etag, deleteSubscriptions, CancellationToken.None));
 }
Example #25
0
 /// <summary>
 /// Cancel auto renew for product by product id and invoice section 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='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='productName'>
 /// Invoice Id.
 /// </param>
 /// <param name='body'>
 /// Update auto renew request parameters.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UpdateAutoRenewOperation> UpdateAutoRenewByInvoiceSectionAsync(this IProductsOperations operations, string billingAccountName, string billingProfileName, string invoiceSectionName, string productName, UpdateAutoRenewRequest body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateAutoRenewByInvoiceSectionWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceSectionName, productName, body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// The operation to transfer a Product to another 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='productName'>
 /// Invoice Id.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Transfer Product operation.
 /// </param>
 public static ProductSummary Transfer(this IProductsOperations operations, string billingAccountName, string invoiceSectionName, string productName, TransferProductRequestProperties parameters)
 {
     return(operations.TransferAsync(billingAccountName, invoiceSectionName, productName, parameters).GetAwaiter().GetResult());
 }
Example #27
0
 /// <summary>
 /// Validates if a product's charges can be moved to a new invoice section.
 /// This operation is supported only for products that are purchased with a
 /// recurring charge and 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='productName'>
 /// The ID that uniquely identifies a product.
 /// </param>
 /// <param name='parameters'>
 /// Request parameters that are provided to the validate move eligibility
 /// operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ValidateProductTransferEligibilityResult> ValidateMoveAsync(this IProductsOperations operations, string billingAccountName, string productName, TransferProductRequestProperties parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateMoveWithHttpMessagesAsync(billingAccountName, productName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #28
0
 /// <summary>
 /// Lists the products for an invoice section. These don't include products
 /// billed based on usage. 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 <Product> ListByInvoiceSectionNext(this IProductsOperations operations, string nextPageLink)
 {
     return(operations.ListByInvoiceSectionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 public ProductsOperationsBLL()
 {
     IProd = new ProductsOperationsDLL();
 }
Example #30
0
 /// <summary>
 /// Lists the products for a billing account. These don't include products
 /// billed based on usage. 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>
 /// <param name='filter'>
 /// May be used to filter by product type. The filter supports 'eq', 'lt',
 /// 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
 /// 'not'. Tag filter is a key value pair string where key and value are
 /// separated by a colon (:).
 /// </param>
 public static IPage <Product> ListByBillingAccount(this IProductsOperations operations, string billingAccountName, string filter = default(string))
 {
     return(operations.ListByBillingAccountAsync(billingAccountName, filter).GetAwaiter().GetResult());
 }