getSearchapplication method

Future<GetCustomerSearchApplicationStatsResponse> getSearchapplication({
  1. int? endDate_day,
  2. int? endDate_month,
  3. int? endDate_year,
  4. int? startDate_day,
  5. int? startDate_month,
  6. int? startDate_year,
  7. String? $fields,
})

Get search application stats for customer.

Note: This API requires a standard end user account to execute.

Request parameters:

endDate_day - Day of month. Must be from 1 to 31 and valid for the year and month.

endDate_month - Month of date. Must be from 1 to 12.

endDate_year - Year of date. Must be from 1 to 9999.

startDate_day - Day of month. Must be from 1 to 31 and valid for the year and month.

startDate_month - Month of date. Must be from 1 to 12.

startDate_year - Year of date. Must be from 1 to 9999.

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

Completes with a GetCustomerSearchApplicationStatsResponse.

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<GetCustomerSearchApplicationStatsResponse> getSearchapplication({
  core.int? endDate_day,
  core.int? endDate_month,
  core.int? endDate_year,
  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 (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/stats/searchapplication';

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