Пример #1
0
 protected static function getReferencedEnums()
 {
     $ref_enums = array();
     $ref_enums['BillingEvent'] = AdSetBillingEventValues::getInstance()->getValues();
     $ref_enums['ConfiguredStatus'] = AdSetConfiguredStatusValues::getInstance()->getValues();
     $ref_enums['EffectiveStatus'] = AdSetEffectiveStatusValues::getInstance()->getValues();
     $ref_enums['OptimizationGoal'] = AdSetOptimizationGoalValues::getInstance()->getValues();
     $ref_enums['Status'] = AdSetStatusValues::getInstance()->getValues();
     $ref_enums['DatePreset'] = AdSetDatePresetValues::getInstance()->getValues();
     $ref_enums['ExecutionOptions'] = AdSetExecutionOptionsValues::getInstance()->getValues();
     $ref_enums['Operator'] = AdSetOperatorValues::getInstance()->getValues();
     return $ref_enums;
 }
Пример #2
0
 public function getAdSets(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array('ad_draft_id' => 'string', 'date_preset' => 'date_preset_enum', 'effective_status' => 'list<effective_status_enum>', 'include_deleted' => 'bool', 'is_completed' => 'bool', 'time_range' => 'map');
     $enums = array('date_preset_enum' => AdSetDatePresetValues::getInstance()->getValues(), 'effective_status_enum' => AdSetEffectiveStatusValues::getInstance()->getValues());
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_GET, '/adsets', new AdSet(), 'EDGE', AdSet::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }