holderName, 'holder_name'); self::requireIn($this->holderType, ['individual', 'company'], 'holder_type'); self::requireFilled($this->holderDocument, 'holder_document'); self::requireFilled($this->bank, 'bank'); self::requireFilled($this->branchNumber, 'branch_number'); self::requireFilled($this->accountNumber, 'account_number'); self::requireFilled($this->accountCheckDigit, 'account_check_digit'); self::requireFilled($this->type, 'type'); } public function toArray(): array { return $this->filterFilledRecursive([ 'holder_name' => $this->holderName, 'holder_type' => $this->holderType, 'holder_document' => $this->holderDocument, 'bank' => $this->bank, 'branch_number' => $this->branchNumber, 'branch_check_digit' => $this->branchCheckDigit, 'account_number' => $this->accountNumber, 'account_check_digit' => $this->accountCheckDigit, 'type' => $this->type, ]); } }