rut en Customer en formato Toku
This commit is contained in:
@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user