search method

Future<GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse> search({
  1. int? endDate_day,
  2. int? endDate_month,
  3. int? endDate_year,
  4. int? pageSize,
  5. String? pageToken,
  6. String? query,
  7. int? startDate_day,
  8. int? startDate_month,
  9. int? startDate_year,
  10. String? $fields,
})

Get account reports containing aggregate account data of all linked GLS accounts.

Caller needs to provide their manager customer id and the associated auth credential that allows them read permissions on their linked accounts.

Request parameters:

endDate_day - Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

endDate_month - Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

endDate_year - Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

pageSize - The maximum number of accounts to return. If the page size is unset, page size will default to 1000. Maximum page_size is 10000. Optional.

pageToken - The next_page_token value returned from a previous request to SearchAccountReports that indicates where listing should continue. Optional.

query - A query string for searching for account reports. Caller must provide a customer id of their MCC account with an associated Gaia Mint that allows read permission on their linked accounts. Search expressions

are case insensitive. Example query: | Query | Description | |-------------------------|-----------------------------------------------| | manager_customer_id:123 | Get Account Report for Manager with id 123. | Required.

startDate_day - Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

startDate_month - Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

startDate_year - Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

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

Completes with a GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse.

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<GoogleAdsHomeservicesLocalservicesV1SearchAccountReportsResponse>
    search({
  core.int? endDate_day,
  core.int? endDate_month,
  core.int? endDate_year,
  core.int? pageSize,
  core.String? pageToken,
  core.String? query,
  core.int? startDate_day,
  core.int? startDate_month,
  core.int? startDate_year,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (endDate_day != null) 'endDate.day': ['${endDate_day}'],
    if (endDate_month != null) 'endDate.month': ['${endDate_month}'],
    if (endDate_year != null) 'endDate.year': ['${endDate_year}'],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (query != null) 'query': [query],
    if (startDate_day != null) 'startDate.day': ['${startDate_day}'],
    if (startDate_month != null) 'startDate.month': ['${startDate_month}'],
    if (startDate_year != null) 'startDate.year': ['${startDate_year}'],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/accountReports:search';

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