When updating, we need to select the object when making the model

This commit is contained in:
Deon George 2024-08-22 21:04:15 +10:00
parent 9d81824b52
commit 6741d95073

View File

@ -428,7 +428,9 @@ final class API
{
Log::debug(sprintf('%s:Update invoice',static::LOGKEY),['params'=>$parameters]);
return new Invoice($this->execute('invoice',array_merge($parameters,['method'=>'POST'])));
$result = $this->execute('invoice',array_merge($parameters,['method'=>'POST']));
return new Invoice($result->Invoice);
}
/**
@ -442,6 +444,8 @@ final class API
{
Log::debug(sprintf('%s:Update customer',static::LOGKEY),['params'=>$parameters]);
return new Customer($this->execute('customer',array_merge($parameters,['method'=>'POST'])));
$result = $this->execute('customer',array_merge($parameters,['method'=>'POST']));
return new Customer($result->Customer);
}
}