getByCustomerId method
Retrieves a list of conversions from a DoubleClick Search engine account.
Request parameters:
customerId
- Customer ID of a client account in the new Search Ads 360
experience.
endDate
- Last date (inclusive) on which to retrieve conversions. Format
is yyyymmdd.
Value must be between "20091101" and "99991231".
rowCount
- The number of conversions to return per call.
Value must be between "1" and "1000".
startDate
- First date (inclusive) on which to retrieve conversions.
Format is yyyymmdd.
Value must be between "20091101" and "99991231".
startRow
- The 0-based starting index for retrieving conversions
results.
adGroupId
- Numeric ID of the ad group.
adId
- Numeric ID of the ad.
advertiserId
- Numeric ID of the advertiser.
agencyId
- Numeric ID of the agency.
campaignId
- Numeric ID of the campaign.
criterionId
- Numeric ID of the criterion.
engineAccountId
- Numeric ID of the engine account.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ConversionList.
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<ConversionList> getByCustomerId(
core.String customerId,
core.int endDate,
core.int rowCount,
core.int startDate,
core.int startRow, {
core.String? adGroupId,
core.String? adId,
core.String? advertiserId,
core.String? agencyId,
core.String? campaignId,
core.String? criterionId,
core.String? engineAccountId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'endDate': ['${endDate}'],
'rowCount': ['${rowCount}'],
'startDate': ['${startDate}'],
'startRow': ['${startRow}'],
if (adGroupId != null) 'adGroupId': [adGroupId],
if (adId != null) 'adId': [adId],
if (advertiserId != null) 'advertiserId': [advertiserId],
if (agencyId != null) 'agencyId': [agencyId],
if (campaignId != null) 'campaignId': [campaignId],
if (criterionId != null) 'criterionId': [criterionId],
if (engineAccountId != null) 'engineAccountId': [engineAccountId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'doubleclicksearch/v2/customer/' +
commons.escapeVariable('$customerId') +
'/conversion';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ConversionList.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}