list method
Lists the SKUs for a product the reseller is authorized to sell.
Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.
Request parameters:
parent
- Required. The resource name of the Product to list SKUs for.
Parent uses the format: products/{product_id}. Supports products/- to
retrieve SKUs for all products.
Value must have pattern ^products/\[^/\]+$
.
account
- Required. Resource name of the reseller. Format:
accounts/{account_id}.
languageCode
- Optional. The BCP-47 language code. For example, "en-US".
The response will localize in the corresponding language code, if
specified. The default value is "en-US".
pageSize
- Optional. Requested page size. Server might return fewer
results than requested. If unspecified, returns at most 100 SKUs. The
maximum value is 1000; the server will coerce values above 1000.
pageToken
- Optional. A token for a page of results other than the first
page. Optional.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudChannelV1ListSkusResponse.
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<GoogleCloudChannelV1ListSkusResponse> list(
core.String parent, {
core.String? account,
core.String? languageCode,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (account != null) 'account': [account],
if (languageCode != null) 'languageCode': [languageCode],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/skus';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudChannelV1ListSkusResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}