setStoreLayout method

Future<StoreLayout> setStoreLayout(
  1. StoreLayout request,
  2. String enterpriseId, {
  3. String? $fields,
})

Sets the store layout for the enterprise.

By default, storeLayoutType is set to "basic" and the basic store layout is enabled. The basic layout only contains apps approved by the admin, and that have been added to the available product set for a user (using the setAvailableProductSet call). Apps on the page are sorted in order of their product ID value. If you create a custom store layout (by setting storeLayoutType = "custom" and setting a homepage), the basic store layout is disabled.

request - The metadata request object.

Request parameters:

enterpriseId - The ID of the enterprise.

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

Completes with a StoreLayout.

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<StoreLayout> setStoreLayout(
  StoreLayout request,
  core.String enterpriseId, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'androidenterprise/v1/enterprises/' +
      commons.escapeVariable('$enterpriseId') +
      '/storeLayout';

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