Ejemplo n.º 1
0
 protected static function getReferencedEnums()
 {
     $ref_enums = array();
     $ref_enums['ClaimObjective'] = CustomAudienceClaimObjectiveValues::getInstance()->getValues();
     $ref_enums['ContentType'] = CustomAudienceContentTypeValues::getInstance()->getValues();
     $ref_enums['Subtype'] = CustomAudienceSubtypeValues::getInstance()->getValues();
     $ref_enums['Fields'] = CustomAudienceFieldsValues::getInstance()->getValues();
     return $ref_enums;
 }
Ejemplo n.º 2
0
 public function createCustomAudience(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array('claim_objective' => 'claim_objective_enum', 'content_type' => 'content_type_enum', 'dataset_id' => 'string', 'description' => 'string', 'event_source_group' => 'string', 'list_of_accounts' => 'list<unsigned int>', 'lookalike_spec' => 'string', 'name' => 'string', 'opt_out_link' => 'string', 'origin_audience_id' => 'string', 'pixel_id' => 'unsigned int', 'prefill' => 'bool', 'product_set_id' => 'string', 'retention_days' => 'unsigned int', 'rule' => 'string', 'subtype' => 'subtype_enum');
     $enums = array('claim_objective_enum' => CustomAudienceClaimObjectiveValues::getInstance()->getValues(), 'content_type_enum' => CustomAudienceContentTypeValues::getInstance()->getValues(), 'subtype_enum' => CustomAudienceSubtypeValues::getInstance()->getValues());
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/customaudiences', new CustomAudience(), 'EDGE', CustomAudience::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }