/**
  * @param $array array
  */
 public function fromArray($array)
 {
     $this->status = $this->safeGet($array, self::STATUS);
     $this->endDate = $this->safeGet($array, self::END_DATE);
     $this->startDate = $this->safeGet($array, self::START_DATE);
     $geographicTargeting = $this->safeGet($array, self::GEOGRAPHIC_TARGETING);
     if (!empty($geographicTargeting)) {
         $this->geographicTargeting = new FacebookGeographicTargeting($geographicTargeting);
     }
     $demographicTargeting = $this->safeGet($array, self::DEMOGRAPHIC_TARGETING);
     if (!empty($demographicTargeting)) {
         $this->demographicTargeting = new FacebookDemographicTargeting($demographicTargeting);
         // versioned
     }
     $audienceTargeting = $this->safeGet($array, self::AUDIENCE_TARGETING);
     if (!empty($audienceTargeting)) {
         $this->audienceTargeting = new FacebookAudienceTargeting($audienceTargeting);
         // versioned
     }
     $this->objectsToUpdate = $this->safeGet($array, self::OBJECTS_TO_UPDATE);
     $this->adAccountId = $this->safeGet($array, self::AD_ACCOUNT_ID);
     $this->pageId = $this->safeGet($array, self::PAGE_ID);
     $this->accessToken = $this->safeGet($array, self::ACCESS_TOKEN);
     $this->igActorId = $this->safeGet($array, self::IG_ACTOR_ID);
     $creatives = $this->safeGet($array, self::CREATIVES, []);
     $this->creatives = [];
     foreach ($creatives as $creative) {
         $fbCreative = new FacebookCreative();
         $fbCreative->fromArray($creative);
         $this->creatives[] = $fbCreative;
     }
     $adSetResults = [];
     $adSets = $this->safeGet($array, self::AD_SETS, []);
     foreach ($adSets as $adSetArray) {
         $adSet = new FacebookAdSet();
         $adSet->fromAssociativeArray($adSetArray);
         $adSetResults[] = $adSet;
     }
     $this->adSets = $adSetResults;
     // versioned, might need builder
     $budget = $this->safeGet($array, self::BUDGET);
     if (!empty($budget)) {
         $budget = new Budget(null);
         $budget->fromArray($this->safeGet($array, self::BUDGET));
         $this->budget = $budget;
     }
 }