I'm trying to create an experiment via the API using the ruby client
library. Creating the experiment works ok but when I try to add a keyword I
get:
/home/johnny/.rvm/gems/ruby-2.1.6/gems/google-ads-common-0.9.8/lib/ads_common/savon_service.rb:113:in
`handle_errors': Unknown exception with error: Unmarshalling Error:
cvc-elt.4.3: Type 'AdGroupCriterionOperation' is not validly derived from
the type definition, 'AdGroupCriterion', of element 'operand'.
(AdsCommon::Errors::ApiException)
from
/home/johnny/.rvm/gems/ruby-2.1.6/gems/google-ads-common-0.9.8/lib/ads_common/savon_service.rb:83:in
`execute_action'
from
/home/johnny/.rvm/gems/ruby-2.1.6/gems/google-adwords-api-0.13.2/lib/adwords_api/v201409/ad_group_criterion_service.rb:25:in
`mutate'
from ../adwords_play.rb:52:in `<main>'
Any ideas why? The relevant part of my code follows.
ad_group_criterion_srv = adwords.service(:AdGroupCriterionService,
API_VERSION)
ad_group_criterion = {
:xsi_type => 'AdGroupCriterionOperation',
:operand => {
:xsi_type => 'BiddableAdGroupCriterion',
:ad_group_id => 'xxxxxx',
:criterion => {
:xsi_type => 'Keyword',
:match_type => 'BROAD',
:id => 'xxxxxx'
}
}
}
operation = {
:operator => 'ADD',
:operand => ad_group_criterion
}
# Update criterion.
response = ad_group_criterion_srv.mutate([operation])
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2a5fd761-aeff-497d-a0d8-4f43ccf54d1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.