Behaviour changes
Please check these when upgrading:
- Lazy loading throws API errors. If loading a deferred property such as
$invoice->SalesInvoiceLinesfails (e.g. 429 or 401), anApiExceptionis now thrown. Before, the raw['__deferred' => …]array was returned without any error.isset()on a deferred property triggers the load too, so it can also throw now. #697 download()throwsApiException.Item::download()andDocumentAttachment::download()now go through the newConnection::downloadFile(). They use your configured client and middleware, refresh expired tokens and track rate limits. Errors are thrown asApiExceptioninstead of Guzzle exceptions. #697
Fixes
- Deferred properties without a matching entity class (e.g.
Expenses::$ExpenseLines) are returned as is, instead of causing a fatalClass not founderror. #697 filter('Division eq …')restores the original division when the request fails. #697- Requests are signed whenever an access token is set, also when no refresh token or authorization code is set. #697
New
Connection::downloadFile(string $url): StreamInterfacedownloads files from absolute Exact Online urls. #697