File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/Picqer/Financials/Moneybird/Actions Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,21 @@ trait Synchronizable
1010 /**
1111 * @return mixed
1212 */
13- public function listVersions ()
13+ public function listVersions (array $ filters = [] )
1414 {
15- $ result = $ this ->connection ()->get ($ this ->getEndpoint () . '/synchronization ' );
15+ $ filter = [];
16+
17+ if ( ! empty ($ filters ))
18+ {
19+ $ filterList = [];
20+ foreach ($ filters as $ key => $ value ) {
21+ $ filterList [] = $ key .': ' . $ value ;
22+ }
23+
24+ $ filter = ['filter ' => implode (', ' , $ filterList )];
25+ }
26+
27+ $ result = $ this ->connection ()->get ($ this ->getEndpoint () . '/synchronization ' , $ filter );
1628
1729 return $ this ->collectionFromResult ($ result );
1830 }
@@ -29,5 +41,4 @@ public function getVersions(array $ids)
2941
3042 return $ this ->collectionFromResult ($ result );
3143 }
32-
3344}
You can’t perform that action at this time.
0 commit comments