Martialdelastic / google-api-adwords-php

Automatically exported from code.google.com/p/google-api-adwords-php
Apache License 2.0
0 stars 0 forks source link

AdX Buyer UpdatePlacement.php example doesn't work #86

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of the library are you using?
3.2.0

Which version of PHP are you using?
5.4.8

What steps will reproduce the problem?
Run the example.

What is the expected output? What do you see instead?
Should update a placement. Instead, it outputs a AdxError.UNSUPPORTED_FEATURE 
error.

Please provide any additional information below.
The problem is the use of the raw Criterion class. This class is disabled for 
AdX. The Placement class should explicitly be used instead. (Also, I notice 
that you never use $criterion)

  // Create criterion using an existing ID. 
  $criterion = new Placement();
  $criterion->id = $criterionId;

  // Create ad group criterion.
  $adGroupCriterion = new BiddableAdGroupCriterion();
  $adGroupCriterion->adGroupId = $adGroupId;
  $adGroupCriterion->criterion = $criterion;

Original issue reported on code.google.com by jdila...@google.com on 4 Mar 2013 at 6:33

GoogleCodeExporter commented 8 years ago
This has been implemented in the latest version of the client library in the 
examples v201302.

I'll ensure it's fixed in v201209 in the next release.

Original comment by api.pmat...@gmail.com on 21 Mar 2013 at 10:53

GoogleCodeExporter commented 8 years ago
This should be fixed for all currently supported version of the Adx API.

https://code.google.com/p/google-api-adwords-php/source/browse/examples/Adx/v201
306/BasicOperations/UpdatePlacement.php

https://code.google.com/p/google-api-adwords-php/source/browse/examples/Adx/v201
302/BasicOperations/UpdatePlacement.php

Regards,

- Paul, AdWords API Team.

Original comment by api.pmat...@gmail.com on 31 Jul 2013 at 4:30