/**
  * Set the Series Details.
  *
  * @return RecurringRecord
  */
 public function setSeriesDetails()
 {
     $details = $this->record->getMpInstance()->getRecurringRecords($this);
     $rows = [];
     foreach ($details->getTable(0) as $item) {
         $rows[] = new Carbon($item);
     }
     $this->series_details = $rows;
     $description = $details->getTable(1);
     $this->series_description = $description['PatternName'];
     return $this;
 }
 /**
  * Update Record call to MinistryPlatform.
  *  
  * @param Record $record
  *
  * @return array
  */
 public function updateRecord(Record $record)
 {
     $parameters = array('GUID' => $this->guid, 'Password' => $this->pw, 'UserID' => $this->user_id, 'TableName' => $record->getTable(), 'PrimaryKeyField' => $record->getPrimaryKey(), 'RequestString' => $this->ConvertToString($record->getFields()));
     $function = 'UpdateRecord';
     $response = $this->execute($function, $parameters);
     $results = $this->SplitToArray($response->UpdateRecordResult);
     if ($results[0] <= 0) {
         throw new MinistryPlatformException($results[2], (int) $results[1]);
     }
     return $results;
 }