File tree Expand file tree Collapse file tree 14 files changed +145
-31
lines changed
src/Picqer/Financials/Moneybird
tests/PicqerTest/Financials/Moneybird Expand file tree Collapse file tree 14 files changed +145
-31
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ abstract protected function getEndpoint();
2626 *
2727 * @see \Picqer\Financials\Moneybird\Model::collectionFromResult()
2828 */
29- abstract protected function collectionFromResult ($ result );
29+ abstract protected function collectionFromResult (array $ result );
3030
3131 /**
3232 * Create a new object with the response from the API
@@ -37,6 +37,6 @@ abstract protected function collectionFromResult($result);
3737 *
3838 * @see \Picqer\Financials\Moneybird\Model::makeFromResponse()
3939 */
40- abstract protected function makeFromResponse ($ response );
40+ abstract protected function makeFromResponse (array $ response );
4141
4242}
Original file line number Diff line number Diff line change 1212/**
1313 * Class Contact
1414 * @package Picqer\Financials\Moneybird
15+ *
16+ * @property string $id
17+ * @property ContactCustomField[] $custom_fields
1518 */
1619class Contact extends Model
1720{
@@ -76,7 +79,7 @@ class Contact extends Model
7679 */
7780 protected $ multipleNestedEntities = [
7881 'custom_fields ' => [
79- 'entity ' => ' ContactCustomField ' ,
82+ 'entity ' => ContactCustomField::class ,
8083 'type ' => self ::NESTING_TYPE_NESTED_OBJECTS ,
8184 ],
8285 ];
Original file line number Diff line number Diff line change 55/**
66 * Class ContactCustomField
77 * @package Picqer\Financials\Moneybird\Entities
8+ *
9+ * @property string $id
10+ * @property string $name
11+ * @property string $value
812 */
913class ContactCustomField extends Model {
1014
Original file line number Diff line number Diff line change @@ -81,15 +81,15 @@ class Estimate extends Model
8181 */
8282 protected $ multipleNestedEntities = [
8383 'custom_fields ' => [
84- 'entity ' => ' SalesInvoiceCustomField ' ,
84+ 'entity ' => SalesInvoiceCustomField::class ,
8585 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
8686 ],
8787 'details ' => [
88- 'entity ' => ' SalesInvoiceDetail ' ,
88+ 'entity ' => SalesInvoiceDetail::class ,
8989 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
9090 ],
9191 'notes ' => [
92- 'entity ' => ' Note ' ,
92+ 'entity ' => Note::class ,
9393 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
9494 ],
9595 ];
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class FinancialMutation extends Model {
7878 */
7979 protected $ multipleNestedEntities = [
8080 'ledger_account_bookings ' => [
81- 'entity ' => ' LedgerAccountBooking ' ,
81+ 'entity ' => LedgerAccountBooking::class ,
8282 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
8383 ],
8484 ];
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class FinancialStatement extends Model {
4040 */
4141 protected $ multipleNestedEntities = [
4242 'financial_mutations ' => [
43- 'entity ' => ' FinancialMutation ' ,
43+ 'entity ' => FinancialMutation::class ,
4444 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
4545 ],
4646 ];
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class GeneralJournalDocument extends Model {
4343 */
4444 protected $ multipleNestedEntities = [
4545 'general_journal_document_entries ' => [
46- 'entity ' => ' GeneralJournalDocumentEntry ' ,
46+ 'entity ' => GeneralJournalDocumentEntry::class ,
4747 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
4848 ],
4949 ];
Original file line number Diff line number Diff line change 55/**
66 * Class Note
77 * @package Picqer\Financials\Moneybird\Entities
8+ *
9+ * @property string $id
10+ * @property string $note
11+ * @property boolean $todo
12+ * @property string $assignee_id
813 */
914class Note extends Model {
1015 /**
Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ class PurchaseInvoice extends Model
6262 * @var array
6363 */
6464 protected $ singleNestedEntities = [
65- 'contact ' => ' Contact '
65+ 'contact ' => Contact::class,
6666 ];
6767
6868 /**
6969 * @var array
7070 */
7171 protected $ multipleNestedEntities = [
7272 'details ' => [
73- 'entity ' => ' PurchaseInvoiceDetail ' ,
73+ 'entity ' => PurchaseInvoiceDetail::class ,
7474 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
7575 ],
7676 ];
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class Receipt extends Model {
6060 */
6161 protected $ multipleNestedEntities = [
6262 'details ' => [
63- 'entity ' => ' ReceiptDetail ' ,
63+ 'entity ' => ReceiptDetail::class ,
6464 'type ' => self ::NESTING_TYPE_ARRAY_OF_OBJECTS ,
6565 ],
6666 ];
You can’t perform that action at this time.
0 commit comments