File tree Expand file tree Collapse file tree 3 files changed +49
-17
lines changed
src/Picqer/Financials/Moneybird/Entities Expand file tree Collapse file tree 3 files changed +49
-17
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,14 @@ class Estimate extends Model
3131 */
3232 protected $ fillable = [
3333 'id ' ,
34+ 'administration_id ' ,
3435 'contact_id ' ,
3536 'contact ' ,
3637 'estimate_id ' ,
3738 'workflow_id ' ,
3839 'document_style_id ' ,
3940 'identity_id ' ,
41+ 'draft_id ' ,
4042 'state ' ,
4143 'estimate_date ' ,
4244 'due_date ' ,
@@ -54,18 +56,22 @@ class Estimate extends Model
5456 'archived_at ' ,
5557 'created_at ' ,
5658 'updated_at ' ,
59+ 'public_view_code ' ,
60+ 'version ' ,
5761 'pre_text ' ,
5862 'post_text ' ,
5963 'details ' ,
6064 'total_price_excl_tax ' ,
6165 'total_price_excl_tax_base ' ,
6266 'total_price_incl_tax ' ,
6367 'total_price_incl_tax_base ' ,
68+ 'total_discount ' ,
6469 'url ' ,
6570 'custom_fields ' ,
6671 'notes ' ,
6772 'attachments ' ,
68- 'public_view_code ' ,
73+ 'events ' ,
74+ 'tax_totals ' ,
6975 ];
7076
7177 /**
@@ -94,6 +100,14 @@ class Estimate extends Model
94100 'entity ' => Note::class,
95101 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
96102 ],
103+ 'events ' => [
104+ 'entity ' => EstimateEvent::class,
105+ 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
106+ ],
107+ 'tax_totals ' => [
108+ 'entity ' => EstimateTaxTotal::class,
109+ 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
110+ ],
97111 ];
98112
99113 /**
@@ -128,20 +142,4 @@ public function sendEstimate($deliveryMethodOrOptions = SendInvoiceOptions::METH
128142
129143 return $ this ;
130144 }
131-
132- /**
133- * Add a note to the current estimate.
134- *
135- * @param Note $note
136- * @return $this
137- * @throws ApiException
138- */
139- private function addNote (Note $ note )
140- {
141- $ this ->connection ()->post ($ this ->endpoint . '/ ' . $ this ->id . '/notes ' ,
142- $ note ->jsonWithNamespace ()
143- );
144-
145- return $ this ;
146- }
147145}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Picqer \Financials \Moneybird \Entities ;
4+
5+ use Picqer \Financials \Moneybird \Entities \Generic \Event ;
6+
7+ /**
8+ * Class EstimateEvent.
9+ */
10+ class EstimateEvent extends Event
11+ {
12+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Picqer \Financials \Moneybird \Entities ;
4+
5+ use Picqer \Financials \Moneybird \Model ;
6+
7+ /**
8+ * Class EstimateTaxTotal.
9+ */
10+ class EstimateTaxTotal extends Model
11+ {
12+ /**
13+ * @var array
14+ */
15+ protected $ fillable = [
16+ 'tax_rate_id ' ,
17+ 'taxable_amount ' ,
18+ 'taxable_amount_base ' ,
19+ 'tax_amount ' ,
20+ 'tax_amount_base ' ,
21+ ];
22+ }
You can’t perform that action at this time.
0 commit comments