public function createAdAccountGroup(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); $param_types = array('accounts' => 'map', 'name' => 'string', 'redownload' => 'bool', 'users' => 'map'); $enums = array(); $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/adaccountgroups', new AdAccountGroup(), 'EDGE', AdAccountGroup::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums)); $request->addParams($params); $request->addFields($fields); return $pending ? $request : $request->execute(); }
public function getSelf(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); $param_types = array(); $enums = array(); $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_GET, '/', new AdAccountGroup(), 'NODE', AdAccountGroup::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums)); $request->addParams($params); $request->addFields($fields); return $pending ? $request : $request->execute(); }