Hey,
I have a problem creating or editing a TargetCpa Bidding strategy (TargetCpaBiddingScheme) with the Adwords PHP libary v201506.
We're using the following code:
$biddingStrategyService =$user->GetService('BiddingStrategyService', ADWORDS_VERSION);
$sharedBiddingStrategy = new SharedBiddingStrategy();
$sharedBiddingStrategy->status = 'ENABLED';
$sharedBiddingStrategy->name = 'example strategy name';
$biddingScheme = new TargetCpaBiddingScheme();
$biddingScheme->targetCpa = new money('100');
$sharedBiddingStrategy->biddingScheme = $biddingScheme;
$operation = new BiddingStrategyOperation();
$operation->operator = 'ADD';
$operation->operand = $sharedBiddingStrategy;
$result = $biddingStrategyService->mutate(array($operation));
$newBiddingStrategy = $result->value[0];
Here is what the API returns: [RequestError.UNKNOWN @ operations[0].operand.biddingScheme.targetCpa]
However, if I remove the line $biddingScheme->targetCpa = new money('100'); from the example above it says: [RequiredError.REQUIRED @ operations[0].operand.biddingScheme.targetCpa]
That doesn't make sense to me. Whats wrong with that line? Or is that a bug in the PHP library or even worse the Adwords API itself?
Any help appreciated!
Thanks in advance,
Valentin