This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -460,6 +460,15 @@ Get a list of paginated stocks.
460460Magento::api('stocks')->all($pageSize = 50, $currentPage = 1, $filters = []);
461461```
462462
463+ ### Store (storeGroupRepositoryV1)
464+
465+ ` /V1/store/storeConfigs `
466+
467+ Get a list of store configs.
468+ ``` php
469+ Magento::api('store')->storeConfigs();
470+ ```
471+
463472## Testing
464473
465474``` bash
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Grayloon \Magento \Api ;
4+
5+ class Store extends AbstractApi
6+ {
7+ /**
8+ * Retrieve list of all store configs.
9+ *
10+ * @return array
11+ */
12+ public function storeConfigs ()
13+ {
14+ return $ this ->get ('/store/storeConfigs ' );
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Grayloon \Magento \Tests ;
4+
5+ use Grayloon \Magento \Api \Store ;
6+ use Grayloon \Magento \MagentoFacade ;
7+ use Illuminate \Support \Facades \Http ;
8+
9+ class StoreTest extends TestCase
10+ {
11+ public function test_can_instantiate_store ()
12+ {
13+ $ this ->assertInstanceOf (Stores::class, MagentoFacade::api ('store ' ));
14+ }
15+
16+ public function test_can_call_store_store_configs ()
17+ {
18+ Http::fake ([
19+ '*rest/all/V1/store/storeConfigs* ' => Http::response ([], 200 ),
20+ ]);
21+
22+ $ api = MagentoFacade::api ('store ' )->storeConfigs ();
23+
24+ $ this ->assertTrue ($ api ->ok ());
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments