editGuaranteedOrderReadAccessors method

Future<EditGuaranteedOrderReadAccessorsResponse> editGuaranteedOrderReadAccessors(
  1. EditGuaranteedOrderReadAccessorsRequest request,
  2. String guaranteedOrderId, {
  3. String? $fields,
})

Edits read advertisers of a guaranteed order.

request - The metadata request object.

Request parameters:

guaranteedOrderId - Required. The ID of the guaranteed order to edit. The ID is of the format {exchange}-{legacy_guaranteed_order_id} Value must have pattern ^\[^/\]+$.

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

Completes with a EditGuaranteedOrderReadAccessorsResponse.

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<EditGuaranteedOrderReadAccessorsResponse>
    editGuaranteedOrderReadAccessors(
  EditGuaranteedOrderReadAccessorsRequest request,
  core.String guaranteedOrderId, {
  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_ = 'v2/guaranteedOrders/' +
      core.Uri.encodeFull('$guaranteedOrderId') +
      ':editGuaranteedOrderReadAccessors';

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