Skip to content

Commit cfa5376

Browse files
authored
Merge pull request #57 from mbardelmeijer/makeEstimatesDownloadable
Make estimates downloadable
2 parents 0766d29 + ab3357d commit cfa5376

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Picqer/Financials/Moneybird/Actions/PrivateDownloadable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function download()
3232
'Authorization' => 'Bearer ' . $connection->getAccessToken(),
3333
];
3434

35-
$endpoint = 'https://moneybird.com/' . $connection->getAdministrationId() . '/sales_invoices/' . $this->id . '.pdf';
35+
$endpoint = 'https://moneybird.com/' . $connection->getAdministrationId() . '/' . $this->endpoint . '/' . $this->id . '.pdf';
3636
$body = '';
3737

3838
$request = new Request('GET', $endpoint, $headers, $body);

src/Picqer/Financials/Moneybird/Entities/Estimate.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Picqer\Financials\Moneybird\Actions\FindOne;
77
use Picqer\Financials\Moneybird\Actions\Synchronizable;
88
use Picqer\Financials\Moneybird\Actions\Filterable;
9+
use Picqer\Financials\Moneybird\Actions\PrivateDownloadable;
910
use Picqer\Financials\Moneybird\Model;
1011

1112
/**
@@ -20,7 +21,7 @@
2021
class Estimate extends Model
2122
{
2223

23-
use FindAll, FindOne, Storable, Removable, Synchronizable, Filterable;
24+
use FindAll, FindOne, Storable, Removable, Synchronizable, Filterable, PrivateDownloadable;
2425

2526
/**
2627
* @var array
@@ -29,7 +30,7 @@ class Estimate extends Model
2930
'id',
3031
'contact_id',
3132
'contact',
32-
'esimate_id',
33+
'estimate_id',
3334
'workflow_id',
3435
'document_style_id',
3536
'identity_id',

0 commit comments

Comments
 (0)