rut en Customer en formato Toku
This commit is contained in:
@ -9,10 +9,15 @@ class Customer extends Ideal\Model
|
||||
public Persona $persona;
|
||||
public string $toku_id;
|
||||
|
||||
public function rut(): string
|
||||
{
|
||||
return implode('', [$this->persona->rut, strtoupper($this->persona->digito)]);
|
||||
}
|
||||
|
||||
protected function jsonComplement(): array
|
||||
{
|
||||
return [
|
||||
'rut' => implode('', [$this->persona->rut, $this->persona->digito]),
|
||||
'rut' => $this->rut(),
|
||||
'toku_id' => $this->toku_id
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user