Changes needed for MPA support - #555
Conversation
Change-Id: Iaefffce0a2955c3df4369affc6335fb9313151df
| # code. | ||
| # | ||
| # Running the example with -h will print the command line usage. | ||
| options[:customer_id] = 'INSERT_CUSTOMER_ID_HERE' |
There was a problem hiding this comment.
Where do you check whether the user has replaced this placeholder before invoking the main method?
|
|
||
| # Create a query that will retrieve all the pending MPA reviews. | ||
| query = <<~QUERY | ||
| SELECT |
There was a problem hiding this comment.
WHERE clause fields must be present in the SELECT clause. Added multi_party_auth_review.review_status to the SELECT clause.
| client = Google::Ads::GoogleAds::GoogleAdsClient.new | ||
|
|
||
| # Retrieve the list of pending MPA reviews. | ||
| pending_reviews = fetch_pending_mpa_reviews(client, customer_id) |
There was a problem hiding this comment.
Consider adding a helpful message if pending_reviews is empty to alert the user.
There was a problem hiding this comment.
Added a message here!
| ], | ||
| ) | ||
|
|
||
| result_or_error = response.result_or_error.first |
There was a problem hiding this comment.
Is it possible for result_or_error to be empty? If so, first will return nil , and result_or_error.result will raise a NoMethodError on NilClass .
There was a problem hiding this comment.
Added "&" to gracefully handle the NoMethodError
Change-Id: Ie7f15d5ef3968dd177b8eddfbf43b566f72fca3c
Change-Id: Iaefffce0a2955c3df4369affc6335fb9313151df