get method

Future<InventorySource> get(
  1. String inventorySourceId, {
  2. String? partnerId,
  3. String? $fields,
})

Gets an inventory source.

Request parameters:

inventorySourceId - Required. The ID of the inventory source to fetch. Value must have pattern ^\[^/\]+$.

partnerId - Required. The ID of the DV360 partner to which the fetched inventory source is permissioned.

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

Completes with a InventorySource.

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<InventorySource> get(
  core.String inventorySourceId, {
  core.String? partnerId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (partnerId != null) 'partnerId': [partnerId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'v2/inventorySources/' + core.Uri.encodeFull('$inventorySourceId');

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