completeSetup method
- CompleteSetupRequest request,
- String accountId,
- String proposalId, {
- String? $fields,
You can opt-in to manually update proposals to indicate that setup is complete.
By default, proposal setup is automatically completed after their deals
are finalized. Contact your Technical Account Manager to opt in. Buyers
can call this method when the proposal has been finalized, and all the
required creatives have been uploaded using the Creatives API. This call
updates the is_setup_completed
field on the deals in the proposal, and
notifies the seller. The server then advances the revision number of the
most recent proposal. To mark an individual deal as ready to serve, call
buyers.finalizedDeals.setReadyToServe
in the Marketplace API.
request
- The metadata request object.
Request parameters:
accountId
- Account ID of the buyer.
proposalId
- The ID of the proposal to mark as setup completed.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Proposal.
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<Proposal> completeSetup(
CompleteSetupRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':completeSetup';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}