protected static function getReferencedEnums()
 {
     $ref_enums = array();
     $ref_enums['ApplinkTreatment'] = AdCreativeApplinkTreatmentValues::getInstance()->getValues();
     $ref_enums['CallToActionType'] = AdCreativeCallToActionTypeValues::getInstance()->getValues();
     $ref_enums['ObjectType'] = AdCreativeObjectTypeValues::getInstance()->getValues();
     $ref_enums['RunStatus'] = AdCreativeRunStatusValues::getInstance()->getValues();
     $ref_enums['DynamicAdVoice'] = AdCreativeDynamicAdVoiceValues::getInstance()->getValues();
     $ref_enums['Operator'] = AdCreativeOperatorValues::getInstance()->getValues();
     return $ref_enums;
 }
Esempio n. 2
0
 public function createAdCreative(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array('action_spec' => 'list<unsigned int>', 'actor_id' => 'unsigned int', 'actor_image_hash' => 'string', 'actor_image_url' => 'string', 'actor_name' => 'string', 'adlabels' => 'list<Object>', 'applink_treatment' => 'applink_treatment_enum', 'body' => 'string', 'call_to_action' => 'Object', 'dynamic_ad_voice' => 'dynamic_ad_voice_enum', 'follow_redirect' => 'bool', 'image_crops' => 'map', 'image_file' => 'string', 'image_hash' => 'string', 'image_url' => 'string', 'instagram_actor_id' => 'string', 'instagram_permalink_url' => 'string', 'link_og_id' => 'string', 'link_url' => 'string', 'name' => 'string', 'object_id' => 'unsigned int', 'object_instagram_id' => 'unsigned int', 'object_story_id' => 'string', 'object_story_spec' => 'AdCreativeObjectStorySpec', 'object_type' => 'string', 'object_url' => 'string', 'place_page_set_id' => 'string', 'platform_customizations' => 'Object', 'product_set_id' => 'string', 'template_url' => 'string', 'thumbnail_url' => 'string', 'title' => 'string', 'url_tags' => 'string', 'video_id' => 'unsigned int');
     $enums = array('applink_treatment_enum' => AdCreativeApplinkTreatmentValues::getInstance()->getValues(), 'dynamic_ad_voice_enum' => AdCreativeDynamicAdVoiceValues::getInstance()->getValues());
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/adcreatives', new AdCreative(), 'EDGE', AdCreative::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }