/** * @return array */ public function toArray() { $payment = parent::toArray(); if ($recurrence = $this->getRecurrence()) { $payment['recurrence'] = $recurrence->toArray(); } return $payment; }