This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Grayloon \Magento \Api ;
4+
5+ class Sources extends AbstractApi
6+ {
7+ /**
8+ * inventoryApiSourcesRepositoryV1
9+ * All of paginated source items.
10+ *
11+ * @param int $pageSize
12+ * @param int $currentPage
13+ * @param array $filters
14+ *
15+ * @return array
16+ */
17+ public function all ($ pageSize = 50 , $ currentPage = 1 , $ filters = [])
18+ {
19+ return $ this ->get ('/inventory/sources ' , array_merge ($ filters , [
20+ 'searchCriteria[pageSize] ' => $ pageSize ,
21+ 'searchCriteria[currentPage] ' => $ currentPage ,
22+ ]));
23+ }
24+
25+ public function bySourceName (String $ name = 'default ' )
26+ {
27+ return $ this ->get ('/inventory/sources/ ' .$ name );
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Grayloon \Magento \Api ;
4+
5+ class Stocks extends AbstractApi
6+ {
7+ /**
8+ * inventoryApiStocksRepositoryV1
9+ * All of paginated source items.
10+ *
11+ * @param int $pageSize
12+ * @param int $currentPage
13+ * @param array $filters
14+ *
15+ * @return array
16+ */
17+ public function all ($ pageSize = 50 , $ currentPage = 1 , $ filters = [])
18+ {
19+ return $ this ->get ('/inventory/stocks ' , array_merge ($ filters , [
20+ 'searchCriteria[pageSize] ' => $ pageSize ,
21+ 'searchCriteria[currentPage] ' => $ currentPage ,
22+ ]));
23+ }
24+
25+ }
You can’t perform that action at this time.
0 commit comments