/**
* Retorna o array.
*
* @return array
*/
public function toArray()
{
$array = ['header' => $this->header->toArray(), 'trailer' => $this->trailer->toArray(), 'detalhes' => new Collection()];
foreach ($this->detalhe as $detalhe) {
$array['detalhes']->add($detalhe->toArray());
}
return $array;
}