rut en Customer en formato Toku

This commit is contained in:
Juan Pablo Vial
2025-05-08 17:16:03 -04:00
parent a5c1d60819
commit d1905194bd

View File

@ -9,10 +9,15 @@ class Customer extends Ideal\Model
public Persona $persona; public Persona $persona;
public string $toku_id; public string $toku_id;
public function rut(): string
{
return implode('', [$this->persona->rut, strtoupper($this->persona->digito)]);
}
protected function jsonComplement(): array protected function jsonComplement(): array
{ {
return [ return [
'rut' => implode('', [$this->persona->rut, $this->persona->digito]), 'rut' => $this->rut(),
'toku_id' => $this->toku_id 'toku_id' => $this->toku_id
]; ];
} }