Skip to content

v1.17.0 — invoiceTemplates uploadLogo()

Choose a tag to compare

@ronylicha ronylicha released this 06 May 02:02
· 61 commits to main since this release

Added

  • `$client->invoiceTemplates()->uploadLogo($id, $file, $filename = null)` — upload d'un logo pour un template (multipart S3). Accepte un path string (auto-fopen) ou une resource. Formats : jpeg, png, webp, svg/svgz. Max 2MB.
  • `HttpClient::postMultipart($path, $multipart)` — primitive Guzzle multipart.

Backend requirements

Backend Scell.io v0.7.0+.

Use case

```php
$tpl = $client->invoiceTemplates()->uploadLogo($templateId, '/path/to/logo.png');

$client->invoiceTemplates()->update($templateId, [
'primary_color' => '#1F2937',
'accent_color' => '#6366F1',
'footer_text' => 'Mentions legales custom',
]);

$client->invoiceTemplates()->markDefault($templateId);
```