commit method

Future<AppEdit> commit(
  1. String packageName,
  2. String editId, {
  3. String? changesInReviewBehavior,
  4. bool? changesNotSentForReview,
  5. String? $fields,
})

Commits an app edit.

Request parameters:

packageName - Package name of the app.

editId - Identifier of the edit.

changesInReviewBehavior - Optional. Specify how the API should behave if there are changes currently in review. If this value is not set, it will default to "CANCEL_IN_REVIEW_AND_SUBMIT", which will cancel the changes in review and then send all the changes for publishing. Possible string values are:

  • "CHANGES_IN_REVIEW_BEHAVIOR_TYPE_UNSPECIFIED" : Defaults to CANCEL_IN_REVIEW_AND_SUBMIT.
  • "CANCEL_IN_REVIEW_AND_SUBMIT" : If there are changes already in review, then this will cancel that review first and then send all the changes for publishing.
  • "ERROR_IF_IN_REVIEW" : If there are changes in review, then this will return an error. Please refer to the error message sample that is returned when this happens. Note that this won't invalidate the edit. If there aren't any changes in review, then this will continue and send the new changes for publishing.

changesNotSentForReview - When a rejection happens, the parameter will make sure that the changes in this edit won't be reviewed until they are explicitly sent for review from within the Google Play Console UI. These changes will be added to any other changes that are not yet sent for review.

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

Completes with a AppEdit.

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<AppEdit> commit(
  core.String packageName,
  core.String editId, {
  core.String? changesInReviewBehavior,
  core.bool? changesNotSentForReview,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'changesInReviewBehavior': ?changesInReviewBehavior == null
        ? null
        : [changesInReviewBehavior],
    'changesNotSentForReview': ?changesNotSentForReview == null
        ? null
        : ['${changesNotSentForReview}'],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'androidpublisher/v3/applications/' +
      commons.escapeVariable('$packageName') +
      '/edits/' +
      commons.escapeVariable('$editId') +
      ':commit';

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