queryEligibleBillingAccounts method
Lists the billing accounts that are eligible to purchase particular SKUs for a given customer.
Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: Based on the provided list of SKUs, returns a list of SKU groups that must be purchased using the same billing account and the billing accounts eligible to purchase each SKU group.
Request parameters:
customer
- Required. The resource name of the customer to list eligible
billing accounts for. Format:
accounts/{account_id}/customers/{customer_id}.
Value must have pattern ^accounts/\[^/\]+/customers/\[^/\]+$
.
skus
- Required. List of SKUs to list eligible billing accounts for. At
least one SKU is required. Format: products/{product_id}/skus/{sku_id}.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudChannelV1QueryEligibleBillingAccountsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleCloudChannelV1QueryEligibleBillingAccountsResponse>
queryEligibleBillingAccounts(
core.String customer, {
core.List<core.String>? skus,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (skus != null) 'skus': skus,
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$customer') +
':queryEligibleBillingAccounts';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudChannelV1QueryEligibleBillingAccountsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}