get method

Future<Order> get(
  1. String packageName,
  2. String orderId, {
  3. String? $fields,
})

Get order details for a single order.

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').

orderId - Required. The order ID provided to the user when the subscription or in-app order was purchased.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Order.

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<Order> get(
  core.String packageName,
  core.String orderId, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'androidpublisher/v3/applications/' +
      commons.escapeVariable('$packageName') +
      '/orders/' +
      commons.escapeVariable('$orderId');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return Order.fromJson(response_ as core.Map<core.String, core.dynamic>);
}