googleads / googleads/google-ads-ruby
Using SearchSettings in V18
Open
@dorasun is already working on this.
Since Apr 9, 2025.
question
- Dominant language
- Ruby
- Stars
- 83
- Forks
- 72
- Avg merge
- 16m
- Merged PRs (30d)
- 1
Description
What is your question?
Before V18 I was making the following call:
@config_path = Rails.root.join("...").to_s
@google_ads_client = Google::Ads::GoogleAds::GoogleAdsClient.new(@config_path)
click_view_report = @google_ads_client.service.google_ads.search(
customer_id: @account_id.delete("-"),
query: click_view_query,
return_total_results_count: true
)
After V18 return_total_results_count should be passed as type SearchSettings from the docs here: https://developers.google.com/google-ads/api/docs/release-notes#reporting
I've tried a couple work arounds like passing a Google::Protobuf::Struct.new and a hash like so:
@config_path = Rails.root.join("...").to_s
@google_ads_client = Google::Ads::GoogleAds::GoogleAdsClient.new(@config_path)
click_view_report = @google_ads_client.service.google_ads.search(
customer_id: @account_id.delete("-"),
query: click_view_query,
search_settings: {
return_total_results_count: true
}
)
What is the right way to pass search_settings into this call?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.