title: What type should I be getting to dismiss a recommendation via the Google Ads API in Python?
body: <p>I need to use Python in Google Colab to dismiss recommendations from many managed Google Ads accounts using the Google Ads API. I have been using the docs and the GitHub examples to build my code and it has worked to an extent. I have been able to retrieve recommendations with their resource names, but I have not been able to dismiss the recommendations. It seems there is an error getting the DismissRecommendationOperation.</p>
  <p>Here is the code (with sensitive info redacted) and error message:</p>
  <pre><code>client = GoogleAdsClient.load_from_storage(&quot;google-ads.yaml.txt&quot;, version=&quot;v10&quot;)
  customer_id = &quot;XXXXXXXXXX&quot;
  recommendation_id = &quot;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&quot;
  
  
  rec_service = client.get_service(&quot;RecommendationService&quot;)
  operation = client.get_type(&quot;DismissRecommendationOperation&quot;)
  operation.resource_name = recommendation_service.recommendation_path(
      customer_id, recommendation_id
  )
  
  response = rec_service.dismiss_recommendation(
      customer_id=customer_id, operations=[operation]
  )
  
  print(
      &quot;Dismissed recommendation with resource name: &quot;
      f&quot;'{response.results[0].resource_name}'.&quot;
  )
  </code></pre>
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  /usr/local/lib/python3.7/dist-packages/google/ads/googleads/client.py in get_type(self, name, version)
      440             type_classes = self._get_api_services_by_version(version)
  --&gt; 441             message_class = getattr(type_classes, name)
      442         except AttributeError:
  
  2 frames
  AttributeError: unknown type 'DismissRecommendationOperation'.
  
  During handling of the above exception, another exception occurred:
  
  ValueError                                Traceback (most recent call last)
  /usr/local/lib/python3.7/dist-packages/google/ads/googleads/client.py in get_type(self, name, version)
      442         except AttributeError:
      443             raise ValueError(
  --&gt; 444                 f&quot;Specified type '{name}' does not exist in &quot;
      445                 f&quot;Google Ads API {version}&quot;
      446             )
  
  ValueError: Specified type 'DismissRecommendationOperation' does not exist in Google Ads API v10
  </code></pre>
  <p>I have been using the docs here: <a href="https://developers.google.com/google-ads/api/docs/recommendations" rel="nofollow noreferrer">https://developers.google.com/google-ads/api/docs/recommendations</a>
  and the GitHub example here: <a href="https://github.com/googleads/google-ads-python/blob/23b6342914b49fa50e1c82b67f6508d2ac721787/examples/recommendations/dismiss_recommendation.py" rel="nofollow noreferrer">https://github.com/googleads/google-ads-python/blob/23b6342914b49fa50e1c82b67f6508d2ac721787/examples/recommendations/dismiss_recommendation.py</a></p>
  <p>Thank you so much for your help!</p>