list method
Retrieves the list of conversion sources the caller has access to.
Request parameters:
merchantId
- Required. The ID of the account that owns the new
conversion source.
pageSize
- 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
- Page token.
showDeleted
- If true, also returns archived conversion sources.
$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 merchantId, {
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_ = commons.escapeVariable('$merchantId') + '/conversionsources';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListConversionSourcesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}