Hi all,

I try to add new LogicalUserList using PHP google API client (API version 
is 201702):

    /**
     * @param $combinedListName
     * @param $lists array of BasicUserList
     * @return mixed
     */
protected function createCombinedList($combinedListName, $lists) {

        $createOperand = function($userList){ return new 
LogicalUserListOperand($userList); };
        $rules = [];
        foreach($lists as $operator => $list) {
            $rules[] = new UserListLogicalRule( $operator, 
array_map($createOperand, $list));
        }

        $combinedList = new LogicalUserList();
        $combinedList->setName( $combinedListName );
        $combinedList->setRules( $rules );

        $addListOperation = new UserListOperation();
        $addListOperation->setOperator(Operator::ADD);
        $addListOperation->setOperand($combinedList);
        $result = 
$this->getService("AdwordsUserListService")->mutate([$addListOperation]);
        return $result->value[0];
    }

but I receive the error:
 
[UserListError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]

Also adding lists worked fine with API v201609 . 
In docs I found that CONCRETE_TYPE_REQUIRED means "Concrete type of user 
list (logical v.s. remarketing) is required for ADD and SET operations". 
Also LogicalUserList has listType and UserList.Type but both are read only 
and will be ignored when sent to the API
What am I doing wrong? Thanks for help in advance

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d017d642-8cff-4686-a8ee-5cfcf85d2090%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to