list method
Lists the Products the reseller is authorized to sell.
Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.
Request parameters:
account
- Required. The resource name of the reseller account. 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 Products. 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.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudChannelV1ListProductsResponse.
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<GoogleCloudChannelV1ListProductsResponse> list({
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],
};
const url_ = 'v1/products';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudChannelV1ListProductsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}