Пример #1
0
 protected static function getReferencedEnums()
 {
     $ref_enums = array();
     $ref_enums['ConfiguredStatus'] = CampaignConfiguredStatusValues::getInstance()->getValues();
     $ref_enums['EffectiveStatus'] = CampaignEffectiveStatusValues::getInstance()->getValues();
     $ref_enums['Status'] = CampaignStatusValues::getInstance()->getValues();
     $ref_enums['DatePreset'] = CampaignDatePresetValues::getInstance()->getValues();
     $ref_enums['DeleteStrategy'] = CampaignDeleteStrategyValues::getInstance()->getValues();
     $ref_enums['ExecutionOptions'] = CampaignExecutionOptionsValues::getInstance()->getValues();
     $ref_enums['Objective'] = CampaignObjectiveValues::getInstance()->getValues();
     $ref_enums['Operator'] = CampaignOperatorValues::getInstance()->getValues();
     return $ref_enums;
 }
Пример #2
0
 public function getCampaigns(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>', 'is_completed' => 'bool', 'time_range' => 'map');
     $enums = array('date_preset_enum' => CampaignDatePresetValues::getInstance()->getValues(), 'effective_status_enum' => CampaignEffectiveStatusValues::getInstance()->getValues());
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_GET, '/campaigns', new Campaign(), 'EDGE', Campaign::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }