list method
Retrieves the list of conversion sources the caller has access to.
Request parameters:
parent - Required. The merchant account who owns the collection of
conversion sources. Format: accounts/{account}
Value must have pattern ^accounts/\[^/\]+$.
pageSize - Optional. The maximum number of conversion sources to return
in a page. If no page_size is specified, 100 is used as the default
value. The maximum value is 200. Values above 200 will be coerced to
200. Regardless of pagination, at most 200 conversion sources are
returned in total.
pageToken - Optional. Page token.
showDeleted - Optional. Show deleted (archived) conversion sources. By
default, deleted conversion sources are not returned.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListConversionSourcesResponse.
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<ListConversionSourcesResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.bool? showDeleted,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
if ($fields != null) 'fields': [$fields],
};
final url_ =
'conversions/v1/' +
core.Uri.encodeFull('$parent') +
'/conversionSources';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListConversionSourcesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}