batchGet method
Reads one or more one-time products.
Request parameters:
packageName
- Required. The parent app (package name) for which the
products should be retrieved. Must be equal to the package_name field on
all requests.
productIds
- Required. A list of up to 100 product IDs to retrieve. All
IDs must be different.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a BatchGetOneTimeProductsResponse.
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<BatchGetOneTimeProductsResponse> batchGet(
core.String packageName, {
core.List<core.String>? productIds,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (productIds != null) 'productIds': productIds,
if ($fields != null) 'fields': [$fields],
};
final url_ =
'androidpublisher/v3/applications/' +
commons.escapeVariable('$packageName') +
'/oneTimeProducts:batchGet';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return BatchGetOneTimeProductsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}