Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public interface BillingAccounts extends HasInner<BillingAccountsInner> {
*/
Observable<BillingAccount> getAsync(String billingAccountName);

/**
* Lists all invoice sections with create subscription permission for a user.
*
* @param billingAccountName billing Account Id.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<InvoiceSectionWithCreateSubPermission> listInvoiceSectionsByCreateSubscriptionPermissionAsync(final String billingAccountName);

/**
* Lists all billing accounts for a user which he has access to.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface Departments extends HasInner<DepartmentsInner> {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<DepartmentListResult> listByBillingAccountAsync(String billingAccountName);
Observable<DepartmentListResult> listByBillingAccountNameAsync(String billingAccountName);

/**
* Get the department by id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface EnrollmentAccounts extends HasInner<EnrollmentAccountsInner> {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<EnrollmentAccountListResult> listByBillingAccountAsync(String billingAccountName);
Observable<EnrollmentAccountListResult> listByBillingAccountNameAsync(String billingAccountName);

/**
* Get the enrollment account by id.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.billing.v2019_10_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.billing.v2019_10_01_preview.implementation.BillingManager;
import com.microsoft.azure.management.billing.v2019_10_01_preview.implementation.InvoiceSectionWithCreateSubPermissionInner;
import java.util.List;

/**
* Type representing InvoiceSectionWithCreateSubPermission.
*/
public interface InvoiceSectionWithCreateSubPermission extends HasInner<InvoiceSectionWithCreateSubPermissionInner>, HasManager<BillingManager> {
/**
* @return the billingProfileDisplayName value.
*/
String billingProfileDisplayName();

/**
* @return the billingProfileId value.
*/
String billingProfileId();

/**
* @return the enabledAzurePlans value.
*/
List<AzurePlan> enabledAzurePlans();

/**
* @return the invoiceSectionDisplayName value.
*/
String invoiceSectionDisplayName();

/**
* @return the invoiceSectionId value.
*/
String invoiceSectionId();

}
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ public interface Products extends HasInner<ProductsInner> {
*/
Observable<ValidateProductTransferEligibilityResult> validateTransferAsync(String billingAccountName, String billingProfileName, String invoiceSectionName, String productName, TransferProductRequestProperties parameters);

/**
* Cancel auto renew for product by product id and billing account name.
*
* @param billingAccountName billing Account Id.
* @param productName Invoice Id.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<UpdateAutoRenewOperation> updateAutoRenewByBillingAccountAsync(String billingAccountName, String productName);

/**
* Cancel auto renew for product by product id and invoice section name.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccounts;
import rx.functions.Func1;
import rx.Observable;
import com.microsoft.azure.Page;
import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccount;
import com.microsoft.azure.management.billing.v2019_10_01_preview.InvoiceSectionWithCreateSubPermission;
import com.microsoft.azure.management.billing.v2019_10_01_preview.BillingAccountListResult;

class BillingAccountsImpl extends WrapperImpl<BillingAccountsInner> implements BillingAccounts {
Expand Down Expand Up @@ -44,6 +46,24 @@ public BillingAccount call(BillingAccountInner inner) {
});
}

@Override
public Observable<InvoiceSectionWithCreateSubPermission> listInvoiceSectionsByCreateSubscriptionPermissionAsync(final String billingAccountName) {
BillingAccountsInner client = this.inner();
return client.listInvoiceSectionsByCreateSubscriptionPermissionAsync(billingAccountName)
.flatMapIterable(new Func1<Page<InvoiceSectionWithCreateSubPermissionInner>, Iterable<InvoiceSectionWithCreateSubPermissionInner>>() {
@Override
public Iterable<InvoiceSectionWithCreateSubPermissionInner> call(Page<InvoiceSectionWithCreateSubPermissionInner> page) {
return page.items();
}
})
.map(new Func1<InvoiceSectionWithCreateSubPermissionInner, InvoiceSectionWithCreateSubPermission>() {
@Override
public InvoiceSectionWithCreateSubPermission call(InvoiceSectionWithCreateSubPermissionInner inner) {
return new InvoiceSectionWithCreateSubPermissionImpl(inner, manager());
}
});
}

@Override
public Observable<BillingAccountListResult> listAsync() {
BillingAccountsInner client = this.inner();
Expand Down
Loading