Hello,

this is a carryover from the client library issue here:
https://github.com/googleads/google-ads-python/issues/402

Also, I've been testing out solutions found here:
https://groups.google.com/g/adwords-api/c/KLZ9Tq7i-RI/m/JvAYhtVECgAJ

But things just won't work out. So I'll try to phrase the problem as simply 
as possible:
how would you fabricate an UPDATE request that changes a promotion 
extension to use pecentOff instead of moneyAmountOff (which has been 
previously set)? And also, vice versa: how would you update a promotion 
extension to switch to moneyAmonutOff from percentOff?

Simply setting the fields won't work, requests like this:
update {
  resource_name: "customers/4238627020/extensionFeedItems/170048763759"
  promotion_feed_item {
    money_amount_off {
      currency_code: "HUF"
      amount_micros: 1850000000
    }
    promotion_target: "Wellis Huron El\305\221lap"
    final_urls: 
"https://www.maredesign.hu/termekek/Elolapok/Wellis-Huron-elolap";
  }
  extension_type: PROMOTION
}
update_mask {
  paths: "resource_name"
  paths: "extension_type"
  paths: "promotion_feed_item.promotion_target"
  paths: "promotion_feed_item.final_urls"
  paths: "promotion_feed_item.money_amount_off.currency_code"
  paths: "promotion_feed_item.money_amount_off.amount_micros"
}

fail with an "invalid argument" error - as they most likely should, as in 
the example above, percent_off is already set, and so in this case, the 
operation fails with invalid argument for currency_code. But how can you 
"unset" percent_off to make currency_code legal? (And the other way around: 
how would you "unset" currency_code and amount_micros (and 
money_amount_off) to make percent_off legal?)

I've tried setting percent_off to "-1" for the example above, but that just 
results in a field has invalid value error. Do note however, that the 
client library, for some reason, removes money_amount_off from the update 
operation if percent_off is the last item set, and also the other way 
around. This means that I could most likely only hack this argument into 
the update operation to make things work.

Can you help me out? 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/41e62daf-4268-4152-aa40-eb47f54f6ef1n%40googlegroups.com.

Reply via email to