batchget method
Get order details for a list of orders.
Request parameters:
packageName
- Required. The package name of the application for which
this subscription or in-app item was purchased (for example,
'com.some.thing').
orderIds
- Required. The list of order IDs to retrieve order details
for. There must be between 1 and 1000 (inclusive) order IDs per request.
If any order ID is not found or does not match the provided package, the
entire request will fail with an error. The order IDs must be distinct.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a BatchGetOrdersResponse.
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<BatchGetOrdersResponse> batchget(
core.String packageName, {
core.List<core.String>? orderIds,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (orderIds != null) 'orderIds': orderIds,
if ($fields != null) 'fields': [$fields],
};
final url_ =
'androidpublisher/v3/applications/' +
commons.escapeVariable('$packageName') +
'/orders:batchGet';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return BatchGetOrdersResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}